Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example of using text tokenizers and dictionaries #1930

Open
NikolayTV opened this issue Nov 20, 2021 · 0 comments
Open

Example of using text tokenizers and dictionaries #1930

NikolayTV opened this issue Nov 20, 2021 · 0 comments

Comments

@NikolayTV
Copy link

NikolayTV commented Nov 20, 2021

Problem: Cannot properly set tokenizers and dictionaries
catboost version: 1.0.3
Operating System: Windows 11
GPU: +

This topic is not covered in documentation properly.
I cannot understand how to set different tokenizers for specific columns.
This code example also gives an error.


model = CatBoostClassifier(
    task_type = 'GPU',
    tokenizers=[
        {
            'tokenizer_id': 'Sence',
            'separator_type': 'BySense',
            'lowercasing': 'True',
            'token_types':['Word'],
            'sub_tokens_policy':'SeveralTokens'
        }      
    ],
    dictionaries = [
        {
            'dictionary_id': 'BiGram',
            'max_dictionary_size': '50000'
        },
        {
            'dictionary_id': 'Word',
            'max_dictionary_size': '50000'
        }],
)

model.fit(
    train_pool,
    eval_set=val_pool,
    verbose=False, plot=True)

CatBoostError: C:/Program Files (x86)/Go Agent/pipelines/BuildMaster/catboost.git/catboost/private/libs/options/runtime_text_options.cpp:140: No options for tokenizerId Space

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants