seatgeek/soulmate — pull request #23 by mootpointer (2012-04-02 01:17:14+00:00)
Title: Add the ability to match on phrase instead of word.

There are some cases where it is require to match exact phrases and not
words. Thus I have created a PhraseLoader and PhraseMatcher for the
purpose of working with phrases.

That means that if you have the phrase "awesome stuff", the term "awes"
will match, but the term "stuf" will not.

I have not yet enabled phrase loading through the CLI, only by
explicitly loading with a PhraseLoader class. The PhraseLoader has an
identical interface to the standard Loader, it just refrains from
normalising anything, because that gets messy with phrases.

When it comes to matching, supplying phrase=true as part of the query
string will tell the Soulmate::Server to use the PhraseMatcher, and
successfully match the loaded phrases.