Closed Vayel closed 6 years ago
This function is too specific for the library, I can add it without the mapping usl -> post list
as the first argument but only an usl list (the mapping is application specific).
I think just provide a function to return a mapping term -> usl that contains this term
@ogrergo to compute the score of a cell, you need to know how many times a usl appears in the collection.
Yes but the score of an usl is application-related. Intlekt scores the tables given the number of posts they quote, the "post" is an Intlekt concept. So I don't think the scoring of tables should be hard coded in ieml.
Maybe with an optional parameter number_of_citations : usl -> int
, representing the number of posts using this usl, we can calculate a pertinence metric in the library.
@ogrergo Maybe your function could take a list of usls with potential duplicates. For instance
['A:', 'E:', 'E:']
would mean that the collection has three posts, one with the usl A:
and the two others with the usl E:
.
Just move this function here: https://github.com/IEMLdev/django-intlekt/blob/master/django_intlekt/views/dictionary.py#L268