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

Add Turtle/TriG lexer #514

Merged
merged 4 commits into from
Sep 6, 2016
Merged

Add Turtle/TriG lexer #514

merged 4 commits into from
Sep 6, 2016

Conversation

jakubklimek
Copy link
Contributor

Implements a lexer for RDF formats Turtle and TriG - It is only one lexer as TriG is based on Turtle and adds only one keyword and one bracket type.


def self.analyze_text(text)
start = text[0..1000]
return 0.9 if start =~ %r(@prefix\b)
Copy link
Member

Choose a reason for hiding this comment

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

please don't return more than 0.5 for strings that could appear in other languages.

@jakubklimek
Copy link
Contributor Author

@jneen Thanks for the tips, all fixed.

@jneen jneen merged commit b19dc78 into rouge-ruby:master Sep 6, 2016
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.

2 participants