pemistahl / lingua-go

The most accurate natural language detection library for Go, suitable for short text and mixed-language text
Apache License 2.0
1.19k stars 66 forks source link

Added mappings between various representation of languages #45

Closed kostrahb closed 1 year ago

kostrahb commented 1 year ago

This basically adds possibility to find language based on ISO 639-1 and ISO 639-3 code strings. Implementation is not entirely optimal - it would be great to unite the code base only on single language enum and transform to/from ISO codes via maps, but this does not break API and gets the thing done.

codecov-commenter commented 1 year ago

Codecov Report

Merging #45 (bdc88b1) into main (cf22a07) will decrease coverage by 10.12%. Report is 3 commits behind head on main. The diff coverage is 36.36%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the GitHub App Integration for your organization. Read more.

@@             Coverage Diff             @@
##             main      #45       +/-   ##
===========================================
- Coverage   86.79%   76.67%   -10.12%     
===========================================
  Files           8        9        +1     
  Lines        1598     1608       +10     
===========================================
- Hits         1387     1233      -154     
- Misses        156      320      +164     
  Partials       55       55               
Files Changed Coverage Δ
language.go 61.61% <ø> (-35.63%) :arrow_down:
mapping.go 36.36% <36.36%> (ø)

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

pemistahl commented 1 year ago

Closed in favor of commit a8305a14a84dd54a6fbe7e76e8c25afe00d57b3f.