|
@@ -1,59 +1,11 @@
|
|
|
package com.tzld.piaoquan.featurestools;
|
|
|
|
|
|
-import com.tzld.piaoquan.featurestools.job.CreativeVideoUnderstandJob;
|
|
|
-import com.tzld.piaoquan.featurestools.job.SummarizeUnderstandingJob;
|
|
|
-import com.tzld.piaoquan.featurestools.service.TextEmbeddingService;
|
|
|
-import org.junit.jupiter.api.Test;
|
|
|
-import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
-import org.springframework.core.io.ClassPathResource;
|
|
|
-
|
|
|
-import java.io.BufferedReader;
|
|
|
-import java.io.FileReader;
|
|
|
-import java.io.IOException;
|
|
|
-import java.io.InputStreamReader;
|
|
|
-import java.util.HashSet;
|
|
|
-import java.util.Set;
|
|
|
|
|
|
|
|
|
@SpringBootTest
|
|
|
class FeaturesToolsApplicationTests {
|
|
|
|
|
|
- @Autowired
|
|
|
- private CreativeVideoUnderstandJob creativeVideoUnderstandJob;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private SummarizeUnderstandingJob summarizeUnderstandingJob;
|
|
|
-
|
|
|
- @Autowired
|
|
|
- private TextEmbeddingService textEmbeddingService;
|
|
|
-
|
|
|
- @Test
|
|
|
- void contextLoads() throws InterruptedException {
|
|
|
- creativeVideoUnderstandJob.videoUnderstander("");
|
|
|
- }
|
|
|
-
|
|
|
- @Test
|
|
|
- void contextLoads1() throws InterruptedException {
|
|
|
-// System.out.println(textEmbeddingService.getEmbedding("福利来了,绿树成荫,健康自然,亲切自信"));
|
|
|
- summarizeUnderstandingJob.summarizeUnderstanding("");
|
|
|
- }
|
|
|
-
|
|
|
- private static final Set<String> stopwords = new HashSet<String>();
|
|
|
-
|
|
|
- @Test
|
|
|
- void cc() throws IOException {
|
|
|
- // 创建 ClassPathResource 对象,指定资源文件路径
|
|
|
- ClassPathResource resource = new ClassPathResource("stopwords_cn.txt");
|
|
|
- // 获取文件输入流
|
|
|
- BufferedReader reader = new BufferedReader(new InputStreamReader(resource.getInputStream()));
|
|
|
- String line;
|
|
|
- while ((line = reader.readLine()) != null) {
|
|
|
- stopwords.add(line.trim());
|
|
|
- }
|
|
|
-
|
|
|
- System.out.println("stopwords = " + stopwords);
|
|
|
|
|
|
- }
|
|
|
|
|
|
}
|