functions.predict module#
- functions.predict.predict_rel(sc_model, rel_model, text)#
Predicts spans and the relations between them contained in given text determined by the given span categorization and relation extraction model.
- Parameters:
- Returns:
Dictionary with each key being a tuple of span labels for which a relation exists, and each value being a list of tuples containing a tuple of the related span texts and prediction confidence score of that relation.
- Return type:
- functions.predict.predict_span(sc_model, text)#
Predicts spans contained in given text determined by the given span categorization model.
- Parameters:
- Returns:
Dictionary with each key corresponding to a span label, and each value being a list of tuples containing the span text and prediction confidence score of that label.
- Return type: