Skip to content

fix: remove invalid is_tokenized parameter from ConllParser#38

Open
awanawana wants to merge 1 commit intoBramVanroy:masterfrom
awanawana:fix/cli-is_tokenized-parameter
Open

fix: remove invalid is_tokenized parameter from ConllParser#38
awanawana wants to merge 1 commit intoBramVanroy:masterfrom
awanawana:fix/cli-is_tokenized-parameter

Conversation

@awanawana
Copy link
Copy Markdown

Summary

Fixes #30

The CLI's parse() function was passing is_tokenized=args.is_tokenized to ConllParser(), but ConllParser is a dataclass that only accepts nlp as its constructor argument.

The is_tokenized parameter is already correctly handled by init_parser() (lines 14-21), which configures the underlying spaCy pipeline with tokenization settings. The parameter should not be passed again to ConllParser.

Changes

  • Removed the invalid is_tokenized keyword argument from ConllParser() call in cli/parse.py

Test

# Before fix:
python -m spacy_conll --is_tokenized ...
# TypeError: __init__() got an unexpected keyword argument 'is_tokenized'

# After fix:
python -m spacy_conll --is_tokenized ...
# Works correctly

🤖 Generated with Claude Code

The is_tokenized parameter is already handled by init_parser() and
passed to the underlying spaCy pipeline. ConllParser is a dataclass
that only accepts 'nlp' as its constructor argument.

Fixes BramVanroy#30

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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.

TypeError: ConllParser.__init__() got an unexpected keyword argument 'is_tokenized' when using command parse-as-conll

1 participant