Skip to content

Custom language detector node #2972

Answered by ZanSara
stazam asked this question in Questions
Aug 5, 2022 · 1 comments · 12 replies
Discussion options

You must be logged in to vote

Hello! Your approach is 90% correct! There are a couple of things to know.

  1. run takes an argument called documents. Mind that it contains a list of documents, so in the body of the function you have to iterate over them.
  2. run can produce output only on a single edge at a time. So if your documents list contains docs in different languages, you must discard some or throw an exception. In your case, this might be an issue...

There are other ways to approach this problem, so don't worry yet 😄 First of all I need to know, how does your pipeline look like, and how did you write your documents into the document store? What I have in mind is that you should rather add a language metadata tag to …

Replies: 1 comment 12 replies

Comment options

You must be logged in to vote
12 replies
@ZanSara
Comment options

@stazam
Comment options

@stazam
Comment options

@ZanSara
Comment options

@ZanSara
Comment options

Answer selected by stazam
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants