Skip to content

Commit

Permalink
Update Spacy.py
Browse files Browse the repository at this point in the history
  • Loading branch information
RubensZimbres authored Aug 7, 2018
1 parent 6ed8ff1 commit 2f5f7f5
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions NLP/Spacy.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
from gensim import corpora
documents = ["Interface máquina humana para aplicações computacionais de laboratório abc",
"Um levantamento da opinião do usuário sobre o tempo de resposta do sistema informático",
"O sistema de gerenciamento de interface do usuário EPS",
Expand All @@ -9,16 +8,8 @@
"Gráfico de menores IV Largura de árvores personalizadas e bem quase encomendado",
"Gráficos menores Uma pesquisa"]


stoplist = set('a e o para sobre'.split())
texts = [[word for word in document.lower().split() if word not in stoplist]
for document in documents]
texts=[[x.lower() for x in texts[i]] for i in range(0,9)]

long_words1 = [[w for w in texts[i] if len(w)>3] for i in range(0,9)]

from nltk.stem import WordNetLemmatizer
lemmatizer = WordNetLemmatizer()
# from nltk.stem import WordNetLemmatizer
# lemmatizer = WordNetLemmatizer()

import spacy
from spacy.lang.pt.examples import sentences
Expand Down

0 comments on commit 2f5f7f5

Please sign in to comment.