Code Monkey home page Code Monkey logo

concept-viewer's Introduction

Introducing Concept Viewer ๐Ÿš€

A visual tool to explore semantic connections between textual concepts.

alt text

Instructions

# Clone the code
git clone https://github.com/tmarti/concept-viewer

# Install dependencies
yarn

# Run the local server
yarn dev

Now you can navigate to http://localhost:5173/

Usage

  1. Enter your OpenAI API key in the input field on the top (only used for calls to the OpenAI embedding's API)

  2. On the dropdown, select a category. This will pre-populate a list of concepts related to the category. For each concept in the category, a box will appear in the 3D area.

  3. Finally, under "Your Concept" enter the concept you want explore and press enter. You'll be able to inspect visually to which concept of the category it lies semantically closer. The black ball will be placed in the 3D corresponding to your concept, and the semantically top-3 closest concepts will be informed.

How it works

When the category is represented, the sentence embeddings for its concepts are generated. Then, those embeddings are projected into the 3d-space using UMAP. The UMAP projection is then saved and reused to represent "your concept", so that the 3d space for both the category and the concept has the same "semantic coordinate system". In addition, in order to find the top-3 semantically closest concepts, the ones with the minimum diatance in tgr 3d space to the 3d position of "your concept" are picked. It would be also possible to base the distance function in the emebedding space instead of 3d space, but thr 3d space eas chosen for simplicity and because it also matches the 3d representation.

If you try it and like it

Thanks! And please consider giving a โญ to the repo, it will be appreciated :)

concept-viewer's People

Contributors

tmarti avatar

Stargazers

 avatar

Watchers

 avatar  avatar

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.