Loading [MathJax]/jax/input/TeX/config.js
QNLP
v1.0
Main Page
+
Namespaces
Namespace List
+
Namespace Members
+
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
p
r
s
t
u
v
w
x
y
Functions
+
Variables
_
a
b
c
d
e
f
h
i
j
k
l
m
n
p
r
s
t
u
v
w
x
y
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
+
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
w
~
+
Variables
a
b
c
d
e
g
h
i
l
m
n
o
p
q
r
s
t
u
v
x
y
z
Typedefs
Related Functions
+
Files
File List
+
Globals
+
All
c
d
e
i
m
p
q
s
t
u
+
Functions
c
e
i
m
p
s
t
Typedefs
Enumerations
Enumerator
Macros
•
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
__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