1
$\begingroup$

In lists the main noun is often only mentioned at the end. However, for e.g. NER-tasks, I would like to "expand" them:

  • Outward and return flight -> outward flight and return flight
  • Proboscis, Vervet, and golden snub-nosed monkey -> Proboscis monkey, Vervet monkey, and golden snub-nosed monkey
  • education in mathematics or physics -> education in mathematics or education in physics

Are there already tools out there (bonus points for support of German language)? Google only led me to expanding contractions ("I've" -> "I have")...

$\endgroup$

1 Answer 1

1
$\begingroup$

In general this is related to syntactic analysis: one needs to obtain a parse tree of the noun phrase, then it's possible to expand by mapping the head of the phrase with the different parts of the conjunction.

I think you can find dependency parsers for German, for instance in the NLTK library or Spacy.

I don't know if you would find a library which provides precisely the expansion though, I would expect that there is a bit of programming to do from the parse tree.

$\endgroup$
2
  • $\begingroup$ Thanks a lot, I'll look into it! I'm a bit surprised that no library exists for this yet. Isn't such an expansion a common problem? $\endgroup$
    – gebbissimo
    Commented Aug 30, 2021 at 8:27
  • 1
    $\begingroup$ @gebbissimo As far as I know it's not that common, but as usual I don't know everything! The main application for this would be relationship extraction (see also here). But it's a much more general and complex problem so I'm not sure it's relevant to your case. $\endgroup$
    – Erwan
    Commented Aug 30, 2021 at 14:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.