Skip to content

WordsCounted.count with custom tokeniser? #2

@jm3

Description

@jm3

when using a custom tokenizer, how would you invoke WordsCount.count? first tokenize the text, then re-join the tokens into a string and run .count on it? Or is there a more efficient way?

tk = WordsCounted::Tokeniser.new( doc.force_encoding('UTF-8') ).tokenise(exclude: Stopwords::STOPWORDS)
wc = WordsCounted.count tk.join(' ')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions