Microsoft, the software giant flush with billions of dollars in its warchest, has agreed to buy Silicon Valley semantic search engine Powerset, we’ve learned.

The purchase price is rumored to be slightly more than $100 million. An announcement is expected next month.

Powerset, of San Francisco, has developed a technology that attempts to understand the full meanings of phrases you type in while searching, and it returns results based on that understanding.

By buying Powerset, Microsoft is hoping to close the perceived quality gap with Google’s search engine. The move comes as Microsoft CEO Steve Ballmer continues to argue that improving search is Microsoft’s most important task. Microsoft’s market share in search has steadily declined, dropping further and further behind first-place Google and second place Yahoo.

Google has generally dismissed Powerset’s semantic, or “natural language” approach as being only marginally interesting, even though Google has hired some semantic specialists to work on that approach in limited fashion. Google’s search results are still based primarily on the individual words you type into its search bar, and its approach does very little to understand the possible meaning created by joining two or more words together.

That’s where Powerset sees an opportunity for growth, and perhaps where Microsoft finally sees a chance to get a quality edge. However, Powerset’s technology has remained controversial to people within the industry because, while sexy in theory, the natural language approach is difficult to pull off in practice. Skeptics wonder if the technology can ever be developed enough to be useful within a major search engine. That skepticism abounded during a long secretive stage in Powerset’s development, but the company did launch its service last month to the public, so it’s there for full view. You can use it to search for items within Wikipedia, and we’ve previously outlined various instances where it can be useful.

The Microsoft purchase appears to validate Powerset’s technology, though the amount of the purchase is clearly less than Powerset’s investors had originally hoped for. Powerset was valued at a whopping $42.5 million after the first round of financing two years ago. At the time, investors expected that new technology it was acquiring from PARC would help it make significant breakthroughs. However, the technology has taken longer to develop than expected. Powerset was also burning cash at a fast rate, and so a purchase at $100 million is considered a safe result for an area that is also seeing increasing competition (players such as Hakia, Twine and TextDigger are all using similar approaches).

Rumors of Microsoft’s interest in Powerset first surfaced a month ago in a piece by CNET’s Dan Farber.

The deal does make sense for Microsoft, which has been trying to figure out its strategy in search since the rebuff of its purchase offer by Yahoo. Many analysts saw Yahoo’s advertising platform, not its search technology, as the main reason for Microsoft’s interest. However, Microsoft was left with $50 billion burning a hole in its pocket, and making technology acquisitons makes sense. Also, Yahoo’s search technology is one reason why its ad business is so vibrant. “The most important application for the foreseeable future is search,” Microsoft’s Ballmer said last week. “We don’t have to dominate, but we’d better have a darn good chunk of the search market over time, and we’re working away at it.” Microsoft also recently rolled out a new “Cashback” program that offers cash back to users of its Live Search engine.

Microsoft spokesman Doug Free declined comment, saying the company does “not comment on rumors or speculation.”

Powerset chief executive Barney Pell declined comment. He’s believed to own about a third of the company. The rest is owned by investors, his two cofounders and other employees. Foundation Capital and the Founders Fund are the main investors. A shakeup last year saw one of the founders, Steve Newcomb, leave the company.

In an interview, Pell said the company remains focused on developing its service and is proud of its new application for the iPhone. He said some people have provided feedback that Powerset’s iPhone application is even more useful than the Web version. Things are so broken on the mobile web that improvements in interface such as Powerset’s search are “transformatively better on mobile devices,” he said.

In response to our question about how Google is planning to use semantics, if at all, Google gave a very similar answer to the one Google’s Director of Research Peter Norvig provided last year.

Norvig was on vacation this week, but a spokeswoman reiterated:

1. Search remains at the core of everything Google does and we are always working to improve it. We are more focused on search innovation, and have more engineers working on search than ever before. As Peter said, “We do what’s best for users now, and over the longer-term, we investigate technologies that will help in the future.” 2. I think it’s important to first note that semantic search is very broad and means different things to different people. As Peter mentioned in his interview with you, there are a couple of examples we can point out that incorporate a form of semantic search: – Fill-in-the-blank search (see here).

– Question answering (see here; it gives a factual answer at the top of the page).

[Check out MobileBeat, our mobile conference on July 24. Early bird tickets end tomorrow. Vote for your favorite mobile application or service company.]