forked from kristjan/cjvt-valency
parent
d1dea2e22e
commit
da460f74f1
@ -0,0 +1,6 @@
|
||||
F0034713.20.1": [{"dep": "7", "arg": "REC", "from": "9"}, {"dep": "10", "arg": "ACT", "from": "9"}, {"dep": "13", "arg": "MWPRED", "from": "12"}, {"dep": "18", "arg": "MANN", "from": "19"}, {"dep": "20", "arg": "LOC", "from": "19"}]
|
||||
|
||||
Sentence:
|
||||
F0034713.20.0
|
||||
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
||||
Sodobni ali preprosto neosveščeni potrošnik vse prerad zavrže stvar, ki se je malenkostno pokvarila in bi se jo zlahka dalo popraviti.
|
@ -1 +1 @@
|
||||
/home/kristjan/kres_srl/final_json/
|
||||
/home/voje/work_data/final_json
|
@ -0,0 +1 @@
|
||||
/home/kristjan/kres_srl/final_json/
|
@ -0,0 +1,38 @@
|
||||
# corpusparser
|
||||
A tool for parsing ssj500k and Kres into a unified .json format.
|
||||
|
||||
## Input:
|
||||
### ssj500k
|
||||
To parse ssj500k, point to the monolythic `ssj500k-sl.body.xml` file (tested on ssj500k 2.1).
|
||||
|
||||
### Kres
|
||||
To parse Kres, point to folders:
|
||||
* Kres folder, containig several (around 20K) .xml files (`F00XXXXX.xml.parsed.xml`).
|
||||
* Kres SRL folder, containing SRL links for the corresponding F00...xml files (`F00XXXXX.srl.json`).
|
||||
|
||||
## Internal data format
|
||||
This is the internal python dict data format. It can be stored to file as `.json` or stored into a database for application usage.
|
||||
```python
|
||||
{
|
||||
'sid': 'F0034713.5.0',
|
||||
'text': 'Mednarodni denarni sklad je odobril 30 milijard evrov vredno posojilo Grčiji. ',
|
||||
'tokens': [
|
||||
{'text': 'Mednarodni', 'lemma': 'mednaroden', 'msd': 'Ppnmeid', 'word': True, 'tid': 1},
|
||||
{'text': 'denarni', 'lemma': 'denaren', 'msd': 'Ppnmeid', 'word': True, 'tid': 2},
|
||||
{'text': 'sklad', 'lemma': 'sklad', 'msd': 'Somei', 'word': True, 'tid': 3},
|
||||
{'text': 'je', 'lemma': 'biti', 'msd': 'Gp-ste-n', 'word': True, 'tid': 4},
|
||||
{'text': 'odobril', 'lemma': 'odobriti', 'msd': 'Ggdd-em', 'word': True, 'tid': 5},
|
||||
{'text': '30', 'lemma': '30', 'msd': 'Kag', 'word': True, 'tid': 6},
|
||||
{'text': 'milijard', 'lemma': 'milijarda', 'msd': 'Sozmr', 'word': True, 'tid': 7}, # ...
|
||||
]
|
||||
'jos_links': [
|
||||
{'to': 1, 'from': 3, 'afun': 'dol'},
|
||||
{'to': 2, 'from': 3, 'afun': 'dol'},
|
||||
{'to': 3, 'from': 5, 'afun': 'ena'}, # ...
|
||||
]
|
||||
'srl_links': [
|
||||
{'to': 3, 'from': 5, 'afun': 'ACT'},
|
||||
{'to': 7, 'from': 5, 'afun': 'PAT'}
|
||||
]
|
||||
}
|
||||
```
|
@ -1,3 +0,0 @@
|
||||
class Sentence():
|
||||
def __init__():
|
||||
print("Sentence __init__(): TODO")
|
@ -1,2 +1 @@
|
||||
from corpusparser.Parser import Parser
|
||||
from corpusparser.Sentence import Sentence
|
||||
from corpusparser.Parser import Parser
|
Loading…
Reference in new issue