Refactor the project structure.
continuous-integration/drone/push Build is passing

This commit is contained in:
2023-10-11 21:12:10 +03:00
parent 77efa81c54
commit 4d7e9da1d1
15 changed files with 28 additions and 53 deletions
@@ -0,0 +1,21 @@
(ns cipher-analytical-machine.analyzers.language
(:import [org.apache.tika.language LanguageIdentifier])
(:gen-class))
(defn detect-language
"Return a identified language."
[text]
(-> (new LanguageIdentifier text)
.getLanguage))
(defn is-language?
"Check if the text written a language."
[text language-id]
(= (detect-language text)
language-id))
(defn is-nonsense?
"Check if the text written a language is not a language."
[text language-id]
(not (is-language? text language-id)))