Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Primary documents #87

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Primary documents #87

wants to merge 4 commits into from

Conversation

asmetliness
Copy link
Collaborator

No description provided.

@@ -39,14 +41,27 @@ class InvertedIndex(private val standProperties: StandProperties) : LuceneReposi
entities.forEach { save(it) }
}

fun findByTokens(tokens: Collection<String>): Sequence<NeighboursDocument> {
Copy link
Collaborator

@viacheslav-dobrynin viacheslav-dobrynin May 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут еще можно буст квери использовать, как вот в этой функции Артема:
image
наверное зря мы туда засунули analyze, можно обобщить функцию BoW query

@@ -68,6 +68,7 @@ class InvertedIndexBuilder(
documentEmbeddingRepository.findByDocId(docId).embedding
}
NeighboursDocument(
token = contextualizedEmbedding.tokenWithEmbeddingId.split(ContextualizedEmbedding.TOKEN_AND_EMBEDDING_ID_SEPARATOR).first(),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

выглядит кривовато, что мы одно поле парсим и в тот же объект складываем результат.
как proof of concept норм
но думаю, если решим мержить, то можно что-нибудь придумать с этим

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants