Skip to content

Commit 1a78acc

Browse files
committed
Updated some of the code.
1 parent 62efcc0 commit 1a78acc

File tree

6 files changed

+23
-8
lines changed

6 files changed

+23
-8
lines changed

pyjsonnlp/__init__.py

+9-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/usr/bin/env python3
22

33
"""
4-
(C) 2019 Damir Cavar, Oren Baldinger, Maanvitha Gongalla, Anurag Kumar, Murali Kammili
4+
(C) 2020 by Semiring Inc., Damir Cavar
5+
6+
Contributions to earlier versions by Oren Baldinger, Maanvitha Gongalla, Anurag Kumar, Murali Kammili
57
68
Functions for manipulating and expanding a JSON-NLP object
79
@@ -14,7 +16,7 @@
1416
from typing import List
1517

1618
name = "pyjsonnlp"
17-
__version__ = "0.2.33"
19+
__version__ = "0.6"
1820

1921

2022
def get_base() -> OrderedDict:
@@ -27,6 +29,7 @@ def get_base() -> OrderedDict:
2729
return OrderedDict({
2830
"meta": {
2931
"DC.conformsTo": __version__,
32+
"DC.author": "",
3033
"DC.source": "", # where did the corpus come from
3134
"DC.created": datetime.datetime.now().replace(microsecond=0).isoformat(),
3235
"DC.date": datetime.datetime.now().replace(microsecond=0).isoformat(),
@@ -46,7 +49,6 @@ def get_base() -> OrderedDict:
4649
"counts": {},
4750
},
4851
"conll": {},
49-
#"documents": {}
5052
"documents": []
5153
})
5254

@@ -57,6 +59,7 @@ def get_base_document(doc_id: int) -> OrderedDict:
5759
return OrderedDict({
5860
"meta": {
5961
"DC.conformsTo": __version__,
62+
"DC.author": "",
6063
"DC.source": "", # where did the corpus come from
6164
"DC.created": datetime.datetime.now().replace(microsecond=0).isoformat(),
6265
"DC.date": datetime.datetime.now().replace(microsecond=0).isoformat(),
@@ -79,9 +82,9 @@ def get_base_document(doc_id: int) -> OrderedDict:
7982
"conllId": "",
8083
"text": "",
8184
"tokenList": [],
82-
#"clauses": {},
83-
"sentences": {},
84-
"paragraphs": {},
85+
"clauses": [],
86+
"sentences": [],
87+
"paragraphs": [],
8588
"dependencies": [],
8689
"coreferences": [],
8790
"constituents": [],

pyjsonnlp/dependencies.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
3+
"""
4+
15
from collections import OrderedDict, namedtuple
26
from typing import List, Union, Tuple, Dict
37

pyjsonnlp/pipeline.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
"""
2-
(C) 2019-2020 Damir Cavar, Oren Baldinger, Maanvitha Gongalla, Anurag Kumar, Murali Kammili
2+
(C) 2020 Damir Cavar, Oren Baldinger, Maanvitha Gongalla, Anurag Kumar, Murali Kammili
33
44
Interface for the NLP pipelines.
55
Licensed under the Apache License 2.0, see the file LICENSE for more details.

pyjsonnlp/tokenization.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
3+
"""
4+
15
from collections import OrderedDict
26
from typing import List
37

pyjsonnlp/unification.py

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
3+
"""
4+
15
from collections import OrderedDict
26
from typing import List
37

pyjsonnlp/validation.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""
22
validator.py
33
4-
(C) 2019 Oren Baldinger, Damir Cavar
4+
(C) 2020 Oren Baldinger, Damir Cavar
55
66
Validates the results of pipelines against the NLP-JSON schema.
77
"""

0 commit comments

Comments
 (0)