IEMLdev / ieml

IEML semantic language - a meaning-representation system based on semantic primitives and a regular grammar. Basic semantic relationships between concepts are automatically computed from syntactic similarities.
https://dev.intlekt.io/
GNU General Public License v3.0
53 stars 6 forks source link

Create a function to project posts on tables #39

Closed Vayel closed 6 years ago

Vayel commented 7 years ago

Just move this function here: https://github.com/IEMLdev/django-intlekt/blob/master/django_intlekt/views/dictionary.py#L268

ogrergo commented 7 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

Vayel commented 7 years ago

@ogrergo to compute the score of a cell, you need to know how many times a usl appears in the collection.

ogrergo commented 7 years ago

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.

Vayel commented 7 years ago

@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:.