Skip to content

Commit

Permalink
documentation update for #20
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkEdmondson1234 committed Jun 17, 2018
1 parent dfc8681 commit c301135
Show file tree
Hide file tree
Showing 36 changed files with 1,458 additions and 504 deletions.
2 changes: 1 addition & 1 deletion R/natural-language.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#' \item{tokens - }{\href{https://cloud.google.com/natural-language/docs/reference/rest/v1/Token}{Tokens, along with their syntactic information, in the input document}}
#' \item{entities - }{\href{https://cloud.google.com/natural-language/docs/reference/rest/v1/Entity}{Entities, along with their semantic information, in the input document}}
#' \item{documentSentiment - }{\href{https://cloud.google.com/natural-language/docs/reference/rest/v1/Sentiment}{The overall sentiment for the document}}
#' \item{classifyText -}{\href{https://cloud.google.com/natural-language/docs/classifying-text}}
#' \item{classifyText -}{\href{https://cloud.google.com/natural-language/docs/classifying-text}{Classification of the document}}
#' \item{language - }{The language of the text, which will be the same as the language specified in the request or, if not specified, the automatically-detected language}
#' \item{text - }{The original text passed into the API. \code{NA} if not passed due to being zero-length etc. }
#' }
Expand Down
8 changes: 4 additions & 4 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ The Natural Language API returns natural language understanding technolgies. Yo

You can pass a vector of text which will call the API for each element. The return is a list of responses, each response being a list of tibbles holding the different types of analysis.

```{r}
```r
texts <- c("to administer medicince to animals is frequently a very difficult matter, and yet sometimes it's necessary to do so",
"I don't know how to make a text demo that is sensible")
nlp_result <- gl_nlp(texts)
Expand All @@ -127,7 +127,7 @@ You can detect the language via `gl_translate_detect`, or translate and detect l

Note this is a lot more refined than the free version on Google's translation website.

```{r}
```r
text <- "to administer medicine to animals is frequently a very difficult matter, and yet sometimes it's necessary to do so"
## translate British into Danish
gl_translate(text, target = "da")$translatedText
Expand All @@ -145,7 +145,7 @@ A test audio file is installed with the package which reads:
The file is sourced from the [University of Southampton's speech detection](http://www-mobile.ecs.soton.ac.uk/newcomms/) group and is fairly difficult for computers to parse, as we see below:

```{r}
```r
## get the sample source file
test_audio <- system.file("woman1_wb.wav", package = "googleLanguageR")

Expand All @@ -165,7 +165,7 @@ A test audio file is installed with the package which reads:
The file is sourced from the [University of Southampton's speech detection](http://www-mobile.ecs.soton.ac.uk/newcomms/) group and is fairly difficult for computers to parse, as we see below:

``` r
```r
## get the sample source file
test_audio <- system.file("woman1_wb.wav", package = "googleLanguageR")

Expand Down
31 changes: 19 additions & 12 deletions docs/CONTRIBUTING.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 19 additions & 12 deletions docs/LICENSE-text.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 19 additions & 12 deletions docs/articles/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c301135

Please sign in to comment.