Sure, but it depends what you mean by recover.
The ability of a computer to recover on any operating system depends on the following things:
Resilient hardware. Power failures are indicative of poor power networks. These can otherwise fry cheap and bad components. If you get a power spike post-cut (as is very common) your computers might suffer hardware failure.
Is BIOS set to turn back on after a power cut?
Disk integrity. Are your partitions using journalled write buffers? Are RAID cards using battery backed write buffers?
Are you applications saving stuff automatically?
So we can look at software and I'd certainly make sure things you use a lot are doing autosaves, but if you're in a situation where failure is likely, I'd seriously recommend sticking a battery between the computer and the grid.
You can configure Ubuntu to suspend on power failure. For most desktops this means you can get many hours of suspend. That's usually enough to get you through all but the worst power cuts and if that looks likely, you might have enough power to resume and save what you need.