Skip to content

Add Turtle/TriG lexer#514

Merged
jneen merged 4 commits intorouge-ruby:masterfrom
jakubklimek:master
Sep 6, 2016
Merged

Add Turtle/TriG lexer#514
jneen merged 4 commits intorouge-ruby:masterfrom
jakubklimek:master

Conversation

@jakubklimek
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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