Skip to content

change feature arguments to pattern #839

@kbenoit

Description

@kbenoit

only once #838, #837, and #836 are solved, I propose we change the main matching arguments to pattern, from features or keywords.

So this would be:

  • tokens_select(x, pattern)
  • tokens_remove(x, pattern)
  • tokens_compound(x, pattern)
  • dfm_select(x, pattern)
  • dfm_remove(x, pattern)
  • fcm_select(x, pattern)
  • fcm_remove(x, pattern)
  • kwic(x, pattern)

Also:

  • deprecate the features (and keywords for kwic) arguments in the same way that we did this for the camelcase arguments in tokens(). So they will still work but issue a message.
  • create a central man page for pattern, and update the existing one for phrase (and these might be the same page)

Why make this change?

  • more consistent across functions
  • more descriptive than features, which is really specific to a dfm construct, but we have used it to refer to tokens, sequences, and pattern matches generally
  • pattern is consistent with the usage stringr and stringi

Metadata

Metadata

Assignees

Type

No type
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