How to use the underthesea.corpus.readers.dictionary_loader.DictionaryLoader function in underthesea

To help you get started, we’ve selected a few underthesea examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github undertheseanlp / underthesea / underthesea / corpus / __init__.py View on Github external
from underthesea.corpus.corpus import Corpus
from underthesea.corpus.document import Document
from underthesea.feature_engineering.unicode import UnicodeTransformer
from underthesea.corpus.plaintext import PlainTextCorpus
from underthesea.corpus.readers.dictionary_loader import DictionaryLoader

viet_dict_11K = DictionaryLoader('Viet11K.txt')
viet_dict_22K = DictionaryLoader('Viet22K.txt')
viet_dict_39K = DictionaryLoader('Viet39K.txt')
viet_dict_74K = DictionaryLoader('Viet74K.txt')

__all__ = ['Corpus', 'Document', 'UnicodeTransformer', 'PlainTextCorpus', 'DictionaryLoader']
github undertheseanlp / underthesea / underthesea / word_sent / feature.py View on Github external
import time

from underthesea.corpus.readers.dictionary_loader import DictionaryLoader

words = set(DictionaryLoader('Viet74K.txt').words)


def word2features(sent, i):
    """
    add feature for each word

    :param unicode|str sent: input sentence
    :param int i: index of word in sentence
    :return: word added feature
    :rtype: list
    """
    word = sent[i][0]
    features = [
        word,
        'bias',
        'word.lower=' + word.lower(),
github undertheseanlp / underthesea / underthesea / corpus / __init__.py View on Github external
from underthesea.corpus.corpus import Corpus
from underthesea.corpus.document import Document
from underthesea.feature_engineering.unicode import UnicodeTransformer
from underthesea.corpus.plaintext import PlainTextCorpus
from underthesea.corpus.readers.dictionary_loader import DictionaryLoader

viet_dict_11K = DictionaryLoader('Viet11K.txt')
viet_dict_22K = DictionaryLoader('Viet22K.txt')
viet_dict_39K = DictionaryLoader('Viet39K.txt')
viet_dict_74K = DictionaryLoader('Viet74K.txt')

__all__ = ['Corpus', 'Document', 'UnicodeTransformer', 'PlainTextCorpus', 'DictionaryLoader']
github undertheseanlp / underthesea / underthesea / corpus / __init__.py View on Github external
from underthesea.corpus.corpus import Corpus
from underthesea.corpus.document import Document
from underthesea.feature_engineering.unicode import UnicodeTransformer
from underthesea.corpus.plaintext import PlainTextCorpus
from underthesea.corpus.readers.dictionary_loader import DictionaryLoader

viet_dict_11K = DictionaryLoader('Viet11K.txt')
viet_dict_22K = DictionaryLoader('Viet22K.txt')
viet_dict_39K = DictionaryLoader('Viet39K.txt')
viet_dict_74K = DictionaryLoader('Viet74K.txt')

__all__ = ['Corpus', 'Document', 'UnicodeTransformer', 'PlainTextCorpus', 'DictionaryLoader']
github undertheseanlp / underthesea / underthesea / corpus / __init__.py View on Github external
from underthesea.corpus.corpus import Corpus
from underthesea.corpus.document import Document
from underthesea.feature_engineering.unicode import UnicodeTransformer
from underthesea.corpus.plaintext import PlainTextCorpus
from underthesea.corpus.readers.dictionary_loader import DictionaryLoader

viet_dict_11K = DictionaryLoader('Viet11K.txt')
viet_dict_22K = DictionaryLoader('Viet22K.txt')
viet_dict_39K = DictionaryLoader('Viet39K.txt')
viet_dict_74K = DictionaryLoader('Viet74K.txt')

__all__ = ['Corpus', 'Document', 'UnicodeTransformer', 'PlainTextCorpus', 'DictionaryLoader']