rephrase
Conceptually like a search-and-replace on the clustered input
Description
Warning: conceptually, rephrase rules are like search-and-replace, but they do not actually modify the text. Instead, they change the representation of the text used for clustering.
The search step treats the this element as HTML (tagged) input and matches any equivalent sequence of text. For example, <rephrase this="rephrase" as="re-phrase" /> will change rephrase as well as rephrasing, etc. (depending on the selected stemmer). The as may optionally be an abstract stem class.
Attributes
- async (Boolean default: true) - Asynchronous processing. For parse tags, should the request be enqueued (false) or processed before its next sibling. For other elements, this attribute only makes a difference when they contain asynchronous requests which need to be processed before the element is processed. In this case, when false the element's next sibling will only be processed after the current element, when true Watson Explorer won't wait for the current element to be processed before processing its next sibling.
- elt-id (Integer) - Usage: Internal
- max-elt-id (Integer) - Usage: Internal
- execute-acl (Text)
- process (Text) - An XPath determining which of the attributes and/or children will be processed. Currently only "", "*", "@*" and "*|@*" are supported.
- modified-date (Integer)
- stemmer (Text)
- user (Text)
- word-stem (Text)
- as-stem
- this-stem
- this ( The this portion of rephrase rules and the when portion of evoke are processed as if they were HTML text and may also contain the following wildcards patterns: %word% any single word or number %num% any single number %punct% any punctuation symbol that is supported (see supported_punctuation) %tag% any tag in the input %any% any of the above %first% the first character in the input %query% any word that appears in the query when wildcards are matched, they can be put into the resulting string (the as in a rephrase and the new in the evoke) by using "%n%" to use the nth matching wildcard. Restricted form of xs:string) - Text to change (this is parsed as HTML text). Usage: Must be specified once all the child elements have been processed
- as (One of the types: Text Restricted form of xs:string: Pattern #\c+) - Text to use instead of the original for clustering. Usage: Must be specified once all the child elements have been processed
- weight (Decimal number default: 1) - Multiple all word weights by this value.
- content (NMToken) - Only apply the rule for a content with this name.
- no-segment (May only be: no-segment) - Disable the segmentation of all rules in this knowledge base. Usage: Experimental feature which may be officially supported in a subsequent release
Examples
Input Example:
<rephrase this="freeware" as="free software"/> <rephrase this="color" as="colour"/> <rephrase this="ngo" as="non-governmental organization"/> <rephrase this="config" as="configuration"/>
Output Example:
<rephrase this="freeware" as="free software"/> <rephrase this="color" as="colour"/> <rephrase this="ngo" as="non-governmental organization"/> <rephrase this="config" as="configuration"/>