2017-03-23 10:10:22 +00: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 16:30:15 +00:00
|
|
|
class Norwegian(Language):
|
2017-03-23 10:10:22 +00:00
|
|
|
lang = 'nb' # ISO code
|
|
|
|
|
2017-04-12 15:59:55 +00:00
|
|
|
class Defaults(Language.Defaults):
|
|
|
|
lex_attr_getters = dict(Language.Defaults.lex_attr_getters)
|
|
|
|
lex_attr_getters[LANG] = lambda text: 'nb'
|
2017-03-28 12:10:20 +00:00
|
|
|
|
2017-04-12 15:59:55 +00:00
|
|
|
# override defaults
|
|
|
|
tokenizer_exceptions = TOKENIZER_EXCEPTIONS
|
|
|
|
#tag_map = TAG_MAP
|
|
|
|
stop_words = STOP_WORDS
|