I've been doing some NLP using tensorflow and have been using tf.contrib.lookup.index_table_from_tensor to create a look-up table for tokens.
I know tensorflow is coming out with 2.0 in Spring '19 and they've said:
"tf.contrib
TensorFlow’s contrib module has grown beyond what can be maintained and supported in a single repository. Larger projects are better maintained separately, while we will incubate smaller extensions along with the main TensorFlow code. Consequently, as part of releasing TensorFlow 2.0, we will stop distributing tf.contrib. We will work with the respective owners on detailed migration plans in the coming months, including how to publicise your TensorFlow extension in our community pages and documentation. For each of the contrib modules we will either a) integrate the project into TensorFlow; b) move it to a separate repository or c) remove it entirely. This does mean that all of tf.contrib will be deprecated, and we will stop adding new tf.contrib projects today. We are looking for owners/maintainers for a number of projects currently in tf.contrib, please contact us (reply to this email) if you are interested."
Two questions then:
1) Is there another way to build a lookup-table easily in Tensorflow?
2) I couldn't determine how likely it is that this functionality will be included in 2.0. Is there any indication?
Thanks!