Git Product home page Git Product logo

Comments (5)

klues avatar klues commented on August 11, 2024 1

Take a look at my library "predictionary": https://asterics.github.io/predictionary/demo/
It uses a dictionary of the most common words for basic prediction and stores already typed sentences in order to suggest/predict them, if typed again.

from freespeech.

samwightt avatar samwightt commented on August 11, 2024

Actually know a little bit about this! So basic prediction software uses something called Markov chains, which are basically a probabilistic state machine (kinda like what XState does but where you move randomly from one state to another via a probability). Keyboard prediction tools set each word as a node in the state machine, then go through each node and use some counting algorithm to link each node to words that come after that node and assign probabilities to it. This is usually done by analyzing a bunch of text. So for instance, if a computer analyzed text and saw the word 'hot' and saw the word 'dog' coming after it a lot, the link between 'hot' and 'dog' would get a higher probability. Still a bit rusty on how exactly those probabilities are assigned though. Hope this helps!

from freespeech.

cyberhck avatar cyberhck commented on August 11, 2024

I'd love it if we could find this as a docker image, that'd help a lot (or even basic thing like only word completion would also help initially)

from freespeech.

samwightt avatar samwightt commented on August 11, 2024

from freespeech.

cyberhck avatar cyberhck commented on August 11, 2024

but won't we need to store some data? (or you mean get the predefined data and load the whole thing on js?)

because if we store the data that'd mean it'll get better the more you use it.

from freespeech.

Related Issues (20)

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.