Skip to content

feat: add token_pattern parameter to EntryPredictor#154

Merged
tarioch merged 4 commits intobeancount:mainfrom
trim21:feat/token_pattern
Feb 11, 2026
Merged

feat: add token_pattern parameter to EntryPredictor#154
tarioch merged 4 commits intobeancount:mainfrom
trim21:feat/token_pattern

Conversation

@trim21
Copy link
Contributor

@trim21 trim21 commented Feb 8, 2026

there is a unavoidable warning when you replace the tokenizer, for example, tokenizer=jieba.cut, we also expose token_pattern so user can override it

.venv/Lib/site-packages/sklearn/feature_extraction/text.py:526: UserWarning: The parameter 'token_pattern' will not be used since 'tokenizer' is not None'

@tarioch
Copy link
Collaborator

tarioch commented Feb 11, 2026

thanks for your contribution, would you mind having a look at the failing tests?

@trim21
Copy link
Contributor Author

trim21 commented Feb 11, 2026

thanks for your contribution, would you mind having a look at the failing tests?

it's a lint failed at smart_importer/predictor.py:57:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments) , how would you like to resolve it? disable it for this function?

@tarioch
Copy link
Collaborator

tarioch commented Feb 11, 2026

Yeah, I think in this case suppressing it makes sense.

@tarioch tarioch merged commit 6983be1 into beancount:main Feb 11, 2026
6 checks passed
@trim21 trim21 deleted the feat/token_pattern branch February 11, 2026 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants