Skip to content

Added support for the GraphFormulaPatternMatcher - #57

Merged
adaamko merged 4 commits into
adaamko:mainfrom
GKingA:main
May 20, 2022
Merged

Added support for the GraphFormulaPatternMatcher#57
adaamko merged 4 commits into
adaamko:mainfrom
GKingA:main

Conversation

@GKingA

@GKingA GKingA commented May 19, 2022

Copy link
Copy Markdown
Collaborator

Added support, but also set is as the default option.

@GKingA
GKingA requested review from Eszti and adaamko May 19, 2022 10:30
Comment thread frontend/utils.py
option = st.selectbox("Choose from the rules", st.session_state.sens)
G, _ = default_pn_to_graph(option.split(";")[0])
text_G, _ = default_pn_to_graph(option.split(";")[0])
first_option = option.split(";")[0]

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please provide an example for a pattern that it would match?
Does this matcher always apply, or do I have to call POTATO in a specific way?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would match any penman as well as any command given with the command(penman1, penman2) formula.
For example, the following rule:

path((u_800 / like :nsubj (u_1 / I)),(u_120 / flower))

Would match any graph where the two subgraphs are present and there is a directed path from 'like' to 'flower'.
Currently, there are 3 commands supported: path, undirected and any integer (e.g. 2 and 4 are valid commands).

I've set this as the default, but we can obviously change it.

@adaamko
adaamko merged commit 81ece4a into adaamko:main May 20, 2022
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.

3 participants