This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* INFO | |
This class allows you to use Llama2 in a `nodejs` project. | |
The class spawns a process which can be setup using instructions from here https://replicate.com/blog/run-llama-locally | |
The communication between llama2 and node is done using `stdin/stdout` interface. | |
*/ | |
/* USAGE EXAMPLE |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class RuEnUrlTransliterator { | |
constructor () { | |
this.init() | |
} | |
private ruEn: Record<string, string> = {} | |
private enRu: Record<string, string> = { | |
a: 'а', | |
b: 'б', | |
v: 'в', |