time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

README.md (1801B)


      1 <!--
      2 
      3 @license Apache-2.0
      4 
      5 Copyright (c) 2019 The Stdlib Authors.
      6 
      7 Licensed under the Apache License, Version 2.0 (the "License");
      8 you may not use this file except in compliance with the License.
      9 You may obtain a copy of the License at
     10 
     11    http://www.apache.org/licenses/LICENSE-2.0
     12 
     13 Unless required by applicable law or agreed to in writing, software
     14 distributed under the License is distributed on an "AS IS" BASIS,
     15 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     16 See the License for the specific language governing permissions and
     17 limitations under the License.
     18 
     19 -->
     20 
     21 # porterStemmer
     22 
     23 > Extract the stem of a given word.
     24 
     25 <section class="intro">
     26 
     27 </section>
     28 
     29 <!-- /.intro -->
     30 
     31 <section class="usage">
     32 
     33 ## Usage
     34 
     35 ```javascript
     36 var porterStemmer = require( '@stdlib/nlp/porter-stemmer' );
     37 ```
     38 
     39 #### porterStemmer( word )
     40 
     41 Extracts the stem of a given word using the Porter stemming algorithm.
     42 
     43 ```javascript
     44 var out = porterStemmer( 'worldwide' );
     45 // returns 'worldwid'
     46 
     47 out = porterStemmer( 'fighting' );
     48 // returns 'fight'
     49 ```
     50 
     51 </section>
     52 
     53 <!-- /.usage -->
     54 
     55 * * *
     56 
     57 <section class="references">
     58 
     59 ## References
     60 
     61 -   Porter, Michael F. 1980. "An algorithm for suffix stripping." _Program_ 13 (3): 130–37. doi:[10.1108/eb046814][@porter:1980].
     62 
     63 </section>
     64 
     65 <!-- /.references -->
     66 
     67 <section class="examples">
     68 
     69 ## Examples
     70 
     71 <!-- eslint no-undef: "error" -->
     72 
     73 ```javascript
     74 var porterStemmer = require( '@stdlib/nlp/porter-stemmer' );
     75 
     76 var out = porterStemmer( 'walking' );
     77 // returns 'walk'
     78 
     79 out = porterStemmer( 'walked' );
     80 // returns 'walk'
     81 
     82 out = porterStemmer( 'walks' );
     83 // returns 'walk'
     84 
     85 out = porterStemmer( '' );
     86 // returns ''
     87 ```
     88 
     89 </section>
     90 
     91 <!-- /.examples -->
     92 
     93 <section class="links">
     94 
     95 [@porter:1980]: https://doi.org/10.1108/eb046814
     96 
     97 </section>
     98 
     99 <!-- /.links -->