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

Verb phrase finder doesn't look for prepositions or direct objects #26

Open
ahalterman opened this issue May 14, 2018 · 6 comments
Open
Labels
critical must address before program functions

Comments

@ahalterman
Copy link
Member

In looking for parts of the verb phrase, UniversalPetrarch only looks for negations, compounds, and adverbial clause modifiers. It doesn't look for prepositions ("fired AT targets") or direct objects ("chanted SLOGANS). (code) Prepositions and direct objects are major parts of verb patterns (indeed, they're specially marked in the dictionaries to make matching possible). This lack of code rules out using any verb dictionary entries that include any direct objects or prepositions and would explain why the Petr2 dictionaries were working so badly.

@JingL1014
Copy link
Collaborator

In current coder, the way to handle prepositional phrase is a little bit different from PETR2 implementation. As mentioned in #27, in step 1, the action in the "fired AT targets" is extracted as "fired at", and prepositions are handled inside verb phrase (code)

@ahalterman
Copy link
Member Author

Looking at the code, that seems to handle the comparison between the extracted verb phrase and the dictionaries. What I'm concerned about is the ability of UniversalPetrarch to extract preps and dobjs in the verb phrase from the text to begin with. If it can't extract them correctly, then it won't have any of them to compare against the dictionary in that code chunk. Am I missing something?

@ahalterman ahalterman mentioned this issue Jul 13, 2018
@ahalterman
Copy link
Member Author

Just checking in on this again, especially since the preposition issue came up in Arabic. Is the code indeed extracting prepositional phrases coming off the verb? And am I right in thinking that that code concerns pattern matching, not phrase extraction?

@JingL1014
Copy link
Collaborator

Yes. Now the coder concerns the prepositions coming off the verb to do the pattern matching. It matches the entire verb phrases (the verb and a sequence of other chunks such as a noun phrase or a prepositional phrase that follow the verb)

@ahalterman
Copy link
Member Author

ahalterman commented Aug 9, 2018

Great! Can you link to the part of the code that implements it, just so I can make sure I understand where it's doing it?

Edit: The original implementation is linked here: #28

@JingL1014
Copy link
Collaborator

The code can be found in function match_lower() starting from line 1660 to line 1700

@ahalterman ahalterman added the critical must address before program functions label Jan 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
critical must address before program functions
Projects
None yet
Development

No branches or pull requests

2 participants