branch: externals/guess-language
commit 02f90acc29b3d161f77c82ad5f64d919003a06e2
Author: Titus von der Malsburg <[email protected]>
Commit: Titus von der Malsburg <[email protected]>
Updated documentation with new languages.
---
README.org | 16 ++++++++++++++--
guess-language.el | 26 ++++++++++++++++++++------
test_data.org | 5 +++++
3 files changed, 39 insertions(+), 8 deletions(-)
diff --git a/README.org b/README.org
index a94bd5c..a33be59 100644
--- a/README.org
+++ b/README.org
@@ -2,7 +2,7 @@
I write a lot of text in multiple languages and was getting tired of switching
the dictionary of my spell-checker. In true Emacs spirit, I decided dust off
my grandpa's parentheses and to write some code to address this problem. The
result is ~guess-language-mode~, a minor mode for Emacs that guesses the
language of the current paragraph and then changes the dictionary of ispell and
the language settings of typo-mode. It also reruns Flyspell on the current
paragraph, but only on that [...]
-This is currently a proof of concept and only three languages are supported:
English, French, German. However, it is very easy to add more languages and
this repository includes the necessary language statistics for 61 additional
languages. (These were copied from
[[https://github.com/kent37/guess-language][guess_language.py]].)
+Currently, the following languages are supported: Czech, Dansk, Dutch,
English, Finnish, French, German, Italian, Norwegian, Polish, Portuguese,
Russian, Slovak, Slovenian, Swedish. It is very easy to add more languages and
this repository includes the necessary language statistics for 49 additional
languages. (These were copied from
[[https://github.com/kent37/guess-language][guess_language.py]].)
** Prerequisites
@@ -20,9 +20,21 @@ This mode assumes that Flyspell is activated and configured
for all relevant lan
Available languages at this time:
-- ~de~: German
+- ~cs~: Czech
+- ~da~: Dansk
+- ~nl~: Dutch
- ~en~: English
+- ~fi~: Finnish
- ~fr~: French
+- ~de~: German
+- ~it~: Italian
+- ~nb~: Norwegian
+- ~pl~: Polish
+- ~pt~: Portuguese
+- ~ru~: Russian
+- ~sk~: Slovak
+- ~sl~: Slovenian
+- ~sv~: Swedish
** Usage
diff --git a/guess-language.el b/guess-language.el
index 73530fa..923e0d6 100644
--- a/guess-language.el
+++ b/guess-language.el
@@ -30,10 +30,11 @@
;; there is likely not enough text to guess the language correctly.
;;
;; The detection algorithm is based on counts of character
-;; trigrams. At this time, supported languages are English, French,
-;; German. Adding more languages is very easy, though, and this
-;; package already contains language statistics for 61 additional
-;; languages.
+;; trigrams. At this time, supported languages are Czech, Dansk,
+;; Dutch, English, Finnish, French, German, Italian, Norwegian,
+;; Polish, Portuguese, Russian, Slovak, Slovenian, Swedish. Adding
+;; further languages is very easy and this package already contains
+;; language statistics for 49 additional languages.
;; See here for more details:
;; https://github.com/tmalsburg/guess-language.el
@@ -51,9 +52,22 @@
considered when guessing language. Currently supported
languages are:
- de: German
+ cs: Czech
+ da: Dansk
+ nl: Dutch
en: English
- fr: French"
+ fi: Finnish
+ fr: French
+ de: German
+ it: Italian
+ nb: Norwegian
+ pl: Polish
+ pt: Portuguese
+ ru: Russian
+ sk: Slovak
+ sl: Slovenian
+ sv: Swedish
+"
:type '(repeat symbol)
:group 'guess-language)
diff --git a/test_data.org b/test_data.org
index 97ded16..3d42f43 100644
--- a/test_data.org
+++ b/test_data.org
@@ -1,4 +1,5 @@
+Lanugages suppored by ispell and typo-mode:
This is a short text written for testing purposes and translated to several
languages using Google translate. (en)
@@ -13,3 +14,7 @@ Tämä on lyhyt teksti kirjoitettu testausta varten ja
käännetty useita kieli
Questo è un breve testo scritto a scopo di test e tradotta a parecchie lingue
utilizzando Google Translate. (it)
Это короткий текст, написанный для целей тестирования и переведен на несколько
языков с помощью Google Translate. (ru)
+
+Norwegian has no support in typo-mode:
+
+Dette er en kort tekst skrevet for testing og oversatt til flere språk ved
hjelp av Google Translate. (nb)