Skip to content

Enhanced semgrex #1298

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

Merged
merged 3 commits into from
Oct 17, 2023
Merged

Enhanced semgrex #1298

merged 3 commits into from
Oct 17, 2023

Conversation

AngledLuffa
Copy link
Collaborator

Add the ability to Semgrex to process and print out treebanks with enhanced graphs. There is also an option to use the Semgrex query over the enhanced graph, rather than using the basic dependencies. Needs a new CoreNLP release to be functional

Adds a method for adding a networkx graph as a DependencyGraph proto
Includes a test that the result on a simple graph is as expected

We then read in enhanced graphs, then send that graph to the CoreNLP semgrex rather than the basic dependencies

A couple specific changes:

When adding a token to a semgrex protobuf, add index for regular words, add index and emptyIndex for empty words
Attachs the tokens from a sentence to the networkx graph when building the DependencyGraph proto from a Sentence

Currently hard to add a test for this, since it requires some extensive CoreNLP changes
@AngledLuffa AngledLuffa merged commit fb8774c into dev Oct 17, 2023
@AngledLuffa AngledLuffa deleted the enhanced_semgrex branch October 17, 2023 01:22
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