alessioferrari / tram

a framework for transforming and reusing requirements models
0 stars 0 forks source link

Model ranking #21

Open alessioferrari opened 10 years ago

alessioferrari commented 10 years ago

We shall add a function that builds an index according to the tf-idf score. To this end, we shall:

  1. get the number of stems in a model, and store them in a first version of the index.

Currently this might be sufficient for our implementation. If more than one term of the query occur in the model this model shall be always ranked higher than models where only one term occurs very often. However, we could also keep the stems separated and rank the models only according to the frequency of the term.

  1. when the index is completed we shall compute the idf value
  2. update the first version of the index with the tf-idf value Then we can be able to rank the models according to the frequency of the searched terms. The ranking shall be given according to a combination of the tf-idf of all the stems.