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

Similarity Search #2

Closed
6 of 8 tasks
captain-pool opened this issue Feb 13, 2021 · 0 comments · Fixed by #3
Closed
6 of 8 tasks

Similarity Search #2

captain-pool opened this issue Feb 13, 2021 · 0 comments · Fixed by #3
Assignees
Labels
feature Feature to be added mvp Related to development of the Minimum Viable Product

Comments

@captain-pool
Copy link
Owner

captain-pool commented Feb 13, 2021

Overview:

  • Split the sentence to words.
  • return URL for expression.

Tasks: (similarity metric -> 0 for perfect match)

  • Precompute maximum length of phrase.
  • greedily search for word-combination (max: max-phrase-length) having minimum distance from the centroid.
  • each time vectorize the combination.
  • find the closest semantically closest word of the new formed phrase / word.
  • For proper nouns, check if present in dictionary. else, fingerspell.

NOTE: Don't count the stop words.

API Design Overview:

  • class SimSearch: properties-> vectorizer, clusterDB, dictVectDB, MAX_LENGTH_PHRASE (from config)

  • simSearch.splitTokens(sentence): iterates over each consecutive word combination and keeps track of minimum distance from the center. stop at MAX_PHRASE_LENGTH / ProperNoun reached, which ever earlier.

  • simSearch.tagPOS(word): Helper function for pos tagging.

  • simSearch.queryVideoClip(token): Query DB to obtain video clip from token.

  • simSearch.fingerspell(character_token): helper function to fingerspell mp4 of the character_token.

  • simSearch.query(setence): Stitch everything together and return list of video links. (in-order)

NOTE: Can be made faster by creating parallel jobs to work on splices of length MAX_LENGTH_PHRASE. if stopped before MAX_LENGTH_PHRASE, can be kept in a Queue with a position index in the token list.

@captain-pool captain-pool created this issue from a note in Transcript-to-ASL (To do) Feb 13, 2021
@captain-pool captain-pool self-assigned this Feb 13, 2021
@captain-pool captain-pool added feature Feature to be added mvp Related to development of the Minimum Viable Product labels Feb 13, 2021
@captain-pool captain-pool linked a pull request Feb 13, 2021 that will close this issue
@captain-pool captain-pool moved this from To do to In progress in Transcript-to-ASL Feb 13, 2021
@captain-pool captain-pool moved this from In progress to Done in Transcript-to-ASL Feb 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Feature to be added mvp Related to development of the Minimum Viable Product
Projects
Development

Successfully merging a pull request may close this issue.

1 participant