mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Add spanish as an example
Adding a new language without nlp requires now only to fill out the pieces: - define a list of month names to support date recognition - add it to joex' dockerfile to be available for tesseract - update the solr migration/field definitions - update the elm file so it shows up on the client
This commit is contained in:
@ -65,6 +65,7 @@ object DateFind {
|
||||
case Language.German => p1.or(p0).or(p2)
|
||||
case Language.French => p1.or(p0).or(p2)
|
||||
case Language.Italian => p1.or(p0).or(p2)
|
||||
case Language.Spanish => p1.or(p0).or(p2)
|
||||
}
|
||||
p.read(parts) match {
|
||||
case Result.Success(sds, _) =>
|
||||
|
@ -22,6 +22,8 @@ object MonthName {
|
||||
french
|
||||
case Language.Italian =>
|
||||
italian
|
||||
case Language.Spanish =>
|
||||
spanish
|
||||
}
|
||||
|
||||
private val numbers = List(
|
||||
@ -98,4 +100,19 @@ object MonthName {
|
||||
List("nov", "novembre"),
|
||||
List("dic", "dicembre")
|
||||
)
|
||||
|
||||
private val spanish = List(
|
||||
List("ene", "enero"),
|
||||
List("feb", "febrero"),
|
||||
List("mar", "marzo"),
|
||||
List("abr", "abril"),
|
||||
List("may", "mayo"),
|
||||
List("jun"),
|
||||
List("jul"),
|
||||
List("ago", "agosto"),
|
||||
List("sep", "septiembre"),
|
||||
List("oct", "octubre"),
|
||||
List("nov", "noviembre"),
|
||||
List("dic", "diciembre")
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user