2017-03-23 13:10:22 +03:00
|
|
|
# encoding: utf8
|
|
|
|
from __future__ import unicode_literals, print_function
|
|
|
|
|
|
|
|
from os import path
|
|
|
|
|
|
|
|
from ..language import Language
|
|
|
|
from ..attrs import LANG
|
|
|
|
|
|
|
|
|
|
|
|
# Import language-specific data
|
|
|
|
from .language_data import *
|
|
|
|
|
|
|
|
|
|
|
|
# create Language subclass
|
2017-04-11 19:30:15 +03:00
|
|
|
class Norwegian(Language):
|
2017-03-23 13:10:22 +03:00
|
|
|
lang = 'nb' # ISO code
|
|
|
|
|
2017-04-12 18:59:55 +03:00
|
|
|
class Defaults(Language.Defaults):
|
|
|
|
lex_attr_getters = dict(Language.Defaults.lex_attr_getters)
|
|
|
|
lex_attr_getters[LANG] = lambda text: 'nb'
|
2017-03-28 15:10:20 +03:00
|
|
|
|
2017-04-12 18:59:55 +03:00
|
|
|
# override defaults
|
|
|
|
tokenizer_exceptions = TOKENIZER_EXCEPTIONS
|
|
|
|
#tag_map = TAG_MAP
|
|
|
|
stop_words = STOP_WORDS
|