Git Product home page Git Product logo

typescript-tokenizer's Introduction

TypeScript Tokenizer

This is an experimental module! Expect changes and breakage!

Most search utilities are not prepared for source code. They have lists of stopwords that are in English, parsers and tokenizers that don't work with code. This is an attempt at creating a tool to extract useful tokens from TypeScript source. Right now it works by:

  1. Parsing TypeScript with tree-sitter to get useful things like identifier names but avoid not-useful things like keywords.
  2. Feeding the probably-english parts of that AST into natural to run a porter/stemmer/stopwords-removal routine on it.
  3. Returning this all in a format that is, we hope, friendly for Postgres’s preferences.

typescript-tokenizer's People

Contributors

tmcw avatar

Stargazers

Matthew Fainman avatar

Watchers

 avatar André Vitor Terron avatar Steve Krouse 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.