mirror of
https://github.com/magnum-opus-nn-cp/word-plugin.git
synced 2024-11-21 16:16:34 +03:00
feat: add total metric
This commit is contained in:
parent
d9d3bec53b
commit
a4cb23807c
|
@ -5,7 +5,7 @@ export type DetailDescriptor = {
|
|||
features: DetailFeatures;
|
||||
};
|
||||
|
||||
export type ScoreType = "bert" | "f" | "nearest";
|
||||
export type ScoreType = "bert" | "f" | "nearest" | "total";
|
||||
|
||||
export type ScoreDescriptor = {
|
||||
[key in ScoreType]: {
|
||||
|
|
|
@ -113,8 +113,7 @@ export const App: FC<PropsWithChildren<AppProps>> = () => {
|
|||
},
|
||||
});
|
||||
|
||||
const answer = textEntity?.score?.[typeKey]?.answer;
|
||||
const metric = textEntity?.score?.[typeKey]?.metric;
|
||||
const answer = textEntity?.score?.["total"] as unknown as string;
|
||||
const summary = textEntity?.summary;
|
||||
|
||||
const initRef = useRef(false);
|
||||
|
@ -177,7 +176,6 @@ export const App: FC<PropsWithChildren<AppProps>> = () => {
|
|||
<h3>Результат оценки</h3>
|
||||
<p>
|
||||
Оценочный рейтинг: {answer} <br />
|
||||
{metric && `Точность: ${metric.toFixed(2)}`}
|
||||
</p>
|
||||
<h4>Краткое содержание</h4>
|
||||
<p>{summary}</p>
|
||||
|
|
Loading…
Reference in New Issue
Block a user