Using auto-generated suggestions

With our suggestion engine, Lettria brings together models, ML and algorithms to enrich an existing ontology attached to your project.

Adding new words to your ontology improves text comprehension by defining specific terms related specifically to your data:

  • Names of products, categories, terminologies or nomenclatures specific to your activity
  • Internal terms specific to your company or department
  • Notions related to your sector of activity
  • Ways of speaking, abbreviations

With our suggestion engine, Lettria brings together models, ML and algorithms to enrich an existing ontology attached to your project.

It is therefore necessary to have at least

  • a project
  • an ontology attached to this project
💡 Tip: If the ontology is empty, these features will not be used to their full potential. The more classes you have and the more structured your taxonomy is, the more effective the suggestions will be.
  1. Lettria will generate suggestions
  2. Lettria will analyse where to insert new information in your ontology
  3. You will manage the suggestions to accept or decline them

Code format

Input​

{
# TEXT TO PROCESS - - - - - - - - - - - - -
'text' : (string) # (optional) input text to process ( key 'text' is not processed if key 'documents' is set )
'documents' : (list) # (optional) list of string/dict ( key 'documents' is not processed if key 'lettria_json' is set )
'lettria_json' : (dict/list) # (optional) Lettria API main json

# NEW SUGGESTIONS TO INSERT - - - - - - - -
'suggestions' : [ # (optional) list of suggestions to insert in ontology ( If key 'suggestions' is not set (or empty) : will process text to find new suggestions )
{
'string' : (string), # suggestion value
'lang' : (string), # (optional) the suggestion language
'target_class_name' : (string), # (optional) target class name ( where to insert suggestion )
'target_class_id' : (string), # (optional) target class id ( where to insert suggestion )
},
...
]

# PROJET - - - - - - - - - - - - -
'project_id' : (string) # (optional) Lettria platform project id ( this key is necessary to process text )
'ontology_id' : (string) # targeted ontology id (If key is not set (or empty) : first ontology attached to project is used)
'Authorization' : (string) # platform LettriaProKey

# OPTION - - - - - - - - - - - - -
'coref' : (bool) # (optional) unable/disable coreference
'save_suggestions' : (bool) # (optional) save automaticaly suggestions in ontology
}
 

Output​

List of suggestions
[
{
"classId" : null/string # class id where to insert suggestion
"classLabel" : null/string, # class name (if class id is not known)
"classParentId" : null/string, # parent class id (for creating child class)
"classParentLabel" : null/string, # parent class name (if parent class id is not known)
"type" : string # suggestion type
"string" : string # suggestion value
"lang" : string # suggestion language
"origin" : string # suggestion origin
},
...
]