contrib/porter-stemmer separated out from core
parent
3c4d1fb885
commit
7966620a80
|
@ -38,6 +38,7 @@ Available libraries:
|
|||
- match -- pattern matching (Chris Double)
|
||||
- math -- extended math library (Doug Coleman, Slava Pestov)
|
||||
- parser-combinators -- Haskell-style parser combinators (Chris Double)
|
||||
- porter-stemmer -- Porter stemming algorithm (Slava Pestov)
|
||||
- postgresql -- PostgreSQL binding (Doug Coleman)
|
||||
- process -- Run external programs (Slava Pestov, Doug Coleman)
|
||||
- random-tester -- Random compiler tester (Doug Coleman)
|
||||
|
|
|
@ -9,7 +9,8 @@ contrib/hardware-info contrib/hexdump contrib/http
|
|||
contrib/httpd contrib/http-client contrib/jedit
|
||||
contrib/jni contrib/json contrib/lambda contrib/lazy-lists
|
||||
contrib/lindenmayer contrib/match contrib/math
|
||||
contrib/parser-combinators contrib/postgresql contrib/process
|
||||
contrib/parser-combinators contrib/porter-stemmer
|
||||
contrib/postgresql contrib/process
|
||||
contrib/random-tester contrib/rss contrib/sequences
|
||||
contrib/serialize contrib/shuffle contrib/slate
|
||||
contrib/space-invaders contrib/splay-trees contrib/sqlite
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
PROVIDE: contrib/porter-stemmer
|
||||
{ +files+ { "porter-stemmer.factor" "porter-stemmer.facts" } }
|
||||
{ +tests+ { "test/porter-stemmer.factor" } }
|
||||
{ +help+ "porter-stemmer" } ;
|
|
@ -52,3 +52,21 @@ HELP: step5
|
|||
HELP: stem
|
||||
{ $values { "str" "a string" } { "newstr" "a new string" } }
|
||||
{ $description "Applies the Porter stemming algorithm to the input string." } ;
|
||||
|
||||
ARTICLE: "porter-stemmer" "Porter stemming algorithm"
|
||||
"The help system uses the Porter stemming algorithm to normalize words when building the full-text search index."
|
||||
$terpri
|
||||
"The Factor implementation of the algorithm is based on the Common Lisp version, which was hand-translated from ANSI C by Steven M. Haflich. The original ANSI C was written by Martin Porter."
|
||||
$terpri
|
||||
"A detailed description of the algorithm, along with implementations in various languages, can be at in " { $url "http://www.tartarus.org/~martin/PorterStemmer" } "."
|
||||
$terpri
|
||||
"The main word of the algorithm takes an English word as input and outputs its stem:"
|
||||
{ $subsection stem }
|
||||
"The algorithm consists of a number of steps:"
|
||||
{ $subsection step1a }
|
||||
{ $subsection step1b }
|
||||
{ $subsection step1c }
|
||||
{ $subsection step2 }
|
||||
{ $subsection step3 }
|
||||
{ $subsection step4 }
|
||||
{ $subsection step5 } ;
|
Loading…
Reference in New Issue