rbtagger
Get Version
0.2.6→ ‘rbtagger’
What
A Simple Ruby Rule-Based Part of Speech Tagger
This work is based on the work of Eric Brill
Installing
gem install rbtagger
The basics
Using the rule tagger
require 'rbtagger' tagger = Brill::Tagger.new( File.join(File.dirname(__FILE__),"LEXICON"), File.join(File.dirname(__FILE__),"LEXICALRULEFILE"), File.join(File.dirname(__FILE__),"CONTEXTUALRULEFILE") ) docs.each do|doc| tagger.tag( File.read( doc ) ) end tagger.suggest( File.read("sample.txt") ) => [["doctor", "NN", 3], ["treatment", "NN", 5]]
Using the word tagger
require 'rbtagger' tagger = Word::Tagger.new( ['cat','hat'], :words => 4 ) tags = tagger.execute( 'the cat and the hat' ) assert_equal( ["cat", "hat"], tags )
Forum
http://groups.google.com/group/rb-brill-tagger
How to submit patches
Read the 8 steps for fixing other people’s code and for section 8b: Submit patch to Google Groups, use the Google Group above.
git clone git://github.com/taf2/rb-brill-tagger.git
Build and test instructions
cd rb-brill-tagger rake test rake install_gem
License
This code is free to use under the terms of the MIT license.
Contact
Comments are welcome. Send an email to Todd A. Fisher email via the forum
Todd A. Fisher, 23rd June 2008
Theme extended from Paul Battley