Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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]