![]() |
omorfi 0.9.9
Open morphology of Finnish
|
Public Member Functions | |
def | __init__ (self) |
def | __getitem__ (self, index) |
def | __str__ (self) |
def | get_sentence (self, index) |
def | add (self, tokens) |
def | write (self, f) |
Static Public Member Functions | |
def | read (f) |
Data Fields | |
tokens | |
underlying raw omor analysis | |
sents | |
sentences | |
Doc contains tokens consisting a text or corpus. Doc is typically e.g. one file tokenised and/or parsed. Contains tokens, which make up sentences and stuff.
def omorfi.doc.Doc.__init__ | ( | self | ) |
Create an empty document
def omorfi.doc.Doc.__getitem__ | ( | self, | |
index | |||
) |
Just pick token from the list.
def omorfi.doc.Doc.add | ( | self, | |
tokens | |||
) |
Add tokens to the documentation. Adds sentences if they are separated by proper nontokens.
def omorfi.doc.Doc.get_sentence | ( | self, | |
index | |||
) |
Get a sentence from doc. If doc contains nontokens separating sentences...
|
static |
Reads self from a file-like object.
def omorfi.doc.Doc.write | ( | self, | |
f | |||
) |
Writes self in some format into a file-like object. Experimental.