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

Possible to get parse tree output similar to AllenNLP? #11

Open
julianvenhuizen opened this issue Feb 23, 2022 · 3 comments
Open

Possible to get parse tree output similar to AllenNLP? #11

julianvenhuizen opened this issue Feb 23, 2022 · 3 comments

Comments

@julianvenhuizen
Copy link

Is it possible to have Alpino output the parse tree in the following format:

In: "Several theories about the higher prevalence in males have been investigated, but the cause of the difference is unconfirmed; one theory is that females are underdiagnosed."

Out: (S (S (S (NP (NP (JJ Several) (NNS theories)) (PP (IN about) (NP (NP (DT the) (JJR higher) (NN prevalence)) (PP (IN in) (NP (NNS males)))))) (VP (VBP have) (VP (VBN been) (VP (VBN investigated))))) (, ,) (CC but) (S (NP (NP (DT the) (NN cause)) (PP (IN of) (NP (DT the) (NN difference)))) (VP (VBZ is) (ADJP (JJ unconfirmed))))) (: ;) (S (NP (CD one) (NN theory)) (VP (VBZ is) (SBAR (IN that) (S (NP (NNS females)) (VP (VBP are) (ADJP (JJ underdiagnosed))))))) (. .))

This output is currently achieved through the use of AllenNLP and a minimal span-based neural constituency parser. However, as I'm also working with Dutch data I intend to use the Alpino parser. If the above output isn't conceivable I suspect I have to go over the XML output and work something out myself.

@gertjanvannoord
Copy link
Member

gertjanvannoord commented Feb 24, 2022 via email

@julianvenhuizen
Copy link
Author

Thank you. That does indeed look similar. Do you have any documentation on the meaning of the tags in your example? I am unable to find anything online. It would me help a lot if I were to 'translate' these tags to the Penn Treebank bracket labels used in my example output above.

@gertjanvannoord
Copy link
Member

gertjanvannoord commented Mar 2, 2022 via email

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

No branches or pull requests

2 participants