viv:bold
bolds words in a string
Synopsis
string viv:bold (query-str, str, class-root, stem, kb, segmenter, content-type, keep-tags, bag-of-words); string query-str; string str; string class-root; stem stem; kb kb; segmenter segmenter; "text"|"html" content-type; Boolean keep-tags; Boolean bag-of-words;
Description
Applies bold elements around a set of (query) phrases in a given string.
Arguments
- query-str: a newline separated list of target phrases that will be bolded.
- str: the text to be bolded.
- class-root: if specified, instead of using b, the query phrases will be highlighted using span with a class attribute appending this class-root to the rank of the query phrases (e.g., 'cr0', 'cr1', etc if set to 'cr'). By default this is set to '' (and the regular bold tag is used).
- stem: a + separated list of stemmer names that will be applied to both strings before identifying matches. By default this is set to "none".
- kb: a + separated list of knowledge bases that will be applied to both strings before identifying matches. By default this is set to "none".
- segmenter: the segmenter that will be applied to both strings before identifying matches. By default this is set to "none".
- content-type: the content type of the string to be bolded. By default this is set to "html".
- keep-tags: if true(), the tags in the original string are kept in the output. By default this is false().
- bag-of-words: if true(), the phrases to be bolded are matched as "bag of words" (i.e., the order of the words in the phrase does not matter)
Returns
a string with bolded target phrases