Skip to content

fix: Update benchmark script to use process_text API (#51)#109

Open
ada-cinar wants to merge 1 commit into
mainfrom
fix/51-benchmark-pipeline-api
Open

fix: Update benchmark script to use process_text API (#51)#109
ada-cinar wants to merge 1 commit into
mainfrom
fix/51-benchmark-pipeline-api

Conversation

@ada-cinar

Copy link
Copy Markdown
Member

Problem

The benchmark script was using the old string-based Pipeline API:

pipeline = durak.Pipeline(["clean", "tokenize", "remove_stopwords", "normalize"])

This caused a TypeError: 'str' object is not callable because the Pipeline class expects callable objects, not strings.

Solution

Updated benchmark #4 to use the process_text convenience function instead:

def pipeline_func(text):
    return durak.process_text(text, remove_stopwords=True, rejoin_suffixes=True)

This uses the current API and should run without errors.

Testing

  • ✅ Syntax validation passed (python3 -m py_compile)
  • 🔄 Full benchmark run requires maturin develop (CI will verify)

Closes #51

- Replace deprecated string-based Pipeline initialization
- Use process_text convenience function for pipeline benchmark
- Fixes TypeError: 'str' object is not callable error

Closes #51
@ada-cinar ada-cinar added bug Something isn't working documentation Improvements or additions to documentation labels Jan 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] Benchmark Script Fails with Updated Pipeline API

1 participant