You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Contributions from [Damir Cavar], [Oren Baldinger], [Maanvitha Gongalla], [Anurag Kumar], Murali Kammili, and others during 2019.
6
+
7
+
Brought to you by the [NLP-Lab.org]. New Maintainer since 2020 is [Semiring Inc.].
8
+
9
+
This new version now is 0.6 and it is no longer compatible with version 0.2.33. If you use the old JSON-NLP standard in your code, make sure you require version 0.2.33 of *pyjsonnlp*. This new version is compatible with the newest version of [Go JSON-NLP].
4
10
5
-
Brought to you by the [NLP-Lab.org]!
6
11
7
12
8
13
## Introduction
9
14
10
15
There is a growing number of Natural Language Processing (NLP) tools, modules, pipelines. There does not seem to be any standard for the output format. Here we are focusing on a standard for the output format syntax. Some future version of [JSON-NLP] might address the output semantics as well.
11
16
12
-
[JSON-NLP] is a standard for the most important outputs NLP pipelines and components can generate. The relevant documentation can be found in the [JSON-NLP] GitHub repo and on its website at the [NLP-Lab].
13
-
17
+
[JSON-NLP] is a standard for the most important outputs NLP pipelines and components can generate. The relevant documentation can be found in the [JSON-NLP] GitHub repo and on its website at the [NLP-Lab] and [Semiring Inc.].
14
18
15
19
The Python [JSON-NLP] module contains general mapping functions for [JSON-NLP] to [CoNLL-U], a validator for the generated output, an NLP pipeline interface (for [Flair], [spaCy], [NLTK], [Polyglot], [Xrenner], etc.), and various utility functions.
16
20
@@ -29,14 +33,17 @@ To install this package, run the following command:
29
33
30
34
You might have to use *pip3* on some systems.
31
35
36
+
32
37
## Validation
33
38
34
-
[JSON-NLP] is based on a schema, built by [NLP-Lab.org], to comprehensively and concisely represent linguistic annotations.
39
+
[JSON-NLP] is based on a schema, maintained by [NLP-Lab.org] and [Semiring Inc.], to comprehensively and concisely represent linguistic annotations.
40
+
35
41
We provide a validator to help ensure that generated JSON validates against the schema:
36
42
37
43
result = MyPipeline().proces(text="I am a sentence")
38
44
assert pyjsonnlp.validation.is_valid(result)
39
45
46
+
40
47
## Conversion
41
48
42
49
To enable interoperability with other annotation formats, we support conversions between them.
@@ -48,7 +55,8 @@ Currently we have a [CoNLL-U] to [JSON-NLP] converter, that covers most annotati
48
55
To convert the other direction:
49
56
50
57
pyjsonnlp.conversion.to_conllu(jsonnlp)
51
-
58
+
59
+
52
60
## Pipeline
53
61
54
62
[JSON-NLP] provides a simple `Pipeline` interface that should be implemented for embedding into a microservice:
@@ -68,10 +76,11 @@ deployed `Pipeline` via the `RemotePipeline` class:
print(pipeline.process(text='I am a sentence', dependencies=True, something='else'), spacing=2)
71
-
79
+
80
+
72
81
## Microservice
73
82
74
-
The next step is the [JSON-NLP] a Microservice class, with a pre-built implementation of [Flask].
83
+
The [JSON-NLP]as a Microservice class is only available in older versions of this module. Version 0.2.x is implemented as a Microsorvice with a pre-built implementation of [Flask].
75
84
76
85
from pyjsonnlp.microservices.flask_server import FlaskMicroservice
77
86
@@ -108,17 +117,21 @@ Other parameters specific to your pipeline implementation can be passed as well:
108
117
109
118
http://localhost:5000?lang=en&constituents=0&text=I am a sentence.
110
119
120
+
The current version 0.6 or newer does not support the [Flask]-based RESTful Microservice infrastructure. It is a pure [JSON-NLP] data structure, processor and converter.
0 commit comments