Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Keyword/keyphrase extraction from text [closed]

I am working on a project where I need to extract "technology related keywords/keyphrases" from text. For example, my text is:

"ABC Inc has been working on a project related to machine learning which makes use of the existing libraries for finding information from big data."

The extracted keywords/keyphrase should be: {machine learning, big data}.

My text documents are stored as BSON documents in MongoDb.

What are the best nlp libraries(with sufficient documentation and examples) out there to perform this task and how?

Thanks!

like image 297
Surbhi Singh Avatar asked Mar 13 '18 18:03

Surbhi Singh


People also ask

How does keyphrase extraction work?

Keyword extraction uses machine learning artificial intelligence (AI) with natural language processing (NLP) to break down human language so that it can be understood and analyzed by machines.

Why is Keyphrase extracted?

Keyword/Keyphrase extraction is the task of extracting important words that are relevant to the underlying document. It lets you to enable faster search over documents by indexing them as document alias and are even helpful in categorizing a given piece of text for these central topics.


1 Answers

It looks you need to narrow down more than just keywords/key phrases and find the subject and object per sentence. For subject/object recognition, I recommend the Stanford Parser or the Google Language API, where you send a string and get a dependency tree response.

You can test the Google API first to see if it works well with your corpus: https://cloud.google.com/natural-language/

The outcome here is a subject predicate object (SPO) triplet, where your predicate describes the relationship. You'll need to traverse the dependency graph and write a script to parse out the triplet.

Other Packages: I use NLTK, Spacy, and Textblob frequently. If the corpus is simple, generic, and straightforward, Spacy and Textblob work well OOTB. If the corpus is highly customized, domain-specific, messy (incorrect spelling or grammar), etc. I'll use NLTK and spend more time customizing my NLP text processing pipeline with scrubbing, lemmatizing, etc. You may want to add your own custom dictionary of technology related keywords and keyphrases so that your parser can catch these if you decide to go with one of these packages.

NLTK Tutorial: http://www.nltk.org/book/

Spacy Quickstart: https://spacy.io/usage/

Textblob Quickstart: http://textblob.readthedocs.io/en/dev/quickstart.html

like image 58
saucy wombat Avatar answered Nov 15 '22 08:11

saucy wombat