2016-03-26 10:44:53 +00:00
|
|
|
from .util import set_lang_class, get_lang_class, get_package, get_package_by_name
|
2016-01-15 17:01:02 +00:00
|
|
|
|
2016-03-25 17:54:45 +00:00
|
|
|
from .en import English
|
|
|
|
from .de import German
|
2016-01-15 17:01:02 +00:00
|
|
|
|
2016-03-24 10:19:43 +00:00
|
|
|
|
2016-03-26 10:44:53 +00:00
|
|
|
set_lang_class(English.lang, English)
|
|
|
|
set_lang_class(German.lang, German)
|
2016-03-25 17:54:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
def load(name, vectors=None, via=None):
|
2016-03-26 10:44:53 +00:00
|
|
|
package = get_package_by_name(name, via=via)
|
|
|
|
vectors_package = get_package_by_name(vectors, via=via)
|
|
|
|
cls = get_lang_class(name)
|
2016-03-25 17:54:45 +00:00
|
|
|
return cls(package=package, vectors_package=vectors_package)
|