Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VocabTextLexiconParser for simple text-based lexica #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

larissakl
Copy link
Contributor

Support for simple text lexica containing the vocabulary/list of lemmas.
This is can for example be used in the Lexiconfree beam search (#101) for which the XML-format is unnecessarily complicated.
Instead of an XML-lexicon, one can use a txt-file containing one label per line.
For example

A
B
C

will be parsed to a Bliss Lexicon equivalent to

<?xml version="1.0" ?>
<lexicon>
  <phoneme-inventory>
    <phoneme>
      <symbol>A</symbol>
      <variation>none</variation>
    </phoneme>
    <phoneme>
      <symbol>B</symbol>
      <variation>none</variation>
    </phoneme>
    <phoneme>
      <symbol>C</symbol>
      <variation>none</variation>
    </phoneme>
    <phoneme>
 </phoneme-inventory>
  <lemma>
    <orth>A</orth>
    <phon>A</phon>
  </lemma>
  <lemma>
    <orth>B</orth>
    <phon>B</phon>
  </lemma>
  <lemma>
    <orth>C</orth>
    <phon>C</phon>
  </lemma>
</lexicon>

@larissakl larissakl requested review from SimBe195 and curufinwe March 5, 2025 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant