linkparser /

Filename Size Date modified Message
docs
experiments
ext
lib
misc
spec
1002 B
719 B
4.0 KB
626 B
2.1 KB
11.4 KB
3.1 KB
300 B
6.1 KB
19.8 KB
= Ruby-LinkParser

== Authors

 * Michael Granger <ged@FaerieMUD.org>
 * Martin Chase <stillflame@FaerieMUD.org>


== Requirements

 * Ruby >= 1.8.5
 * link-grammar-4.3.5 from the AbiWord project 
   (http://www.abisource.com/projects/link-grammar/) with the included
   patch applied.

== General Information

This module is a Ruby binding for the link-grammar library, a syntactic parser
of English. 


=== 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

This module is Open Source Software which is Copyright (c) 2006 by The
FaerieMUD Consortium. All rights reserved.

This work is licensed under the Creative Commons Attribution 2.5 License. To
view a copy of this license, visit http://creativecommons.org/licenses/by/2.5/
or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San
Francisco, California, 94105, USA.

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.


 $Id: README,v 1.6 2003/10/09 13:21:48 deveiant Exp $


Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.