Run MOM for verbs and nouns together

In the example config file for MOM there is this line:

pos: verb # Which pos tag to call MOM on, if called directly via MOM's main. Does not have any effect on calling MOM from other main functions.

Is there a way to run it such that it outputs both the verb and noun position classes together in one Choices file in one run?

I tried:

pos: verb, noun and pos: verb noun but neither worked.

1 Like

Yes there is; that’s what Kristen did for her dissertation. She should have a repro script paired with a config file which shows how MOM should be called for such a result.

It may be the case that you need to have a little wrapper program for this to happen and an individual MOM run is just for one POS tag. I do not actually remember. In my time, I had a wrapper program but it is possible that Kristen has changed that since then. So start in her code and post more questions here!

I found the following way of doing it:

settings.pos = 'verb'
mom_verb_choices = run_mom(settings,xigt_reader,agr_morphemes=agr_morphemes)
settings.pos = 'noun'
mom_noun_choices = run_mom(settings,xigt_reader)
choices = Choices.build_matrix_choices(mom_verb_choices.lexicon,mom_noun_choices.lexicon, settings)

and see here for complete code.