Skip to content

Commit

Permalink
Improved formatting for Github markdown
Browse files Browse the repository at this point in the history
  • Loading branch information
egtann committed Jul 22, 2012
1 parent 3a41457 commit 2cc8e1e
Showing 1 changed file with 28 additions and 28 deletions.
56 changes: 28 additions & 28 deletions README.rdoc
Expand Up @@ -11,35 +11,35 @@ This module is a Ruby binding for

=== Example Usage

require 'linkparser'
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 .
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 .


== Installation
Expand Down

0 comments on commit 2cc8e1e

Please sign in to comment.