converts a spaCy object into a pandas DataFrame
pip install spacy2df
Tested against Windows 10 / Python 3.10 / Anaconda
import spacy
from spacy2df import spacy2df
# Load Spacy model and create a doc object
nlp = spacy.load(pt_core_news_sm)
frase = Rede do Banco Itaú é bom
doc = nlp(frase)
# Convert the doc object to a DataFrame
df = spacy2df(doc, colprefix='aa_')
print(df)
aa_dep aa_doc aa_ent_id aa_ent_iob aa_ent_kb_id aa_ent_type aa_has_vector aa_head aa_is_alpha aa_is_ascii aa_is_bracket aa_is_currency aa_is_digit aa_is_left_punct aa_is_lower aa_is_oov aa_is_punct aa_is_quote aa_is_right_punct aa_is_sent_end aa_is_sent_start aa_is_space aa_is_stop aa_is_title aa_is_upper aa_lang aa_left_edge aa_lemma aa_like_email aa_like_num aa_like_url aa_lower aa_n_lefts aa_n_rights aa_morph aa_norm aa_orth aa_pos aa_prefix aa_rank aa_right_edge aa_sent aa_sent_start aa_sentiment aa_shape aa_suffix aa_tag aa_ancestors aa_children aa_lefts aa_rights aa_subtree aa_iob_strings morph_Gender morph_Number morph_Definite morph_PronType morph_Mood morph_Person morph_Tense morph_VerbForm
0 nsubj Rede do Banco Itaú é bom O True bom True True False False False False False True False False False False True False False True False pt Rede rede False False False rede 0 True {'Gender' 'Fem', 'Number' 'Sing'} rede Rede PROPN R 18446744073709551615 Itaú (Rede, do, Banco, Itaú, é, bom) False 0.0 Xxxx ede PROPN (bom,) (Banco,) () (Banco,) (Rede, do, Banco, Itaú) (, I, O, B) Fem Sing NA NA NA NA NA NA
1 case Rede do Banco Itaú é bom O True Banco True True False False False False True True False False False False False False True False False pt do de o False False False do 0 False {'Definite' 'Def', 'Gender' 'Masc', 'Number' 'Sing', 'PronType' 'Art'} do do ADP d 18446744073709551615 do (Rede, do, Banco, Itaú, é, bom) -1 0.0 xx do ADP (Banco, Rede, bom) () () () (do,) (, I, O, B) Masc Sing Def Art NA NA NA NA
2 nmod Rede do Banco Itaú é bom B LOC True Rede True True False False False False False True False False False False False False False True False pt do Banco False False False banco 1 True {'Gender' 'Masc', 'Number' 'Sing'} banco Banco PROPN B 18446744073709551615 Itaú (Rede, do, Banco, Itaú, é, bom) -1 0.0 Xxxxx nco PROPN (Rede, bom) (do, Itaú) (do,) (Itaú,) (do, Banco, Itaú) (, I, O, B) Masc Sing NA NA NA NA NA NA
3 flatname Rede do Banco Itaú é bom I LOC True Banco True False False False False False False True False False False False False False False True False pt Itaú Itaú False False False itaú 0 False {'Number' 'Sing'} itaú Itaú PROPN I 18446744073709551615 Itaú (Rede, do, Banco, Itaú, é, bom) -1 0.0 Xxxx taú PROPN (Banco, Rede, bom) () () () (Itaú,) (, I, O, B) NA Sing NA NA NA NA NA NA
4 cop Rede do Banco Itaú é bom O True bom True False False False False False True True False False False False False False True False False pt é ser False False False é 0 False {'Mood' 'Ind', 'Number' 'Sing', 'Person' '3', 'Tense' 'Pres', 'VerbForm' 'Fin'} é é AUX é 18446744073709551615 é (Rede, do, Banco, Itaú, é, bom) -1 0.0 x é AUX (bom,) () () () (é,) (, I, O, B) NA Sing NA NA Ind 3 Pres Fin
5 ROOT Rede do Banco Itaú é bom O True bom True True False False False False True True False False False True False False True False False pt Rede bom False False False bom 2 False {'Gender' 'Masc', 'Number' 'Sing'} bom bom ADJ b 18446744073709551615 bom (Rede, do, Banco, Itaú, é, bom) -1 0.0 xxx bom ADJ () (Rede, é) (Rede, é) () (Rede, do, Banco, Itaú, é, bom) (, I, O, B) Masc Sing NA NA NA NA NA NA
Metadata
Release files for spacy2df 0.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| spacy2df-0.10.tar.gz | 7.7 kB | Without provenance | Details for spacy2df-0.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| spacy2df-0.10-py3-none-any.whl | Python 3 | none | any | Details for spacy2df-0.10-py3-none-any.whl |
Total release size: 17.4 kB
Release files / spacy2df-0.10.tar.gz
| Download URL | spacy2df-0.10.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b594071e8c19a79e140801f0c54d9c5a678a1c530d4eff821b9793548e6aec3f
|
|
BLAKE2b-256 checksum How to use checksums |
b217d0336c628d4d1ad8c6285f975b0e028ec470ad379c2bc2756a261c188472
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Release files / spacy2df-0.10-py3-none-any.whl
| Download URL | spacy2df-0.10-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3d0658cffa4779e2753e5b75d0c9c5c2e2e3b82296d478654f5f27944336e936
|
|
BLAKE2b-256 checksum How to use checksums |
d8e5cab8dc449e40e62df27e34019d705bd17e1de312e74b37a7460cb5ce3103
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.10
|
Security for spacy2df 0.10
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.