Skip to content

Instantly share code, notes, and snippets.

View generall's full-sized avatar
📡

Andrey Vasnetsov generall

📡
View GitHub Profile
@generall
generall / .zshrc
Last active August 29, 2015 14:19
My .zshrc
# загружаем дефолтный профиль оболочки
source /etc/profile
#
# тут немного всякой хери, смысл которой я сам не особо понимаю
#
# Use hard limits, except for a smaller stack and no core dumps
unlimit
limit stack 8192
@generall
generall / load_from_mystem.cpp
Last active August 29, 2015 13:57
load from mystem
void CCorpus::loadWithMystem(const std::string& fname)
{
std::system(("./mystem -e UTF-8 -n -l -i -w " + fname + " > " + fname + ".m").c_str());
std::ifstream from_mystem((fname + ".m").c_str());
std::string line;
std::string temp;
while (std::getline(from_mystem, line))
{
// 3 -> 1 CC
//Найти последний символ
2q1->2q1R
1q1->1q1R
0q1->0q1R
Bq1->Bq2L // Нашли последний символ, встали на него и начинаем вычитание
//Вычесть 1 из троичного числа
2q2->1q3R // Прибавление 1 к единичному числу