Use spaCy to Parse Input Tokens
Project description
spaCy Token Parser (spacy-token-parser)
Use spaCy to Parse Input Tokens
Usage
Call the service with this code
from spacy_token_parser import parse_tokens
parse_tokens(input_text.split())
The output is a tuple.
The first element of the tuple is a list of dictionary tokens (below).
The second element of the tuple is a wrapped instance of spacy.tokens.doc.Doc
.
List Output
[
{
"dep":"compound",
"ent":"NORP",
"head":"5665575797947403677",
"id":"6042939320535660714",
"is_alpha":true,
"is_punct":false,
"is_stop":false,
"is_wordnet":true,
"lemma":"american",
"noun_number":"singular",
"other":{
"head_i":3,
"head_idx":24,
"head_orth":5665575797947403677,
"head_text":"films",
"i":0,
"idx":0,
"orth":6042939320535660714
},
"pos":"PROPN",
"sentiment":0.0,
"shape":"xxxx",
"tag":"NNP",
"tense":"",
"text":"american",
"verb_form":"",
"x":0,
"y":8
},
{
"dep":"compound",
"ent":"",
"head":"5665575797947403677",
"id":"16602643206033239142",
"is_alpha":true,
"is_punct":false,
"is_stop":false,
"is_wordnet":true,
"lemma":"silent",
"noun_number":"singular",
"other":{
"head_i":3,
"head_idx":24,
"head_orth":5665575797947403677,
"head_text":"films",
"i":1,
"idx":9,
"orth":16602643206033239142
},
"pos":"PROPN",
"sentiment":0.0,
"shape":"xxxx",
"tag":"NNP",
"tense":"",
"text":"silent",
"verb_form":"",
"x":8,
"y":14
},
{
"dep":"compound",
"ent":"",
"head":"5665575797947403677",
"id":"16417888112635110788",
"is_alpha":true,
"is_punct":false,
"is_stop":false,
"is_wordnet":true,
"lemma":"feature",
"noun_number":"singular",
"other":{
"head_i":3,
"head_idx":24,
"head_orth":5665575797947403677,
"head_text":"films",
"i":2,
"idx":16,
"orth":16417888112635110788
},
"pos":"NOUN",
"sentiment":0.0,
"shape":"xxxx",
"tag":"NN",
"tense":"",
"text":"feature",
"verb_form":"",
"x":14,
"y":21
},
{
"dep":"ROOT",
"ent":"",
"head":"5665575797947403677",
"id":"5665575797947403677",
"is_alpha":true,
"is_punct":false,
"is_stop":false,
"is_wordnet":true,
"lemma":"film",
"noun_number":"plural",
"other":{
"head_i":3,
"head_idx":24,
"head_orth":5665575797947403677,
"head_text":"films",
"i":3,
"idx":24,
"orth":5665575797947403677
},
"pos":"NOUN",
"sentiment":0.0,
"shape":"xxxx",
"tag":"NNS",
"tense":"",
"text":"films",
"verb_form":"",
"x":21,
"y":26
}
]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
spacy-token-parser-0.1.14.tar.gz
(10.1 kB
view hashes)
Built Distribution
Close
Hashes for spacy-token-parser-0.1.14.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d88a0cfcfaf8fe2d84f0b2aa82bbde3369e5a0b40a5f7ac105d1275f6f45af5f |
|
MD5 | 0998e98d62feb7ef9db930bf0ff84abd |
|
BLAKE2b-256 | 9eb58f66166c53284db88450b82e036c1d3b35b741c0aa768421842553e503b2 |
Close
Hashes for spacy_token_parser-0.1.14-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a55cbcd2af5d001f4baf157d4e72809aab138383dfa3692da4f81dcb57a05741 |
|
MD5 | adafc733649781c587ce7059e6385651 |
|
BLAKE2b-256 | 31f8aaecc3b742d9d9aa5006ce515a446d0a001c0b4111d8000a04ddbedc96cb |