diff --git a/shorts-crawler/src/main/kotlin/com/mashup/shorts/core/modern/CrawlerCore.kt b/shorts-crawler/src/main/kotlin/com/mashup/shorts/core/modern/CrawlerCore.kt index 918f95d1..b1244302 100644 --- a/shorts-crawler/src/main/kotlin/com/mashup/shorts/core/modern/CrawlerCore.kt +++ b/shorts-crawler/src/main/kotlin/com/mashup/shorts/core/modern/CrawlerCore.kt @@ -3,7 +3,6 @@ package com.mashup.shorts.core.modern import java.time.LocalDateTime import java.time.format.DateTimeFormatter.ofPattern import org.jsoup.select.Elements -import org.springframework.beans.factory.annotation.Qualifier import org.springframework.context.annotation.Primary import org.springframework.stereotype.Component import com.mashup.shorts.KeywordExtractor @@ -37,7 +36,7 @@ class CrawlerCore( private val newsRepository: NewsRepository, private val newsBulkInsertRepository: NewsBulkInsertRepository, private val newsCardBulkInsertRepository: NewsCardBulkInsertRepository, - @Qualifier("LuceneAnalyzerKeywordExtractorV2") private val keywordExtractor: KeywordExtractor, + private val keywordExtractor: KeywordExtractor, private val rankingGenerator: RankingGenerator, ) { diff --git a/shorts-keyword-extractor/src/main/kotlin/com/mashup/shorts/core/legacy/LuceneAnalyzerKeywordExtractor.kt b/shorts-keyword-extractor/src/main/kotlin/com/mashup/shorts/core/legacy/LuceneAnalyzerKeywordExtractor.kt index ba840c6a..c048db52 100644 --- a/shorts-keyword-extractor/src/main/kotlin/com/mashup/shorts/core/legacy/LuceneAnalyzerKeywordExtractor.kt +++ b/shorts-keyword-extractor/src/main/kotlin/com/mashup/shorts/core/legacy/LuceneAnalyzerKeywordExtractor.kt @@ -6,15 +6,14 @@ import org.apache.lucene.analysis.TokenStream import org.apache.lucene.analysis.ko.KoreanTokenizer import org.apache.lucene.analysis.ko.KoreanTokenizer.DecompoundMode import org.apache.lucene.analysis.tokenattributes.CharTermAttribute -import org.springframework.beans.factory.annotation.Qualifier import org.springframework.stereotype.Component import com.mashup.shorts.KeywordExtractor -import com.mashup.shorts.consts.stopWords import com.mashup.shorts.consts.CONTENT_WEIGHT import com.mashup.shorts.consts.TITLE_WEIGHT +import com.mashup.shorts.consts.stopWords @Component -@Qualifier("LuceneAnalyzerKeywordExtractor") +@Deprecated("Deprecated By BM25 KeywordExtractor") class LuceneAnalyzerKeywordExtractor : KeywordExtractor { override fun extractKeyword(title: String, content: String): String { diff --git a/shorts-keyword-extractor/src/main/kotlin/com/mashup/shorts/core/modern/LuceneAnalyzerKeywordExtractorV2.kt b/shorts-keyword-extractor/src/main/kotlin/com/mashup/shorts/core/modern/LuceneAnalyzerKeywordExtractorV2.kt index e7cbbfc1..54d28607 100644 --- a/shorts-keyword-extractor/src/main/kotlin/com/mashup/shorts/core/modern/LuceneAnalyzerKeywordExtractorV2.kt +++ b/shorts-keyword-extractor/src/main/kotlin/com/mashup/shorts/core/modern/LuceneAnalyzerKeywordExtractorV2.kt @@ -7,13 +7,13 @@ import org.apache.lucene.analysis.TokenStream import org.apache.lucene.analysis.ko.KoreanTokenizer import org.apache.lucene.analysis.ko.KoreanTokenizer.DecompoundMode import org.apache.lucene.analysis.tokenattributes.CharTermAttribute -import org.springframework.beans.factory.annotation.Qualifier +import org.springframework.context.annotation.Primary import org.springframework.stereotype.Component import com.mashup.shorts.KeywordExtractor import com.mashup.shorts.consts.stopWords +@Primary @Component -@Qualifier("LuceneAnalyzerKeywordExtractorV2") class LuceneAnalyzerKeywordExtractorV2 : KeywordExtractor { /* 변수 `k1`에 대한 부연 설명 By K-Diger