Skip to content

Monosegmental Morphemes #31

@LinguList

Description

@LinguList

If I want to read a word from string now, the following situation will yield an unwanted result:

>>> Word.from_string("p a t + ia")
[['p', 'a', 't'], ['i', 'a']]

Instead, what I would expect would be:

>>> Word([x.split() for x in "p a t + ia".split(" + ")])
[['p', 'a', 't'], ['ia']]

A simple solution would be to add another subclass and to specify words then with specific morphemes. But it seems also odd to have the following situation now with the Morpheme class:

>>> Morpheme("pat")
['p', 'a', 't']
>>> str(Morpheme("pat"))
'p a t'

I remember we discussed this, but I wonder if there's a way to maybe pass an argument to the from_string method to allow for a Morpheme that would contain one segment consisting of multiple characters?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions