mirror of
https://github.com/datahub-project/datahub.git
synced 2025-10-30 18:26:58 +00:00
13 lines
549 B
TypeScript
13 lines
549 B
TypeScript
import { lowQualitySuggestionConfidenceThreshold } from 'wherehows-web/constants';
|
|
|
|
/**
|
|
* Takes a list of suggestions with confidence values, and if the confidence is greater than
|
|
* a low confidence threshold
|
|
* @param {number} confidenceLevel percentage indifcating how confidence the system is in the suggested value
|
|
* @return {boolean}
|
|
*/
|
|
const isHighConfidenceSuggestion = ({ confidenceLevel = 0 }: { confidenceLevel: number }): boolean =>
|
|
confidenceLevel > lowQualitySuggestionConfidenceThreshold;
|
|
|
|
export { isHighConfidenceSuggestion };
|