Best approach for text analysis in PHP?

I need to analyze the user's message and classify it. For example: I have to classify each post as “buy” or “sell” mail based on the text - “I am looking to sell my house”, which is classified as “sell”. The problem is that it is often not so simple - “I am looking to get rid of my old house” must also be classified as “sell”. "I am looking for a home" becomes "buy." I would also like to classify these positions on the basis of this issue - for example, the above position will be categorized as “purchase” and “house”.

Can anyone recommend a good approach / good structure / technique when it comes to analyzing and understanding user input? Thanks.

+1
source share
2 answers

You're right; it's hard to do.

Yahoo! has a Term Extraction API / web service that you can use. This is a pretty good way to use language analysis on your own text without writing a million lines of code to do it yourself. I have not used it, so I have no idea how well it works with similar values, as your question asks.

+2
source

, , , . . . .

+3

All Articles