MarkLogic 12 EA 1 Product Documentation
cts:part-of-speech

cts:part-of-speech(
   $token as cts:token
) as xs:string

Summary

Returns the part of speech for a cts:token, if any.

Parameters
token A token, as returned from cts:tokenize.

Usage Notes

This function is useful for testing custom tokenizers. Built in tokenizers do not use parts of speech and will return an empty string for the part of speech.

Example

cts:part-of-speech(cts:tokenize("an example","en"))
=> ("","","")
Powered by MarkLogic Server | Terms of Use | Privacy Policy