Skip to content

Expose split_tags to users #2156

Description

@koheiw

When texts are full of random characters as a result of OCR, tokenization slows down because of the special character preservation mechanism in preserve_special().

image

We can mitigate the problem by split_hyphens = TRUE but there is no official way to disable preservation of social media tags. It causes a lot of false matches when texts are not clean.

It is only to expose the hidden split_tags:

quanteda/R/tokenizers.R

Lines 69 to 72 in 353bfe3

if (!split_tags) {
if (verbose) catm(" ...preserving social media tags (#, @)\n")
regex <- c(regex, username, hashtag)
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions