QNLP
v1.0
__init__.py
Go to the documentation of this file.
1
name =
"tagging"
2
import
nltk
3
import
sys
4
import
numpy
as
np
5
6
from
collections
import
Counter
7
from
nltk.corpus
import
stopwords
8
9
from
QNLP.tagging.word_types
import
Noun
10
from
QNLP.tagging.word_types
import
Verb
11
from
QNLP.tagging.word_types
import
Sentence
12
13
import
QNLP.tagging.tag_file
14
15
__all__ = [
"word_types"
,
"tag_file"
]
16
17
"""
18
Reduces the nltk/spacy types to simplified types defined above
19
"""
20
def
matchables
(classType, tag):
21
if
isinstance(classType, Noun)
or
classType
is
Noun:
22
return
tag
in
[
"NN"
,
"NNS"
,
"NNP"
,
"NNPS"
,
"NOUN"
,
"PROPN"
]
23
elif
isinstance(classType, Verb)
or
classType
is
Verb:
24
return
tag
in
[
"VB"
,
"VBD"
,
"VBG"
,
"VBN"
,
"VBP"
,
"VBZ"
,
"VERB"
]
25
else
:
26
return
False
QNLP.tagging.word_types
Definition:
word_types.py:1
QNLP.tagging.matchables
def matchables(classType, tag)
Definition:
__init__.py:20
QNLP.tagging.tag_file
Definition:
tag_file.py:1
intel-qnlp-rc2
modules
py
pkgs
QNLP
tagging
__init__.py
Generated by
1.8.15