Feature request: add layer for darts lookup table?

Open
#1,225 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
cpp, tensorflow

Research direction

Start with the issue's proposed build, common-prefix search, and exact-match search APIs, including their tensor inputs and outputs. Define the implementation scope and validation needed for a TensorFlow Text layer, with done meaning the three requested operations and default-value behavior are specified and supported.

Written by the indexing model from the issue text.

Description

In some cases, it can be more efficient and memory-efficient than hashtable in tensorflow.

It should be great if darts lookup table has following methods

  • build:
    • Arguments: strings tensors(key), int tensors(values), and default value
  • common prefix search:
    • Arguments: string tensors
    • Returns: ragged tensor for searched results, and results' value
  • exact match search:
    • Arguments: string tensors
    • Returns: searched value, or default value for unknown strings
Dominant language
C++
Stars
1.3k
Forks
379
Avg merge
3h 30m
Merged PRs (30d)
8

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from tensorflow/text

All issues in tensorflow/text

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.