Skip to content

mquan/grammar_police

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grammar_police is a ruby wrapper for the link-grammar-4.7.4 C lib. It uses ffi so the code is much cleaner than grammar_cop.

#example:

require 'grammar_police'

text = "Grammar is useless because there's nothing to say -- Gertrude Stein."

dict = GrammarPolice::Dictionary.dictionary_create_lang("en")
opts = GrammarPolice::ParseOptions.parse_options_create
puts num = GrammarPolice::Sentence.count_linkages(text, dict, opts)
GrammarPolice::ParseOptions.parse_options_delete(opts)
GrammarPolice::Dictionary.dictionary_delete(dict)

About

A ruby gem that extends the link-grammar C lib built using ffi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages