Skip to content

Commit

Permalink
Add fixes to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
pemistahl committed Nov 22, 2022
1 parent 0555133 commit 5125087
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 17 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

## 1. What does this library do?

Its task is simple: It tells you which language some provided textual data is written in.
Its task is simple: It tells you which language some text is written in.
This is very useful as a preprocessing step for linguistic data in natural language
processing applications such as text classification and spell checking.
Other use cases, for instance, might include routing e-mails to the right geographically
Expand Down Expand Up @@ -1816,7 +1816,7 @@ Erroneously classified as Dutch: 0.20%, Latin: 0.10%

## 7. How to add it to your project?

go get github.com/pemistahl/[email protected].0
go get github.com/pemistahl/[email protected].1

## 8. How to build?

Expand Down Expand Up @@ -1974,7 +1974,7 @@ confidence := detector.ComputeLanguageConfidence("languages are awesome", lingua
fmt.Printf("%.2f", confidence)

// Output:
// French: 0.32
// 0.32
```

The value that this method computes is a number between 0.0 and 1.0.
Expand Down
6 changes: 6 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## Lingua 1.1.1 (released on 22 Nov 2022)

### Documentation

- Some documentation mistakes have been fixed and missing information has been added.

## Lingua 1.1.0 (released on 21 Nov 2022)

### Features
Expand Down
2 changes: 1 addition & 1 deletion cmd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.18
require (
github.com/abadojack/whatlanggo v1.0.1
github.com/jmhodges/gocld3 v0.0.0-20211031064447-cc40e88f7505
github.com/pemistahl/lingua-go v1.0.5
github.com/pemistahl/lingua-go v1.1.1
)

require (
Expand Down
10 changes: 2 additions & 8 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Package lingua accurately detects the natural language of written text, be it lo
# What this library does
Its task is simple: It tells you which language some provided textual data is written in.
Its task is simple: It tells you which language some text is written in.
This is very useful as a preprocessing step for linguistic data in natural language
processing applications such as text classification and spell checking.
Other use cases, for instance, might include routing e-mails to the right geographically
Expand Down Expand Up @@ -77,13 +77,7 @@ Whatlanggo running over the data of Lingua's supported 75 languages.
Additionally, I have added Google's CLD3 (https://github.com/google/cld3/) to the comparison
with the help of the gocld3 bindings (https://github.com/jmhodges/gocld3). Languages that are not
supported by CLD3 or Whatlanggo are simply ignored during the detection process.
The bar and box plots (https://github.com/pemistahl/lingua-go/blob/main/ACCURACY_PLOTS.md)
show the measured accuracy values for all three performed tasks: Single word detection,
word pair detection and sentence detection. Lingua clearly outperforms its contenders.
Detailed statistics including mean, median and standard deviation values for each language
and classifier are available in
tabular form (https://github.com/pemistahl/lingua-go/blob/main/ACCURACY_TABLE.md) as well.
Lingua clearly outperforms its contenders.
# Why it is better than other libraries
Expand Down
7 changes: 2 additions & 5 deletions example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,10 @@ func Example_eagerLoading() {
// can become better in such cases if you exclude certain languages from the
// decision process or just explicitly include relevant languages.
func Example_builderApi() {
// Including all languages available in the library
// consumes at least 2GB of memory and might
// lead to slow runtime performance.
// Include all languages available in the library.
lingua.NewLanguageDetectorBuilder().FromAllLanguages()

// Include only languages that are not yet extinct
// (= currently excludes Latin).
// Include only languages that are not yet extinct (= currently excludes Latin).
lingua.NewLanguageDetectorBuilder().FromAllSpokenLanguages()

// Include only languages written with Cyrillic script.
Expand Down

0 comments on commit 5125087

Please sign in to comment.