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

Paragraph#sentences/Section#sentences #46

Open
zverok opened this issue Dec 14, 2015 · 0 comments
Open

Paragraph#sentences/Section#sentences #46

zverok opened this issue Dec 14, 2015 · 0 comments

Comments

@zverok
Copy link
Contributor

zverok commented Dec 14, 2015

Somewhat crazy idea, but allows to parse cases like this: https://en.wikipedia.org/wiki/Argentina -- what are Argentina's neigbours?..

Potential solution:

# Take sentence with phrase "bordered by", and extract wikilinks from it only
page.abstract.lookup(:Sentence, text: /bordered by/).lookup(:Wikilink).map(&:text)
# => [Southern Cone, Chile, Bolivia, Paraguay, Brazil, Uruguay, South Atlantic Ocean, Chile, Drake Passage]

^ not ideal, but better than any other solution.

May include really tricky things like elements of NLP for determining correct phrase boundaries... But still can be very useful.

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

1 participant