import React, { FC } from "react"; import cn from "classnames"; import { SegmentDetailModel } from "@/models/datasets"; import { useTranslation } from "react-i18next"; import Divider from "@/app/components/base/divider"; import { SegmentIndexTag } from "../documents/detail/completed"; import s from "../documents/detail/completed/style.module.css"; import ReactECharts from "echarts-for-react"; type IScatterChartProps = { data: Array curr: Array } const ScatterChart: FC = ({ data, curr }) => { const option = { xAxis: {}, yAxis: {}, tooltip: { trigger: 'item', axisPointer: { type: 'cross' } }, series: [ { type: 'effectScatter', symbolSize: 5, data: curr, }, { type: 'scatter', symbolSize: 5, data, } ] }; return ( ) } type IHitDetailProps = { segInfo?: Partial & { id: string }; vectorInfo?: { curr: Array; points: Array }; }; const HitDetail: FC = ({ segInfo, vectorInfo }) => { const { t } = useTranslation(); return (
{segInfo?.word_count} {t("datasetDocuments.segment.characters")}
{segInfo?.hit_count} {t("datasetDocuments.segment.hitCount")}
{segInfo?.content}
{t("datasetDocuments.segment.keywords")}
{!segInfo?.keywords?.length ? "-" : segInfo?.keywords?.map((word: any) => { return
{word}
; })}
{t("datasetDocuments.segment.vectorHash")}
{segInfo?.index_node_hash}
); }; export default HitDetail;