Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
7d22fefd
Commit
7d22fefd
authored
Feb 13, 2020
by
Julien Chaumond
Browse files
[pipeline] Alias NerPipeline as TokenClassificationPipeline
parent
61a2b7dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
0 deletions
+4
-0
src/transformers/__init__.py
src/transformers/__init__.py
+1
-0
src/transformers/pipelines.py
src/transformers/pipelines.py
+3
-0
No files found.
src/transformers/__init__.py
View file @
7d22fefd
...
@@ -101,6 +101,7 @@ from .pipelines import (
...
@@ -101,6 +101,7 @@ from .pipelines import (
PipelineDataFormat
,
PipelineDataFormat
,
QuestionAnsweringPipeline
,
QuestionAnsweringPipeline
,
TextClassificationPipeline
,
TextClassificationPipeline
,
TokenClassificationPipeline
,
pipeline
,
pipeline
,
)
)
from
.tokenization_albert
import
AlbertTokenizer
from
.tokenization_albert
import
AlbertTokenizer
...
...
src/transformers/pipelines.py
View file @
7d22fefd
...
@@ -649,6 +649,9 @@ class NerPipeline(Pipeline):
...
@@ -649,6 +649,9 @@ class NerPipeline(Pipeline):
return
answers
return
answers
TokenClassificationPipeline
=
NerPipeline
class
QuestionAnsweringArgumentHandler
(
ArgumentHandler
):
class
QuestionAnsweringArgumentHandler
(
ArgumentHandler
):
"""
"""
QuestionAnsweringPipeline requires the user to provide multiple arguments (i.e. question & context) to be mapped
QuestionAnsweringPipeline requires the user to provide multiple arguments (i.e. question & context) to be mapped
...
...
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