Literal Similarity Metrics
Although symptoms are denominated by TCM doctors without the support of authoritative editorial board and a symptom might be described in several different names owing to different experience and background of TCM doctors, symptom names describing the same symptom usually have literal similarity due to the ideographic characteristics of Chinese. For example, both '' and '' mean head and they have the same ideographic character '' (Head). Both '' and '' mean that a person sweats in upper limb, and they also have the same ideographic characters '' (Upper Limb) and '' (Perspiration). Therefore, literal similarity metrics are considered to be used to measure the similarity between symptom names.
In spite of different experience and background of TCM doctors, symptoms are generally denominated with some loose conventions inherited historically and followed by most of TCM doctors. In general, a symptom name of TCM contains sequentially expressions of the affected body part, the disease property and the disease degree. For example, in the symptom name '' (Severe Headache) the affected body part is '' (Head), '' (Ache) is the disease property and '' (Severe) represents the disease degree. In '' (Throat Tickle) '' (Throat) is the affected body part with '' (Tickle) being the disease property. Among the components of a symptom name some may be missing such as in '' (Throat Tickle) the disease degree is absent. However, the component affected body part appears in most of symptom names (66.97% (363/542) of the standard symptom names and 70.10% (3130/4465) of the clinical symptom names contain the affected body part in our experimental data) and, moreover, it is usually the prefix when it appears in a symptom name (66.61% (361/542) of the standard symptom names and 55.83% (2493/4465) of the clinical symptom names start with the affected body part). Therefore, prefix of symptom names is considered to be an enhanced factor to determine the literal similarity.
According to the observations discussed above, four literal similarity metrics are used here for validating the feasibility, and JaroWinkler Distance is also used to demonstrate the effect of the symptom name prefix.
Jaro Distance Metric
Jaro Distance (JD) [4] is one of the most popular and basic literal similarity metrics, and here JD score is defined as follows:
Where m is the number of matching characters between a standard symptom name s and a clinical symptom name s', t is the number of transpositions of the characters, i.e. the count of matching characters but in different order in s and s' [5], s and s' are the number of characters in s and s' respectively.
JaroWinkler Distance Metric
JaroWinkler Distance (JWD) [4] is extended from JD and adjusts the score of JD upwards for the symptom name pairs having common prefixes. JWD is introduced as follows:
Where JD(s, s') is the JD score of a standard symptom name s and a clinical symptom name s', prefixLength is the length of their common prefix, and PREFIXSCALE is a constant scaling factor for measuring how much the score is adjusted upwards for a symptom name pair having a common prefix (Here three is assigned to PREFIXSCALE).
SmithWaterman Distance Metric
SmithWaterman Distance (SWD) [6] is a dynamic programming algorithm, and it is guaranteed to find symptom name pairs which have the optimal local alignment with respect to a gapscoring scheme and a scoring system including a substitution matrix. The substitution matrix M for comparing a symptom name pair is constructed as follows.
Where sc_{
i
}is the i th character in a standard symptom name s and is the j th character in a clinical symptom name s', m is the length of s and n is the length of s', M(i, j) is the similarity score between the substring sc_{1}sc_{2}...sc_{
i
}of s and the substring of s', ω (sc_{
i
}, ), ω (sc_{
i
}, ) and ω (, ) are the gapscoring schemes described by [6] in detail.
SmithWatermanGotoh Distance Metric
SmithWatermanGotoh Distance (SWGD) [7] is an improved algorithm of SWD. It allows multiplesized gaps, and speeds up to O(MN) instead of O(M^{2}N) of SWD (where M and N are the lengths of a standard and a clinical symptom names respectively).
RemedyBased Similarity Metrics
According to the TCM theory, the same or similar symptoms are always treated by the same or similar groups of remedies (i.e. the corresponding remedies of the symptoms). For example, '' and '' are two similar symptom names representing throat pain in TCM, and they are both treated by the common remedies '' (Honeysuckle), '' (Chrysanthemum) and '' (Fructus Arctii). Therefore, the information about the corresponding remedies of a standard and a clinical symptom names is involved to determine whether they express the same symptom. Three remedybased similarity metrics are proposed below to measure the similarity between a standard and a clinical symptom names using their corresponding remedies.
SetBased Similarity Metric
The SetBased similarity metric adopts Jaccard coefficient to measure the similarity between a standard and a clinical symptom names using their corresponding remedy sets. It is represented by the following formula.
Where s and s' are a standard and a clinical symptom names respectively, R and R' are their corresponding remedy sets, R ∪ R' is the number of elements in the union of R and R', and R ∩ R' is the number of elements in the intersection of R and R' .
VectorSpaceModelBased Similarity Metric
In TCM the remedy potency for curing different symptoms is not equivalent. Some remedies are often used to treat a symptom and seldom to treat the others. Appearance of such remedies is an important evidence to distinguish this symptom from the others. However, the SetBased similarity metric does not measure and use the importance of remedies toward a particular symptom, presupposing that remedies are equivalent for all symptoms. To estimate the importance of a remedy toward a particular symptom, TFIDF weighting scheme is involved as follows.
Let s_{
i
}be a symptom name, R_{
i
}be its corresponding remedy bag containing all the occurrences of remedies in the prescriptions with the symptom name s_{
i
}, and R be the set of all remedies in TCM. For any r_{
j
}∈ R, its weight w_{i, j}for s_{
i
}is defined as follows:
Where f_{i, j}is the frequency of occurrence of r_{
j
}in R_{
i
}, R is the number of remedies in R, df_{
j
}is the number of the symptom names whose corresponding remedy bags contain r_{
j
}.
Thus a vector in multidimensional space is constructed naturally by the weighted remedies to describe every symptom name. For a standard symptom name s_{
m
}and a clinical symptom name s_{
n
}, if their corresponding remedy bags are R_{
m
}and R_{
n
}, the following vectors are used to describe R_{
m
}and R_{
n
}.
Then similarity between s_{
m
}and s_{
n
}can be measured by the cosine metric defined bellow.
SimRankBased Similarity Metric
The SetBased and VectorSpaceModelBased similarity metrics presuppose the independence among the corresponding remedies. However, the hypothesis may be violated owing to the fact that some remedies are alternative i.e. they have the same or similar effects. For example, the remedies '' (Hawthorn) and '' (Endothelium Corneum Gigeriae Galli) have the same effect and they all can be used to treat the symptom '' (Anorexia). According to the intuition that "two objects are similar if they are related to similar objects" [8], an observation is derived that two symptom names may be same or similar if they have same or similar corresponding remedies and two remedies are similar (or they have similar curative effects) if they are used to treat same or similar symptoms. Following the observation and based on the SimRank algorithm [8], the mutually recursive computational process of SimS (the similarity of two symptom names) and SimR (the similarity of two remedy names) are described as follows.

