ged / linkparser
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (6)
- Wiki (1)
- Graphs
-
Branch:
master
commit 3e17044afbf246cf00acca9ab3636888238be9a5
tree 86c562cd4e9833f96841ef99a01455e1c07bf931
parent f1e839d31a4b3617b2ed9bb111f2dcebe1ebecf4
tree 86c562cd4e9833f96841ef99a01455e1c07bf931
parent f1e839d31a4b3617b2ed9bb111f2dcebe1ebecf4
| name | age | message | |
|---|---|---|---|
| |
.hgtags | ||
| |
.irbrc | ||
| |
ChangeLog | ||
| |
INSTALL | ||
| |
LICENSE | ||
| |
README | ||
| |
Rakefile | ||
| |
Rakefile.local | ||
| |
docs/ | ||
| |
experiments/ | ||
| |
ext/ | ||
| |
lib/ | ||
| |
link-grammar-4.5.7.tar.gz | ||
| |
misc/ | ||
| |
project.yml | ||
| |
spec/ | ||
| |
utils.rb |
README
= Ruby-LinkParser This module is a Ruby binding for the link-grammar library, a syntactic parser of English. == Authors * Michael Granger <ged@FaerieMUD.org> * Martin Chase <stillflame@FaerieMUD.org> == Requirements * Ruby 1.8.6 * link-grammar (version 4.5.7 or later) from the AbiWord project (http://www.abisource.com/projects/link-grammar/) === Example Usage require 'linkparser' dict = LinkParser::Dictionary.new( :screen_width => 100 ) sent = dict.parse( "People use Ruby for all kinds of nifty things." ) # => #<LinkParser::Sentence:0xcf8eb "LEFT-WALL people use Ruby for all kinds # of nifty things . RIGHT-WALL"/2 linkages/0 nulls> sent.subject # => "people" sent.verb # => "use" sent.object # => "Ruby" puts sent.constituent_tree_string # => # (S (NP People) # (VP use # (NP Ruby) # (PP for # (NP (NP all kinds) # (PP of # (NP nifty things))))) # .) puts sent.diagram # => # +-------------------------------Xp------------------------------+ # | +----MVp---+----Jp----+ +------Jp-----+ | # +----Wd---+--Sp--+--Os-+ | +-Dmc-+--Mp-+ +----A---+ | # | | | | | | | | | | | # LEFT-WALL people.p use.v Ruby for.p all kinds.n of nifty.a things.n . == Legal For licensing information, see the LICENSE file. For copyright and licensing information for link-grammar itself, see the LICENSE file in that distribution. $Id$

