commit | da9c41126f573bb0cf8d55fdc3126931048a4874 | [log] [tgz] |
---|---|---|
author | Akron <nils@diewald-online.de> | Sat Mar 19 17:51:05 2022 +0100 |
committer | Akron <nils@diewald-online.de> | Sat Mar 19 17:51:05 2022 +0100 |
tree | b233d86d1f8ec74e9b87cbd90a73e5264e073e33 | |
parent | 93ff869c29a56fc0803a432e0c7d42bcefa5a0a1 [diff] [blame] |
Fix SpaCy to work with larger texts Change-Id: If7311168c0009c0f11556faf97fd7bd509cc088e
diff --git a/spacy/spacy_sent.py b/spacy/spacy_sent.py index b132b07..f9658bb 100644 --- a/spacy/spacy_sent.py +++ b/spacy/spacy_sent.py
@@ -20,8 +20,10 @@ with open(sys.argv[2], 'r') as f: contents = f.read() - doc = nlp(contents) + nlp.max_length = len(contents) + 100 + doc = nlp(contents, disable = ['ner']) + for sent in doc.sents: print(sent.text) print(" </eos> ")