parsing - how can I extract proper nouns from a string using PHP or JavaScript? -


How can I remove the correct name / numeric value from a string using PHP or Javascript? Example

Xyz This page was visited on 53 mins ago.

I want to be able to identify "proper noun and numerical" as "Xyz" and "53" respectively

There is a clear way

But I feel that you guess from grammar that a word is a proper noun. / P>

I can not think of it in any correct way, but if you make a series of rules, you can use them to parse a path.

The rules may be included. * Words that end with ly are not a proper noun * Noise words such as, and, from, but etc. are not proper nouns * Words that have large letters but do not start sentences

To improve this you can use these rules to make a dictionary of appropriate rules. Every time a word follows one of these rules, then it is added or removed as a proper noun dictionary.

It is very difficult - if it is on the right path, then I can be more specific.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -