Giter Club home page Giter Club logo

universal-sentence-encoder-xling-runway's Introduction

Universal Sentence Encoder (Runway port)

This repository contains a simple wrapper to use Google's Universal Sentence Encoder with Runway.

Usage

The Runway model exposes one command, embed, that accepts a text parameter as input and produces two arrays as output: one with an array of sentences in text, and another with sentence embeddings for each sentence with the corresponding index in the array of sentences.

An optional tokenize_sentences parameter, if set to yes, uses NLTK's sent_tokenize function to parse the value in text into sentences before passing them along to the embedder. Otherwise, text is interpreted as a list of sentences separated by newline characters.

Details

This code uses the Cross-lingual (XLING) Universal Sentence Encoder, which Google advertises as working with English, French, German, Spanish, Italian, Chinese, Korean, and Japanese. But note that the sentence tokenizer used in this port is specific to English, and will not return good results for other languages! If you're getting embeddings for sentences from other languages, you may want to set the tokenize_sentences parameter to no and feed the model pre-tokenized sentences.

universal-sentence-encoder-xling-runway's People

Contributors

aparrish avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

rogalag radames

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.