Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/liamca/noun-phrase-extraction
Noun Phrase Extraction of text (Key Phrase Extraction)
https://github.com/liamca/noun-phrase-extraction
keyphrase-extraction noun-phrase-extract
Last synced: about 2 months ago
JSON representation
Noun Phrase Extraction of text (Key Phrase Extraction)
- Host: GitHub
- URL: https://github.com/liamca/noun-phrase-extraction
- Owner: liamca
- License: mit
- Created: 2022-11-11T15:55:06.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2022-11-11T18:50:23.000Z (about 2 years ago)
- Last Synced: 2023-08-15T06:07:04.611Z (over 1 year ago)
- Topics: keyphrase-extraction, noun-phrase-extract
- Language: Python
- Homepage:
- Size: 17.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Noun Phrase Extraction of Text (Key Phrase Extraction)
This code will extract all of the single word nouns along with any noun phrases that can be found.
These words and phrases are lemmatized and any stop words are removed.It is based primarily on Spacy and NLTK libraries.
## Extract Noun Phrase split by Sentence
```
import npe
text = "The quick brown foxes jumped over the lazy dogs. This is a second sentence with the phrase Azure Cognitive Search. "
npe.noun_phrase_by_sentence(text)
```Output:
```
[['dog', 'fox', 'quick', 'quick_brown_fox', 'brown', 'lazy', 'lazy_dog'],
['azure_cognitive_search',
'search',
'azure',
'second',
'cognitive',
'phrase',
'sentence',
'second_sentence']]
```## Extract Noun Phrase split by Passage
```
import npe
text = "The quick brown foxes jumped over the lazy dogs. This is a second sentence with the phrase Azure Cognitive Search. "
npe.noun_phrase_by_passage(text)
```Output:
```
[['second',
'quick_brown_fox',
'lazy_dog',
'lazy',
'second_sentence',
'azure_cognitive_search',
'sentence',
'dog',
'brown',
'quick',
'azure',
'cognitive',
'fox',
'search',
'phrase']]
```