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
... код поскипан ... | |
static string RebuildVerb2(SolarixGrammarEngineNET.GrammarEngine2 gren, SolarixGrammarEngineNET.SyntaxTreeNode v_node, string qword) | |
{ | |
if( string.IsNullOrEmpty(qword)) | |
{ | |
return null; | |
} | |
List<int> coords = new List<int>(); |
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
# -*- coding: utf-8 -*- | |
''' | |
Ответчик. | |
Использует все ранее обученные скриптами relevancy_model и qa_model модели | |
и выполняет следующие действия: | |
1) с консоли вводится вопрос. | |
2) ищется наиболее подходящая предпосылка из списка, загружаемого из текстового файла. | |
3) определяется способ конструирования ответа - yes/no или word copy. | |
4) ответ генерируется и печатается. | |
''' |
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
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
# -*- coding: utf-8 -*- | |
""" | |
Генерация словарных статей для деепричастий по статьям инфинитивов. | |
""" | |
from __future__ import division # for python2 compatability | |
from __future__ import print_function | |
import codecs | |
import collections |
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
# -*- coding: utf-8 -*- | |
''' | |
Генерация word2vector моделей для слов. | |
Используется готовый корпус, в котором каждое слово отделено пробелами, и каждое | |
предложение находится на отдельной строке. | |
''' | |
from __future__ import print_function | |
from gensim.models import word2vec | |
import logging |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using NNSharp.DataTypes; | |
namespace sample1 | |
{ | |
class Program |
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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using NNSharp.DataTypes; | |
namespace sample1 | |
{ | |
class Program |
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
# -*- coding: utf-8 -*- | |
""" | |
Использование автоматического дифференцирования autograd (https://github.com/HIPS/autograd) | |
для решения линейной регрессии МНК. | |
Код может решать только задачу линейно регрессии, так как | |
в нем отдельно выписывается градиентный спуск по каждому из двух | |
компонентов решения через частные производные. | |
""" |
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
# -*- coding: utf-8 -*- | |
""" | |
Использование автоматического дифференцирования autograd (https://github.com/HIPS/autograd) | |
для решения линейной регрессии МНК. | |
""" | |
from __future__ import print_function | |
import autograd.numpy as np |
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
# -*- coding: utf-8 -*- | |
""" | |
Решение задачи линейно регрессии по МНК с помощью Keras. | |
""" | |
from __future__ import print_function | |
import random | |
import numpy as np |
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
# -*- coding: utf-8 -*- | |
''' | |
Сортировка списка предложений через последовательное применение LSA и t-SNE (встраивание | |
векторов LSA в 1d) | |
''' | |
from __future__ import division # for python2 compatability | |
from __future__ import print_function | |
import codecs |
OlderNewer