I am building an app that analyzes posts by people by pulling their Tweets and Facebook posts. I need to process all the posts and find useful phrases. What I mean by useful is that, any word or phrase that is a noun/adjective/verb that would represent a discrete object or an idea, or in other words, I am looking for keywords.
For example, if someone has posted those three posts (in a very simple sense):
i am a big fan of progressive metal music! it is fantastic!
Look what I've found: a new Progressive Metal band!
a good genre in music is progressive metal
Analyzing those simple examples, I need to extract
progressive metal and
music with the highest occurrence rank. But if I pass the occurrences of words simply, I'll be getting
I as the most common words. If I get away with the propositions, then I'll be getting single words such as
music. What I really need is to get phrases such as
progressive metal, or
progressive metal music, which together actually make sense. As a word,
metal have other meanings, but the phrase
progressive metal defines a musical genre, which has nothing to do with the single words themselves. Iteratively searching occurrence of every possible phrase in all the posts (e.g. first search
i in all posts, then
i am, then
i am a etc.) is computationally extremely expensive and is not an option.
I've looked at some similar questions:
But both are overkills, solving (or trying to solve) more general problems. My problem is more specific and I'm thinking of a simpler solution that doesn't involve NLP. An idea one might come up with is to compare the posts against a valid word/phrase list, but people might be talking about a brand related name, or a specific event, that are not available in a dictionary, such as
Twitter API, or
death of Michael Jackson.
I am currently evaluating posts against the user's Facebook likes, which makes a good dictionary of valid phrases about the user, but it fails when we are on Twitter, without the notion of "likes", hence, no valid dictionary. Is there any simple way of checking occurrence of valıd terms in a large array of sentences? (not necessarily grammatically correct)
UPDATE: It's an iOS app so I'm in Objective-C, to keep in mind in library recommendations.