-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathREADME.Rmd
60 lines (43 loc) · 1.9 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
# RSLP
> Removedor de Sufixos da Língua Portuguesa
[](https://github.com/dfalbel/rslp/actions)
[](https://travis-ci.org/dfalbel/rslp)
[](https://ci.appveyor.com/project/dfalbel/rslp)
[](https://codecov.io/gh/dfalbel/rslp)
[](https://cran.r-project.org/package=rslp)
[](https://CRAN.R-project.org/package=rslp)
This package uses the algorithm *Stemming Algorithm for the Portuguese Language* described in [this article](http://doi.ieeecomputersociety.org/10.1109/SPIRE.2001.10024) by Viviane Moreira Orengo and Christian Huyck.
The idea of the stemmer is very well explained by the following schema.

## Installing
To install the package you can use the following:
```{r, eval=FALSE}
devtools::install_github("dfalbel/rslp")
```
## Using
The only important function of the package is the `rslp` function.
You can call it on a vector of characters like this:
```{r}
library(rslp)
words <- c("balões", "aviões", "avião", "gostou", "gosto", "gostaram")
rslp(words)
```
It works with vector of texts too, using the `rslp_doc` function.
```{r}
docs <- c(
"coma frutas pois elas fazem bem para a saúde.",
"não coma doces, eles fazem mal para os dentes."
)
rslp_doc(docs)
```