Shorthand generation rule is used to automatically generate shorthands from full text (words or phrases). You might skip the rigid syntax explanation and directly jump to the examples if you feel like it. It's easier to understand the syntax after you've seen some examples.
In the following rule, square brackets are used to represent optional components. You needn't input the square brackets.
[n1:]e1,e2,...,ex;[n2:]e1,e2,...,ex;...
A rule consists of one or more blocks. Blocks are separated by semicolons. Each block has an optional prefix. The prefix consists of a number followed by a colon, like 'n1: ', 'n2:'. The prefix indicates the following block will be applied to the n-th word. That word is called the object word for the rule block. For those blocks that don't have a prefix, the indexes of their object words increase sequentially one by one.
Besides the prefix, each block consists of one or more items, like e1, e2, e3. Items are separated by commas. There are different kinds of items as listed below,
1. [-]n1[~n2]
This item specifies one or more characters in the current word. n1 indicates this item represents the n1-th character. The prefix '-' indicates a right-to-left order. So -n1 means the n1-th character counting from the right end. If '~n2' is specified, this items indicates a range of characters in the current word. n1~n2 means the range of characters from the n1-th one to the n2-th one. -n1~n2 means the same range but starts to count from the right end.
2. 'str
This item represents a constant string. This item enables you to insert a constant string into the generated shorthand. For example, 'abc will add 'abc' to the generated shorthand.
3. csn[(n)]
'csn' is a special function used to extract a given number of consonants from the object word. This function will always extract the first character no matter whether it's vowel or consonant. If you don't specify the parameter n, it will extract all the consonants. Otherwise, it will extract n consonants other than the first letter. For example, if you apply csn(3) to the word 'IntelliComplete', you will get 'ultm'. If you apply csn(5) to 'FlashPeak', you will get 'flshpk'.
1:1~3;2:1~2;3:1;'z
This rule extracts the first 3 characters from the first word, the first 2 characters from the second word, the first character from the third word and terminates with a 'z'. If this rule is applied to the phrase 'for the sake of', the generated shorthand will be 'forthsz'. If applied to the phrase 'as soon as possible', the shorthand will be 'assoaz'. Because the first word 'as' consists of only two characters, the rule item '1~3' can only extract 2 characters. To avoid conflict, it's recommended to terminate a shorthand with a letter that's seldom the last letter of a regular word. This rule can be simplified as,
1~3;1~2;1;'z
This is because the indexes of the object words of each block increase one by one.
'q;1:-1~4;2:-1~2;3:-1;'xx
The rule begins the shorthand with a letter 'q', extracts the last 4 characters from the first word, the last 2 characters from the second word, the last character from the third word and terminates the shorthand with 'xx'.
1:csn(3);2:1,-1;'v
The rule extracts the first letter and 3 consonants from the first word, extracts the first and last letter of the second word, then terminates the shorthand with a letter 'v'. For example, if this rule is applied to the phrase 'FlashPeak IntelliComplete', the resulted shorthand will be 'flshulv'.