Changeset 35082 in project


Ignore:
Timestamp:
01/27/18 11:47:03 (9 months ago)
Author:
svnwiki
Message:

Anonymous wiki edit for IP [220.233.44.123]:

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/sentence-split

    r35081 r35082  
    4444
    4545<enscript highlight="scheme">
    46 (use (prefix sentence-split :ss))
    47 
    48 (define str "Pr. Chamberlain was also a col. in the army. Chamberlain was commissioned a lt. col. in
    49              the 20th Maine Volunteer Infantry Regiment. On July 2nd, during the Battle of Gettysburg,
    50              Chamberlain's regiment occupied the extreme left of the Union lines at Little Round Top.")
     46(use (prefix sentence-split ss:))
     47
     48(define text "Pr. Chamberlain was also a col. in the army.
     49              Chamberlain was commissioned a lt. col. in
     50              the 20th Maine Volunteer Infantry Regiment.
     51              On July 2nd, during the Battle of Gettysburg,
     52              Chamberlain's regiment occupied the extreme
     53              left of the Union lines at Little Round Top.")
    5154
    5255(for-each
    5356  (lambda (x)
    5457    (print "<" x ">"))
    55   (ss:get-sentences str))
     58  (ss:get-sentences text))
     59
    5660
    5761</enscript>
    5862
     63'''Produces the following output:'''
     64
     65<Pr. Chamberlain was also a col. in the army.>
     66<Chamberlain was commissioned a lt. col. in
     67              the 20th Maine Volunteer Infantry Regiment.>
     68<On July 2nd, during the Battle of Gettysburg,
     69              Chamberlain's regiment occupied the extreme
     70              left of the Union lines at Little Round Top.>
    5971
    6072== Changelog
Note: See TracChangeset for help on using the changeset viewer.