Xerp::Tokenize
Constants
Common programming keywords across languages.
Patterns for compound token detection in source code. These detect patterns like A.B, A::B, A/N (arity notation)
Maximum allowed token length.
Minimum token length to keep.
Default weights for scoring different token kinds. Higher weight = more significant for search ranking.
Class methods
Adds compound tokens to an existing TokenizeResult.
Checks if a token looks like a common keyword that should be deprioritized.
Derives compound tokens from source lines. Returns additional compound tokens to add to the token set.
Normalizes a token based on its kind. Returns nil if the token should be filtered out.
Splits an identifier into components based on naming conventions. For example: "getUserName" -> ["get", "User", "Name"] "user_name" -> ["user", "name"] Returns the original token plus any split components.