Commit 9a6169dc authored by Arkadiusz Janz's avatar Arkadiusz Janz

Update README.md

parent 39569c57
# cclutils
A convenient API based on Corpus2 library for reading, writing, and processing
textual corpora represented as CCL (XML) documents.
\ No newline at end of file
textual corpora represented as CCL (XML) documents.
#### IO
###### Read CCL file
```python
import cclutils
filepath = './example.xml'
document = cclutils.read(filepath)
```
###### Read CCL with relations (REL file):
```python
cclpath = './example.xml'
relpath = './exampel.rel.xml'
document = cclutils.read(cclpath, relpath)
```
###### Specify tagset
```python
document = cclutils.read(cclpath, relpath, 'nkjp')
```
###### Write CCL
```python
document = cclutils.read(filepath)
...
cclutils.write(document, './out.xml')
```
or with relations:
```python
cclutils.write(document, './out.xml', rel_path='./out.rel.xml')
```
specify the tagset:
```python
cclutils.write(document, './out.xml', rel_path='./out.rel.xml', tagset='spacy')
```
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment