## 5 The Determination of the Weights
Moreover, some of them are more robust to outliers, and less sensitive to the initial conditions. However, in our study most performance-related problems on the clustering are mitigated, because the clustering is made on a mono-dimensional space, with a proximity function that facilitates the granulation process, with a limited number of points and of clusters. Thus, the clustering process converges very quickly, in a very few iterations. We adopted the basic FCM version as it has been used very successfully in many applications, having a simple iterative scheme and good convergence properties. The FCM algorithm minimizes an objective function representing a clusters compactness measure, by iteratively improving fuzzy membership degrees until no further improvement is possible. More specifically, the cluster centers are computed as the weighted average of all data points, _i.e._, \(c_{h}=\sum_{i=1}^{n}\mu_{ih}^{m}\cdot u_{i}\Big{/}\sum_{i=1}^{n}\mu_{ih}^{m}\), whereas the fuzzy membership degrees are computed as follows:  
\[\mu_{ih}=\Bigg{/}\Bigg{\sum_{ \begin{subarray}{c}j=1\\ j\
eq i\end{subarray} }^{D}\Bigg{(}\frac{d(u_{i},c_{h})^{2}}{d(u_{i},c_{j})^{2} }\Bigg{)}^{1/(m-1)} \tag{10}\]  
where \(d\) is a proximity function and \(m>1\) is a parameter called _fuzziness_. The choice of the proximity function determines the success of a clustering algorithm on the specific application domain [37]. As a proximity function, we adopted formula (9), which facilitates the granulation process. FCM approaches HCM when \(m\) is approaching 1. The larger the value of \(m\) (up to infinity), the larger the similarity of the clusters. The parameter is usually set to 2. We adopted this value since its effect is marginal in our system. The FCM method requires also the number of categories D as input. Different fuzzy partitions are obtained with different number of categories. Thus, a cluster validity index is required to validate each of the fuzzy partitions and to establish the optimal partition [38], _i.e._, the optimal number of categories. The FCM validation procedure used to determine the optimal number of clusters is made of the following steps:  
1. initialize the parameters of the FCM except for the number of clusters, \(D\);
2. execute the FCM algorithm for different values of D, ranging from 2 to a maximum, established in the design stage or at runtime;
3. compute the validity index for each partition provided by step (ii);
4. choose the optimal partition and the optimal number of categories according to the validity index. To find the optimal number of categories, we adopted the Xie-Beni validity index, which optimizes compactness and separation of categories [39]:\[P=\frac{\sum_{i=1}^{n}\sum_{j=1}^{D}\mu_{i}^{m}\cdot d\left(u_{i},c_{j}\right)^{2} }{n\cdot\min\limits_{i\
eq j}d\left(c_{i},c_{j}\right)} \tag{11}\]  
where the numerator and the denominator indicate compactness and separation, respectively. Thus, the best partition corresponds to the minimum value of P.  
In conclusion, the overall optimization process can be summarized as follows. First, a segmentation of the sentence into subsequences is performed. Second, the usage values (points) of each subsequence in the Web are computed. Third, a number of clusters is chosen. Fourth, point coefficients are assigned randomly for each cluster. Fifth, the centroid of each cluster is computed. Sixth, point coefficients are computed for each cluster. Seventh, go to the fifth step, if there is no convergence in coefficients. Eighth, the Xie-Beni index of clusters is computed. Ninth, go to the third step if a new number of clusters should be assessed. Tenth, provide the coefficients of the clustering process related to the best Xie-Beni index. Eleventh, coefficients are employed to assign the weights of the network. More formally, the optimization algorithm can be defined as follows. ```
01:\(G\leftarrow\) Tokenize(input sentence);
02:\(G^{\prime}\!\!