(1)
Initialize SimS and SimR as follows.

(2)
Iteratively update SimS and SimR using the formulas below until the termination condition is met.
Where k represents the k th iteration and k ≥ 1, R and R' are the corresponding remedy sets of symptom names s and s' respectively, R and R' are the sizes of R and R', r_{
i
}and are the i th and the j th remedies in R and R' . Similarly, S and S' are the corresponding symptom name sets of r and r' (S and S' both contain standard symptom names as well as clinical symptom names), S and S' are the sizes of S and S', s_{
i
}and are the i th and the j th symptom names in S and S', C is called as 'confidence level' or 'decay factor' and it is a constant value between 0 and 1 (the signification and argument of C can refer to [8]). SimRank was introduced by [8] in detail. In this paper, when k equals 4 the iterative procedure is terminated.
Hybrid Similarity Metrics
Both literal similarity metrics and remedybased similarity metrics have their advantages respectively, but the disadvantages also exist. Literal similarity metrics cannot distinguish the symptom names which have high literal similarity but with different or even opposite meanings. Remedybased similarity metrics can find similar symptom names which are cured by similar remedies, but they ignore the literal characteristics of symptom names.
Therefore, a hybrid strategy which integrates literal similarity and remedybased similarity is investigated for making up for the disadvantages of each other. The strategy is drawn from the following observation.
Observation: Two s ymptom names expressing the same symptom have the similar corresponding r emedies, at the same time the s ymptom names should be literally s imilar (named SRSS).
According to the observation, the hybrid strategy (i.e. SRSS) is constructed as follows.
Where s and s' are a standard and a clinical symptom names respectively, α and β are the weights of Sim_{
L
}(s, s') and Sim_{
RB
}(s, s'), Sim_{
L
}(s, s') denotes literal similarity which can be computed through any literal similarity metric discussed above, Sim_{
RB
}(s, s') expresses remedybased similarity, and its definition can be chosen among all the remedybased similarity metrics. Instantiation of Sim_{
L
}(s, s'), Sim_{
RB
}(s, s') and their weights will result in a particular hybrid similarity metric.