oyvindeide / trigrams Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU Affero General Public License v3.0
License: GNU Affero General Public License v3.0
Currently the implementation will only accept pure text with newlines as input, this should be expanded to also allow punctuation and special characters.
There are some short comings in the current code, try to identify it, and create a good descriptive issue:
def get_word_trigram(input_str: str)
contains input annotations, but not return annotation, while def parse_iter(tokens)
does not include any annotations
Hi, I accidentally encrypted my book and lost the key, so cant fit it in my library as I am not able to tell which book it is, nor read it! I have heard trigrams can be used in language heuristics?
I am using a simple substitution encryption, my encryption algorithm is:
def encrypt(plain_text, key):
alphabet = 'abcdefghijklmnopqrstuvwxyz'
translation = str.maketrans(alphabet, key)
return plain_text.translate(translation)
Can you help me figure out which book it is?
I have attached the encrypted file below:
I have heard https://www.gutenberg.org/ is a good source for lots of text.
Check input length (that must be more than 2)
The program is able to take an input text and create a trigram map. It should be possible to use that to output some (gibberish), but semi-plausible text.
The procedure is something like this: choose an arbitrary word pair (from the trigram map) as a starting point. Use these to look up a random next word (using the trigram map) and append this new word to the text so far. This now gives you a new word pair at the end of the text, so look up a potential next word based on these. Add this to the list, and so on.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.