Skip to main content

parse

Function parse 

Source
pub fn parse(
    word: &str,
    options: &ParserOptions,
) -> Result<Vec<WordPieceWithSource>, WordParseError>
Expand description

Parse a word into its constituent pieces.

§Arguments

  • word - The word to parse.
  • options - The parser options to use.

§Errors

Returns crate::WordParseError::Word if word is not a valid word, such as one with a malformed expansion.