Skip to content

Commit

Permalink
🛠移除文本相似性功能
Browse files Browse the repository at this point in the history
- 删除了 DocService 中的 getTextSimilar 方法
- 移除了 ApiMappings 中的文本相似性 API 映射
- 删除了未使用的导入语句,包括 axios 和 SimilarItem
  • Loading branch information
0xcaffebabe committed Oct 23, 2024
1 parent 8b402c9 commit b68c5e0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 26 deletions.
7 changes: 0 additions & 7 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ declare module 'vue' {
CategorySearch: typeof import('./src/components/search/CategorySearch.vue')['default']
DatasourceSelector: typeof import('./src/components/header/datasource/DatasourceSelector.vue')['default']
ElAffix: typeof import('element-plus/es')['ElAffix']
ElAlert: typeof import('element-plus/es')['ElAlert']
ElAside: typeof import('element-plus/es')['ElAside']
ElAutocomplete: typeof import('element-plus/es')['ElAutocomplete']
ElBacktop: typeof import('element-plus/es')['ElBacktop']
Expand All @@ -34,24 +33,18 @@ declare module 'vue' {
ElEmpty: typeof import('element-plus/es')['ElEmpty']
ElHeader: typeof import('element-plus/es')['ElHeader']
ElIcon: typeof import('element-plus/es')['ElIcon']
ElImage: typeof import('element-plus/es')['ElImage']
ElImageViewer: typeof import('element-plus/es')['ElImageViewer']
ElInput: typeof import('element-plus/es')['ElInput']
ElLink: typeof import('element-plus/es')['ElLink']
ElMain: typeof import('element-plus/es')['ElMain']
ElMenu: typeof import('element-plus/es')['ElMenu']
ElMenuItem: typeof import('element-plus/es')['ElMenuItem']
ElOption: typeof import('element-plus/es')['ElOption']
ElPopconfirm: typeof import('element-plus/es')['ElPopconfirm']
ElPopover: typeof import('element-plus/es')['ElPopover']
ElRadio: typeof import('element-plus/es')['ElRadio']
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
ElRow: typeof import('element-plus/es')['ElRow']
ElSelect: typeof import('element-plus/es')['ElSelect']
ElSkeleton: typeof import('element-plus/es')['ElSkeleton']
ElSlider: typeof import('element-plus/es')['ElSlider']
ElSubMenu: typeof import('element-plus/es')['ElSubMenu']
ElSwitch: typeof import('element-plus/es')['ElSwitch']
ElTable: typeof import('element-plus/es')['ElTable']
ElTableColumn: typeof import('element-plus/es')['ElTableColumn']
Expand Down
13 changes: 0 additions & 13 deletions src/build/DocService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,8 @@ import Cacheable from "@/decorator/Cacheable";
import ArrayUtils from "../util/ArrayUtils";
import CommitInfo from "@/dto/CommitInfo";
import ClusterNode from "@/dto/ClusterNode";
import axios from "axios";
import DocQuality from "../dto/doc/DocQuality";
import proxy from "node-global-proxy";
import Cache from "../decorator/Cache";
import { SimilarItem } from "@/dto/doc/SimilarItem";
import generateDocCluster from '../scripts/generateDocCluster'
import Slugger from "../util/Slugger";
import KnowledgeRichnessNode from "../dto/KnowledgeRichnessNode";
Expand Down Expand Up @@ -193,16 +190,6 @@ class DocService extends BaseService implements Cacheable {
return (await generateDocCluster.generateDocTagPrediction())
}

public async getTextSimilar(): Promise<SimilarItem[]> {
if (process.env.ENV == 'DEV') {
proxy.setConfig({
http: "http://127.0.0.1:54088", https: "http://127.0.0.1:54088"
});
proxy.start();
}
return JSON.parse((await axios.get('https://api.github.com/gists/e993023fd97fb85483d1e20361ad28c4')).data.files['textSimilar.txt'].content)
}

/**
*
* 生成显式知识网络
Expand Down
6 changes: 0 additions & 6 deletions src/plugins/ApiMappings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,6 @@ const apiMappings: DocApiItem[] = [
path: UrlConst.docQualityJson,
method: async () => DocService.generateDocQualityData()
},
{
type: 'build&runtime',
name: '相似文本',
path: UrlConst.textSimilarJson,
method: async () => DocService.getTextSimilar()
},
{
type: 'build&runtime',
name: '知识丰富度',
Expand Down

0 comments on commit b68c5e0

Please sign in to comment.