How to use the prosodic.dicts.fi.finnish_annotator.Annotation function in prosodic

To help you get started, we’ve selected a few prosodic examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github quadrismegistus / prosodic / prosodic / dicts / fi / finnish_annotator.py View on Github external
def make_annotation(word):
    words = [word]
    words = split_initial_compounds(words)
    words = words[:-1] + words[-1].split(ORTHOGRAPHIC_COMPOUND_MARKER)
    words = split_suffix(words)
    words = split_preannotated_compounds(words)
    annotations = [Annotation(word) for word in words]

    for i in range(1, len(annotations)):
        annotations[0].join(annotations[i])

    return annotations[0]