Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nltk
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
nltk
Commits
e82cf0de
Commit
e82cf0de
authored
Mar 09, 2015
by
Long Duong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix Senna CI error message
parent
b62b6d15
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
nltk/classify/senna.py
+6
-8
No files found.
nltk/classify/senna.py
View file @
e82cf0de
...
@@ -27,19 +27,17 @@ The input is:
...
@@ -27,19 +27,17 @@ The input is:
- List of the operations needed to be performed.
- List of the operations needed to be performed.
- (optionally) the encoding of the input data (default:utf-8)
- (optionally) the encoding of the input data (default:utf-8)
>>> from __future__ import unicode_literals
>>> from nltk.classify import Senna
>>> from nltk.classify import Senna
>>> pipeline = Senna('/usr/share/senna-v2.0', ['pos', 'chk', 'ner'])
>>> pipeline = Senna('/usr/share/senna-v2.0', ['pos', 'chk', 'ner'])
>>> sent = 'Düsseldorf is an international business center'.split()
>>> sent = 'Dusseldorf is an international business center'.split()
>>> pipeline.tag(sent)
>>> [(token['word'], token['chk'], token['ner'], token['pos']) for token in pipeline.tag(sent)]
[{'word': 'D
\xfc
sseldorf', 'chk': 'B-NP', 'ner': 'B-PER', 'pos': 'NNP'},
[('Dusseldorf', 'B-NP', 'B-LOC', 'NNP'), ('is', 'B-VP', 'O', 'VBZ'), ('an', 'B-NP', 'O', 'DT'),
{'word': 'is', 'chk': 'B-VP', 'ner': 'O', 'pos': 'VBZ'},
('international', 'I-NP', 'O', 'JJ'), ('business', 'I-NP', 'O', 'NN'), ('center', 'I-NP', 'O', 'NN')]
{'word': 'an', 'chk': 'B-NP', 'ner': 'O', 'pos': 'DT'},
{'word': 'international', 'chk': 'I-NP', 'ner': 'O', 'pos': 'JJ'},
{'word': 'business', 'chk': 'I-NP', 'ner': 'O', 'pos': 'NN'},
{'word': 'center', 'chk': 'I-NP', 'ner': 'O','pos': 'NN'}]
"""
"""
from
__future__
import
unicode_literals
from
os
import
path
,
sep
,
environ
from
os
import
path
,
sep
,
environ
from
subprocess
import
Popen
,
PIPE
from
subprocess
import
Popen
,
PIPE
from
platform
import
architecture
,
system
from
platform
import
architecture
,
system
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment