{"id":457624,"date":"2025-04-28T03:05:26","date_gmt":"2025-04-28T03:05:26","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=457624"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=457624","title":{"rendered":"<span>\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0434\u043b\u044f \u0432\u0430\u0448\u0435\u0433\u043e \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0440\u0430\u0431\u043e\u0442 (\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e!)<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0438 \u0442\u0435\u043e\u0440\u0438\u044e \u0433\u0440\u0430\u0444\u043e\u0432 \u0434\u043b\u044f\u00a0\u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. <\/p>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441\u00a0\u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0430\u0436\u043d\u043e\u0433\u043e \u044d\u0442\u0430\u043f\u0430\u00a0\u2014 <em>\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439<\/em>. \u0418\u043d\u0432\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u00a0\u0442\u043e, \u0447\u0442\u043e\u00a0\u0443\u0436\u0435\u00a0\u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0434\u0440\u0443\u0433\u0438\u043c\u0438, \u0432\u00a0\u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u044b\u00a0\u2014 \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437\u00a0\u043f\u0443\u0442\u0435\u0439 \u043a\u00a0\u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044e \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412\u0430\u0436\u043d\u043e \u043d\u0435\u00a0\u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0443\u0440\u043e\u043a\u0438 \u0438\u0437\u00a0\u043e\u043f\u044b\u0442\u0430 \u0434\u0440\u0443\u0433\u0438\u0445, \u043d\u043e\u00a0\u0438 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0435\u0433\u043e <em>\u043d\u0435\u00a0\u0441\u0442\u043e\u0438\u0442 \u0434\u0435\u043b\u0430\u0442\u044c<\/em> \u0432\u00a0\u0441\u0432\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0435\u0433\u043e \u0448\u0430\u043d\u0441\u044b \u043d\u0430\u00a0\u0443\u0441\u043f\u0435\u0445.<\/p>\n<p>\u0412\u00a0\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u0441\u0432\u043e\u0435\u0439 \u0434\u0438\u0441\u0441\u0435\u0440\u0442\u0430\u0446\u0438\u0435\u0439 \u044f \u0441\u043e\u0431\u0440\u0430\u043b \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432. \u0421\u0440\u0435\u0434\u0438 \u043d\u0438\u0445\u00a0\u0431\u044b\u043b\u0438 \u043f\u043e\u0434\u0431\u043e\u0440\u043a\u0438 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b, \u0438 Excel\u2011\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u00a0\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. \u0417\u0430\u0432\u0435\u0440\u0448\u0430\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f\u00a0\u0441\u0432\u043e\u0435\u0439 \u0434\u0438\u0441\u0441\u0435\u0440\u0442\u0430\u0446\u0438\u0438, \u044f \u0437\u0430\u0434\u0430\u043b\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c: <strong>\u0430\u00a0\u0435\u0441\u0442\u044c\u00a0\u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0433\u043b\u0430\u00a0\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u0432\u00a0\u043c\u043e\u0435\u043c \u0430\u0440\u0445\u0438\u0432\u0435, \u0438 \u043f\u043e\u043c\u043e\u0447\u044c \u043c\u043d\u0435 \u0432\u00a0\u043c\u043e\u0438\u0445 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445?<\/strong><\/p>\n<p>\u041d\u0430\u00a0\u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0435\u0441\u0442\u044c!<\/p>\n<p><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/em><\/strong><em> \u042d\u0442\u0430 \u0438\u0434\u0435\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u0430 \u043d\u0435\u00a0\u0442\u043e\u043b\u044c\u043a\u043e \u043a\u00a0\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0443 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043d\u0430\u043a\u043e\u043f\u0438\u043b\u0438 \u0432\u00a0\u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0432\u043e\u0438\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439, \u043d\u043e\u00a0\u0438 \u043a\u00a0\u043b\u044e\u0431\u043e\u043c\u0443 \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u043c\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/em><\/p>\n<h3>\u0421\u0435\u0442\u0430\u043f<\/h3>\n<p>\u042f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u044d\u0442\u0443 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Python 3. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0438\u043c \u0437\u0430\u00a0\u043f\u043e\u043c\u043e\u0449\u044c! \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0447\u0442\u043e\u2011\u0442\u043e \u043f\u043e\u0438\u0441\u0442\u0438\u043d\u0435 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435!<\/p>\n<p>\u042d\u0442\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0446\u0435\u043b\u044b\u0439 \u0440\u044f\u0434 \u0440\u0430\u0437\u043d\u044b\u0445 API, \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0434\u043b\u044f\u00a0\u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f.<\/p>\n<pre><code class=\"python\">import string  import csv from io import StringIO from pptx import Presentation import docx2txt import PyPDF2 import spacy import pandas as pd  import numpy as np import nltk  import re import openpyxl from nltk.stem import WordNetLemmatizer from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity from gensim.parsing.preprocessing import STOPWORDS as SW nltk.download('stopwords') nltk.download('wordnet') nltk.download('omw-1.4') nltk.download('averaged_perceptron_tagger') from nltk.corpus import wordnet import networkx as nx from networkx.algorithms.shortest_paths import weighted import glob<\/code><\/pre>\n<h4>\u041f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u044f<\/h4>\n<p>\u041e\u0434\u043d\u0438\u043c \u0438\u0437\u00a0\u0441\u0430\u043c\u044b\u0445 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u0439, \u0441\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f,\u00a0\u0431\u044b\u043b\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u043e\u0433\u043b\u0430 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u044f \u0445\u043e\u0442\u0435\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u00a0\u043b\u0438 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 Excel \u043f\u043e\u0445\u043e\u0436\u0443\u044e \u0438\u043b\u0438\u00a0\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0441\u00a0\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u0437\u00a0PowerPoint \u0438 \u043d\u0430\u0443\u0447\u043d\u043e\u0433\u043e \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442\u0435 PDF. \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443, \u044f \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043b \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0438\u043f \u0444\u0430\u0439\u043b\u0430 \u043d\u0430\u00a0Python \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u043b \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432\u00a0\u0441\u0442\u0440\u043e\u043a\u0443, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0443\u044e \u0438\u0437\u00a0\u0441\u043b\u043e\u0432. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043c\u043d\u0435 <em>\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c<\/em> \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0430.<\/p>\n<h4>\u041a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f PDF<\/h4>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u00a0\u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441 <strong>PdfReader<\/strong>. \u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f\u00a0\u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f PDF\u2011\u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430\u00a0\u044f\u0437\u044b\u043a\u0435 Python. \u0421\u0440\u0435\u0434\u0438 \u0432\u0441\u0435\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 \u0444\u0430\u0439\u043b\u043e\u0432 \u044f\u00a0\u0431\u044b \u043e\u0442\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e\u00a0PDF\u2011\u0444\u0430\u0439\u043b\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c\u0438 \u0438\u0437\u00a0\u0441\u0430\u043c\u044b\u0445 \u0432\u0430\u0436\u043d\u044b\u0445, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u043d\u043e\u0433\u0438\u0435 \u0436\u0443\u0440\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u0435 \u0438\u0437\u00a0\u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a\u00a0Google Scholar, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u00a0\u044d\u0442\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435.<\/p>\n<pre><code class=\"python\">class pdfReader:      def __init__(self, file_path: str) -&gt; str:         self.file_path = file_path      def PDF_one_pager(self) -&gt; str:         \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435              pdf.              \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:             one_page_pdf (str): \u0441\u0442\u0440\u043e\u043a\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0430\u044f \u0432\u0435\u0441\u044c \u0442\u0435\u043a\u0441\u0442 pdf-\u0444\u0430\u0439\u043b\u0430.          \"\"\"         content = \"\"         p = open(self.file_path, \"rb\")         pdf = PyPDF2.PdfReader(p)         num_pages = len(pdf.pages)         for i in range(0, num_pages):             content += pdf.pages[i].extract_text() + \"n\"         content = \" \".join(content.replace(u\"xa0\", \" \").strip().split())         page_number_removal = r\"d{1,3} of d{1,3}\"         page_number_removal_pattern = re.compile(page_number_removal, re.IGNORECASE)         content = re.sub(page_number_removal_pattern, '',content)          return content      def pdf_reader(self) -&gt; str:         \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 .pdf              \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 PDF-\u0444\u0430\u0439\u043b, \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u043d\u0430 python.              \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:             read_pdf: A python readable .pdf file.         \"\"\"         opener = open(self.file_path,'rb')         read_pdf = PyPDF2.PdfFileReader(opener)          return read_pdf      def pdf_info(self) -&gt; dict:         \"\"\" \u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439         \u0441\u043b\u043e\u0432\u0430\u0440\u044c PDF.           \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:         dict(pdf_info_dict): \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435         \u043e\u0431\u044a\u0435\u043a\u0442\u0430.         \"\"\"         opener = open(self.file_path,'rb')         read_pdf = PyPDF2.PdfFileReader(opener)         pdf_info_dict = {}         for key,value in read_pdf.documentInfo.items():             pdf_info_dict[re.sub('\/',\"\",key)] = value         return pdf_info_dict      def pdf_dictionary(self) -&gt; dict:         \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c              \u043a\u043b\u044e\u0447\u0430\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b,\u0430 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445 - \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.              \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:             dict(pdf_dict): \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0442\u0435\u043a\u0441\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044f.         \"\"\"         opener = open(self.file_path,'rb')          read_pdf = PyPDF2.PdfReader(opener)         length = read_pdf.pages         pdf_dict = {}         for i in range(length):             page = read_pdf.getPage(i)             text = page.extract_text()             pdf_dict[i] = text             return pdf_dict<\/code><\/pre>\n<h4>\u041a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f Microsoft Powerpoint<\/h4>\n<p>\u041a\u043b\u0430\u0441\u0441 <strong>pptReader<\/strong> \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f\u00a0\u0447\u0442\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 Microsoft Powerpoint \u0432\u00a0Python.<\/p>\n<pre><code class=\"python\">class pptReader:      def __init__(self, file_path: str) -&gt; None:         self.file_path = file_path      def ppt_text(self) -&gt; str:     \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0442\u0435\u043a\u0441\u0442\u0430 \u0438\u0437 \u0432\u0441\u0435\u0445         \u0441\u043b\u0430\u0439\u0434\u043e\u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 pptReader.        \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:       text (str): \u0441\u0442\u0440\u043e\u043a\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0430\u044f \u0442\u0435\u043a\u0441\u0442        \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u0430\u0439\u0434\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 pptReader.    \"\"\"       prs = Presentation(self.file_path)       text = str()        for slide in prs.slides:         for shape in slide.shapes:           if not shape.has_text_frame:               continue           for paragraph in shape.text_frame.paragraphs:             for run in paragraph.runs:               text += ' ' + run.text       return text<\/code><\/pre>\n<h4>\u041a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 Microsoft Word<\/h4>\n<p>\u041a\u043b\u0430\u0441\u0441 <strong>wordDocReader <\/strong>\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b Microsoft Word \u0432\u00a0Python \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e API <em>doc2txt<\/em>. \u041e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u00a0\u0442\u0435\u043a\u0441\u0442\u043e\u043c\/\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439\u0441\u044f \u0432\u00a0\u0434\u0430\u043d\u043d\u043e\u043c Word\u2011\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435.<\/p>\n<pre><code class=\"python\">class wordDocReader:   def __init__(self, file_path: str) -&gt; str:     self.file_path = file_path    def word_reader(self):   \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0449\u0430\u044f \u043e\u0431\u044a\u0435\u043a\u0442 wordDocReader \u0432 \u0444\u043e\u0440\u043c\u0430\u0442,      \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u0432 Python word-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442.\"\"\"      text = docx2txt.process(self.file_path)     text = text.replace('n', ' ')     text = text.replace('xa0', ' ')     text = text.replace('t', ' ')     return text <\/code><\/pre>\n<h4>\u041a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f Microsoft Excel<\/h4>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u0432\u0442\u043e\u0440\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0432\u00a0\u0441\u0432\u043e\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u00a0\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442\u0435 Excel. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0438 \u0434\u0430\u0436\u0435 \u0441\u0430\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043d\u0430\u00a0\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0438\u0449\u0435\u0442\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0437\u0443\u0447\u0430\u0435\u0442\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u00a0\u0441\u0442\u0430\u0440\u044b\u0445 \u043a\u043e\u0442\u0438\u0440\u043e\u0432\u043a\u0430\u0445 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0430\u043a\u0446\u0438\u0438, \u0442\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438 \u0441\u0438\u043c\u0432\u043e\u043b, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0\u0442\u0430\u0431\u043b\u0438\u0446\u0435 Excel \u0441\u00a0\u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041d\u0430\u0448\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0432\u0430\u043c \u044d\u0442\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0447\u0442\u043e\u00a0\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442 \u0432\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">class xlsxReader:      def __init__(self, file_path: str) -&gt; str:         self.file_path = file_path      def xlsx_text(self):       \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435           Excel-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442.            \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:           text(str): \u0441\u0442\u0440\u043e\u043a\u0430 \u0441 \u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.       \"\"\"       inputExcelFile = self.file_path       text = str()       wb = openpyxl.load_workbook(inputExcelFile)       #\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 excel-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 \u0432\u0438\u0434\u0435 CSV-\u0444\u0430\u0439\u043b\u0430       for sn in wb.sheetnames:         excelFile = pd.read_excel(inputExcelFile, engine = 'openpyxl', sheet_name = sn)         excelFile.to_csv(\"ResultCsvFile.csv\", index = None, header=True)          with open(\"ResultCsvFile.csv\", \"r\") as csvFile:            lines = csvFile.read().split(\",\") # \"rn\" \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e           for val in lines:             if val != '':               text += val + ' '           text = text.replace('ufeff', '')           text = text.replace('n', ' ')       return textCSV File Reader<\/code><\/pre>\n<p>\u041a\u043b\u0430\u0441\u0441 <strong>CSVReader<\/strong> \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0430\u043c \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c CSV\u2011\u0444\u0430\u0439\u043b\u044b \u0432\u00a0\u0432\u0430\u0448\u0443 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432\u00a0\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<pre><code class=\"python\">class csvReader:      def __init__(self, file_path: str) -&gt; str:         self.file_path = file_path      def csv_text(self):       \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443          csv-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.            \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:           text(str): \u0441\u0442\u0440\u043e\u043a\u0430 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c csv-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.       \"\"\"       text = str()       with open(self.file_path, \"r\") as csvFile:          lines = csvFile.read().split(\",\") # \"rn\" if needed         for val in lines:           text += val + ' '         text = text.replace('ufeff', '')         text = text.replace('n', ' ')       return textMicrosoft PowerPoint Reader<\/code><\/pre>\n<p>\u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442\u00a0\u2014 \u043d\u0435\u00a0\u043c\u043d\u043e\u0433\u0438\u0435 \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u00a0\u0442\u043e\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0446\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432\u00a0\u0442\u0435\u043a\u0441\u0442\u0430\u0445 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0439 PowerPoint. \u042d\u0442\u0438 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f\u00a0\u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u043d\u0435\u0441\u0442\u0438 \u0434\u043e\u00a0\u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0438\u0434\u0435\u0438 \u0438 \u0432\u0430\u0436\u043d\u044b\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u0412\u00a0\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 PowerPoint, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0441\u0442\u044c \u0432\u00a0\u0432\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u00a0\u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u044b\u0435 \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b.<\/p>\n<pre><code class=\"python\">class pptReader:      def __init__(self, file_path: str) -&gt; str:         self.file_path = file_path      def ppt_text(self):       \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435          \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 Microsoft PowerPoint.          \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:         text(str): \u0441\u0442\u0440\u043e\u043a\u0430 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.     \"\"\"       prs = Presentation(self.file_path)       text = str()       for slide in prs.slides:         for shape in slide.shapes:           if not shape.has_text_frame:               continue           for paragraph in shape.text_frame.paragraphs:             for run in paragraph.runs:               text += ' ' + run.text        return textMicrosoft Word Document Reader<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c \u0432\u00a0\u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0434\u043b\u044f\u00a0\u0447\u0442\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 Microsoft Word. Word\u2011\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0435\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0430\u0436\u043d\u044b\u0439 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u041c\u043d\u043e\u0433\u0438\u0435 \u043b\u044e\u0434\u0438 \u043f\u0438\u0448\u0443\u0442 \u043e\u0442\u0447\u0435\u0442\u044b, \u0432\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0438\u0437\u043b\u0430\u0433\u0430\u044e\u0442 \u0441\u0432\u043e\u0438 \u0432\u044b\u0432\u043e\u0434\u044b \u0438 \u0438\u0434\u0435\u0438 \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442\u0435 Word\u2011\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.<\/p>\n<pre><code class=\"python\">class wordDocReader:   def __init__(self, file_path: str) -&gt; str:     self.file_path = file_path    def word_reader(self):     \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435         \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 Microsoft Word.            \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:           text(str): \u0441\u0442\u0440\u043e\u043a\u0430 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.       \"\"\"     text = docx2txt.process(self.file_path)     text = text.replace('n', ' ')     text = text.replace('xa0', ' ')     text = text.replace('t', ' ')     return text <\/code><\/pre>\n<p>\u0412\u00a0\u043d\u0430\u0448\u0435\u043c \u0441\u0435\u0433\u043e\u0434\u043d\u044f\u0448\u043d\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435 \u043c\u044b \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u043c\u0441\u044f \u044d\u0442\u0438\u043c\u0438 \u043a\u043b\u0430\u0441\u0441\u0430\u043c\u0438. <strong>\u041e\u0431\u0440\u0430\u0442\u0438\u0442\u0435 \u0432\u043d\u0438\u043c\u0430\u043d\u0438\u0435<\/strong>, \u0447\u0442\u043e\u00a0\u0435\u0441\u0442\u044c \u043c\u043d\u043e\u0433\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f\u00a0\u0443\u043b\u0443\u0447\u0448\u0435\u043d\u0438\u044f \u0432\u0430\u0448\u0435\u0439 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0432\u00a0\u0432\u0435\u0440\u0441\u0438\u0438 \u043a\u043e\u0434\u0430, \u043d\u0430\u0434 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u0432\u00a0\u0434\u0430\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442, \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0438\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u044f \u0438 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0438\u0445 \u0441\u00a0\u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u043c\u0438 \u0432\u00a0\u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<hr\/>\n<h3>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<h4>\u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430<\/h4>\n<p>\u0412\u00a0\u044d\u0442\u043e\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f\u00a0\u043d\u0430\u0448\u0435\u0439 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u0414\u0430\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430\u00a0\u0431\u044b\u043b\u0430 \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u0430 \u0434\u043b\u044f\u00a0\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0430 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u0440\u0430\u0431\u043e\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0432\u0430\u0436\u043d\u043e\u00a0\u0431\u044b\u043b\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u043d\u0430\u00a0\u0447\u0430\u0441\u0442\u0438 \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u044f\u0434\u0430 \u044d\u0442\u0430\u043f\u043e\u0432 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0441\u00a0\u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u043d\u0438\u0435\u043c NLP.<\/p>\n<p>\u041a\u043b\u0430\u0441\u0441 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e <em>datapreprocessor<\/em>. \u041f\u0435\u0440\u0432\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0432\u00a0\u044d\u0442\u043e\u043c \u043a\u043b\u0430\u0441\u0441\u0435\u00a0\u2014 \u0441\u0440\u0435\u0434\u0441\u0442\u0432\u043e \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u0432\u0430\u043d\u0438\u044f \u0447\u0430\u0441\u0442\u0435\u0439 \u0440\u0435\u0447\u0438.<\/p>\n<pre><code class=\"python\">class dataprocessor:   def __init__(self):     return    @staticmethod   def get_wordnet_pos(text: str) -&gt; str:     \"\"\"\u0421\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u044c\u0442\u0435 POS-\u0442\u0435\u0433 \u0441 \u043f\u0435\u0440\u0432\u044b\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439     \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f lemmatize()     Inputs:     text(str): \u0441\u0442\u0440\u043e\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u0430      \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:     tag_dict(dict): \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0442\u0435\u0433\u043e\u0432     \"\"\"     tag = nltk.pos_tag([text])[0][1][0].upper()     tag_dict = {\"J\": wordnet.ADJ,                 \"N\": wordnet.NOUN,                 \"V\": wordnet.VERB,                 \"R\": wordnet.ADV}      return tag_dict.get(tag, wordnet.NOUN)<\/code><\/pre>\n<p>\u042d\u0442\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u043c\u0435\u0447\u0430\u0435\u0442 \u0447\u0430\u0441\u0442\u0438 \u0440\u0435\u0447\u0438 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430, \u0447\u0442\u043e\u00a0\u0431\u0443\u0434\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e \u0434\u043b\u044f\u00a0\u0434\u0430\u043b\u044c\u043d\u0435\u0439\u0448\u0435\u0433\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u00a0\u043f\u0440\u043e\u0435\u043a\u0442\u0435.<\/p>\n<p>\u0414\u0430\u043b\u0435\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0448\u0430\u0433\u0438 NLP, \u0443\u0436\u0435 \u0445\u043e\u0440\u043e\u0448\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u044b\u0435 \u043c\u043d\u043e\u0433\u0438\u043c \u0438\u0437\u00a0\u043d\u0430\u0441. \u042d\u0442\u0438 \u0448\u0430\u0433\u0438 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442:<\/p>\n<ol>\n<li>\n<p>\u041f\u0435\u0440\u0435\u0432\u043e\u0434 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430 \u0432\u00a0\u043d\u0438\u0436\u043d\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u043a\u043e\u0432 \u043f\u0440\u0435\u043f\u0438\u043d\u0430\u043d\u0438\u044f.<\/p>\n<\/li>\n<li>\n<p>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0446\u0438\u0444\u0440 (<em>\u043c\u0435\u043d\u044f \u043d\u0435\u00a0\u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043e\u0432\u0430\u043b\u0430 \u0447\u0438\u0441\u043b\u043e\u0432\u0430\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f, \u043d\u043e\u00a0\u0432\u044b \u043f\u0440\u0438\u00a0\u0436\u0435\u043b\u0430\u043d\u0438\u0438 \u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u044d\u0442\u043e\u0442 \u0448\u0430\u0433<\/em>).<\/p>\n<\/li>\n<li>\n<p>\u0423\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043f\u2011\u0441\u043b\u043e\u0432.<\/p>\n<\/li>\n<li>\n<p>\u041b\u0435\u043c\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f. <strong>\u0412\u043e\u0442 \u0433\u0434\u0435 \u043d\u0430\u043c \u043f\u0440\u0438\u0433\u043e\u0434\u0438\u0442\u0441\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f get_wordnet_pos() \u0434\u043b\u044f\u00a0\u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u044f \u0447\u0430\u0441\u0442\u0435\u0439 \u0440\u0435\u0447\u0438!<\/strong><\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\">@staticmethod   def preprocess(text: str):     \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u0442 \u044d\u0442\u0430\u043f\u044b \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0439     \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u043e\u0439 \u0442\u0435\u043a\u0441\u0442\u0430 (NLP).       Inputs:       text(str): \u0441\u0442\u0440\u043e\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u0430        \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:       text(str): \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u0430\u044f \u0441\u0442\u0440\u043e\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u0430       \"\"\"     #\u043d\u0438\u0436\u043d\u0438\u0439 \u0440\u0435\u0433\u0438\u0441\u0442\u0440     text = text.lower()      #\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0437\u043d\u0430\u043a\u043e\u0432 \u043f\u0440\u0435\u043f\u0438\u043d\u0430\u043d\u0438\u044f     text = \"\".join([i for i in text if i not in string.punctuation])      #\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0446\u0438\u0444\u0440(\u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0447\u0438\u0441\u043b\u043e\u0432\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439)     text = [x for x in text.split(' ') if x.isnumeric() == False]      #\u0443\u0434\u0430\u043b\u0435\u043d\u0438\u0435 \u0441\u0442\u043e\u043f-\u0441\u043b\u043e\u0432     stopwords = nltk.corpus.stopwords.words('english')     custom_stopwords = ['n','nn', '&amp;amp;', ' ', '.', '-', '$', '@']     stopwords.extend(custom_stopwords)      text = [i for i in text if i not in stopwords]     text = ' '.join(word for word in text)      #\u043b\u0435\u043c\u043c\u0430\u0442\u0438\u0437\u0430\u0446\u0438\u044f     lm = WordNetLemmatizer()     text = [lm.lemmatize(word, dataprocessor.get_wordnet_pos(word)) for word in text.split(' ')]     text = ' '.join(word for word in text)      text = re.sub(' +', ' ',text)      return text<\/code><\/pre>\n<p>\u0418 \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u0434\u043b\u044f\u00a0\u0447\u0442\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u00a0\u0441\u0438\u0441\u0442\u0435\u043c\u0435:<\/p>\n<pre><code class=\"python\">@staticmethod   def data_reader(list_file_names):     \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438\u0437 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0430 \u0444\u0430\u0439\u043b\u043e\u0432.      \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:     list_file_names(list): \u0441\u043f\u0438\u0441\u043e\u043a \u043f\u0443\u0442\u0435\u0439 \u043a \u0444\u0430\u0439\u043b\u0430\u043c \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435.      \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:      text_list (list): \u0441\u043f\u0438\u0441\u043e\u043a, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442     \u0441\u043e\u0431\u043e\u0439 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435      file_dict(dict): \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u043a\u043b\u044e\u0447\u0430\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u043c\u044f \u0444\u0430\u0439\u043b\u0430,     \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2014 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u0444\u0430\u0439\u043b\u0435     \"\"\"      text_list = []     reader = dataprocessor()     for file in list_file_names:       temp = file.split('.')       filetype = temp[-1]       if filetype == \"pdf\":         file_pdf = pdfReader(file)         text = file_pdf.PDF_one_pager()        elif filetype == \"docx\":         word_doc_reader = wordDocReader(file)         text = word_doc_reader.word_reader()        elif filetype == \"pptx\" or filetype == 'ppt':         ppt_reader = pptReader(file)         text = ppt_reader.ppt_text()        elif filetype == \"csv\":         csv_reader = csvReader(file)         text = csv_reader.csv_text()        elif filetype == 'xlsx':         xl_reader = xlsxReader(file)         text = xl_reader.xlsx_text()       else:         print('File type {} not supported!'.format(filetype))         continue        text = reader.preprocess(text)       text_list.append(text)       file_dict = dict()       for i,file in enumerate(list_file_names):         file_dict[i] = (file, file.split('\/')[-1])     return text_list, file_dict<\/code><\/pre>\n<p><strong>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u044d\u0442\u043e\u00a0\u043b\u0438\u0448\u044c \u043f\u0435\u0440\u0432\u0430\u044f \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b, \u044f \u0445\u043e\u0447\u0443 \u043f\u043e\u0434\u0447\u0435\u0440\u043a\u043d\u0443\u0442\u044c, \u0447\u0442\u043e\u00a0\u043a\u043e\u0434 \u043c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c \u043b\u0435\u0433\u043a\u043e \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u043d \u0434\u043b\u044f\u00a0\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0430 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0438\u043f\u043e\u0432 \u0444\u0430\u0439\u043b\u043e\u0432!<\/strong><\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u043e\u0434\u00a0\u0438\u043c\u0435\u043d\u0435\u043c <strong>database_preprocess()<\/strong> \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u0430 \u0434\u043b\u044f\u00a0\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0438 \u0432\u0441\u0435\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u00a0\u0432\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u0441\u043f\u0438\u0441\u043e\u043a \u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u0430\u0436\u0434\u044b\u0439 \u0438\u0437\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u0436\u0435 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u0443\u044e \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443. \u0417\u0430\u0442\u0435\u043c \u044d\u0442\u0438 \u0441\u0442\u0440\u043e\u043a\u0438 \u0441\u00a0\u0442\u0435\u043a\u0441\u0442\u043e\u043c \u043f\u043e\u0434\u0432\u0435\u0440\u0433\u0430\u044e\u0442\u0441\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e <strong>tfidVectorizer<\/strong> \u0438\u0437\u00a0\u043f\u0430\u043a\u0435\u0442\u0430 <strong>sklearn<\/strong>. \u0427\u0442\u043e\u00a0\u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e \u043e\u043d \u0434\u0435\u043b\u0430\u0435\u0442? \u0412\u00a0\u0441\u0443\u0449\u043d\u043e\u0441\u0442\u0438, tfidVectorizer \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u0435\u0442 \u0432\u0435\u0441\u044c \u0442\u0435\u043a\u0441\u0442 \u0432\u00a0\u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u044b \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432, \u043e\u0441\u043d\u043e\u0432\u044b\u0432\u0430\u044f\u0441\u044c \u043d\u0430\u00a0\u0447\u0430\u0441\u0442\u043e\u0442\u0435 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0441\u043b\u043e\u0432\u0430. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u043c \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u043f\u043e\u0434\u043e\u0431\u0438\u044f \u0438\u0437\u00a0\u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0439 \u0430\u0440\u0438\u0444\u043c\u0435\u0442\u0438\u043a\u0438.<\/p>\n<pre><code class=\"python\">@staticmethod @staticmethod   def database_processor(file_dict,text_list: list):     \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0449\u0430\u044f \u0442\u0435\u043a\u0441\u0442 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445      \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440.      \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:      file_dict(dict): \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u043a\u043b\u044e\u0447\u0430\u043c\u0438 \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u043c\u044f     \u0444\u0430\u0439\u043b\u0430, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2014 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u043c \u0444\u0430\u0439\u043b\u0435     text_list (list): \u0441\u043f\u0438\u0441\u043e\u043a, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u0430\u0436\u0434\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442     \u0441\u043e\u0431\u043e\u0439 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u0443\u044e \u0441\u0442\u0440\u043e\u043a\u0443 \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0444\u0430\u0439\u043b\u0430 \u0432 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0435      \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:      list_dense(list): \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u044b.     vectorizer: \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0442\u043e\u0440, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u044b\u0439 \u0434\u043b\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f     \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0442\u0435\u043a\u0441\u0442\u0430     file_vector_dict(dict): \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043a\u043b\u044e\u0447\u0430\u043c\u0438     \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0438\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432, \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2014     \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u043c\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f\u043c\u0438 \u0442\u0435\u043a\u0441\u0442\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u0445 \u0444\u0430\u0439\u043b\u043e\u0432.     \"\"\"     file_vector_dict = dict()     vectorizer = TfidfVectorizer()     vectors = vectorizer.fit_transform(text_list)     feature_names = vectorizer.get_feature_names_out()     matrix = vectors.todense()     list_dense = matrix.tolist()     for i in range(len(list_dense)):       file_vector_dict[file_dict[i][1]] = list_dense[i]      return list_dense, vectorizer, file_vector_dict<\/code><\/pre>\n<p>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430, \u043f\u043e\u00a0\u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0442\u043e\u0440 \u0440\u0430\u0437\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u00a0\u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432\u00a0\u0442\u043e\u043c, \u0447\u0442\u043e\u00a0\u043a\u043e\u0433\u0434\u0430 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0432\u0432\u043e\u0434\u0438\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0442\u0435\u0440\u043c\u0438\u043d\u043e\u0432 \u0434\u043b\u044f\u00a0\u043f\u043e\u0438\u0441\u043a\u0430 \u0432\u00a0\u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u044d\u0442\u0438 \u0441\u043b\u043e\u0432\u0430 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u00a0\u0432\u0435\u043a\u0442\u043e\u0440\u044b \u043d\u0430\u00a0\u043e\u0441\u043d\u043e\u0432\u0435 \u0438\u0445 \u0447\u0430\u0441\u0442\u043e\u0442\u044b \u0432\u00a0\u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0431\u0430\u0437\u0435. <strong>\u042d\u0442\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u044b\u043c \u0441\u043b\u0430\u0431\u044b\u043c \u043c\u0435\u0441\u0442\u043e\u043c \u0442\u0435\u043a\u0443\u0449\u0435\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b. \u041f\u043e\u00a0\u043c\u0435\u0440\u0435 \u0440\u043e\u0441\u0442\u0430 \u043e\u0431\u044a\u0435\u043c\u0430 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u0440\u0435\u043c\u044f \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u0441\u0443\u0440\u0441\u044b, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u0434\u043b\u044f\u00a0\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043f\u043e\u0434\u043e\u0431\u0438\u0439, \u0431\u0443\u0434\u0443\u0442 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0442\u044c\u0441\u044f, \u0447\u0442\u043e\u00a0\u0437\u0430\u043c\u0435\u0434\u043b\u0438\u0442 \u0440\u0430\u0431\u043e\u0442\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/strong> \u041e\u0434\u043d\u0430 \u0438\u0437\u00a0\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f\u00a0\u0431\u044b\u043b\u0430 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0430 \u043d\u0430\u00a0\u0441\u043e\u0432\u0435\u0449\u0430\u043d\u0438\u0438 \u043f\u043e\u00a0\u043a\u043e\u043d\u0442\u0440\u043e\u043b\u044e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0430, \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0430\u0441\u044c \u0432\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0441\u00a0\u043f\u043e\u0434\u043a\u0440\u0435\u043f\u043b\u0435\u043d\u0438\u0435\u043c \u0434\u043b\u044f\u00a0\u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u043f\u043e\u00a0\u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u044f\u043c \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a \u0432\u0432\u043e\u0434\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0431\u0430\u0442\u044b\u0432\u0430\u0442\u044c \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043b\u043e\u0432\u043e, \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u0432\u00a0\u0432\u0438\u0434\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u0430. \u042d\u0442\u043e \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0432\u0432\u043e\u0434\u0430 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432\u00a0\u043f\u043e\u0438\u0441\u043a\u043e\u0432\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443:<\/p>\n<pre><code class=\"python\">@staticmethod   def input_processor(text, TDIF_vectorizor):     \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0442\u0435\u043a\u0441\u0442\u0430 \u0438      \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0438\u0440\u0443\u0435\u0442 \u0442\u0435\u043a\u0441\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e TDIF-\u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0442\u043e\u0440\u0430.      \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:     text(str): \u0441\u0442\u0440\u043e\u043a\u0430 \u0442\u0435\u043a\u0441\u0442\u0430     TDIF_vectorizor: \u041f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u043d\u044b\u0439 \u0432\u0435\u043a\u0442\u043e\u0440\u0438\u0437\u0430\u0442\u043e\u0440      \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:     words(list): \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u0442\u0435\u043a\u0441\u0442\u0430 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435.     \"\"\"     words = ''     total_words = len(text.split(' '))     for word in text.split(' '):       words += (word + ' ') * total_words       total_words -= 1      words = [words[:-1]]     words = TDIF_vectorizor.transform(words)     words = words.todense()     words = words.tolist()     return words<\/code><\/pre>\n<p>\u0422\u0430\u043a \u043a\u0430\u043a\u00a0\u0432\u0441\u044f \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044f \u0432\u00a0\u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u0438\u00a0\u0435\u0435 \u043f\u0435\u0440\u0435\u0434\u0430\u0447\u0435 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0430 \u0432\u00a0\u0432\u0438\u0434\u0435 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <strong>\u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442<\/strong> \u0434\u043b\u044f\u00a0\u0440\u0430\u0441\u0447\u0435\u0442\u0430 \u0443\u0433\u043b\u0430 \u043c\u0435\u0436\u0434\u0443 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438. \u0427\u0435\u043c \u0431\u043b\u0438\u0436\u0435 \u0443\u0433\u043e\u043b \u043a\u00a0\u043d\u0443\u043b\u044e, \u0442\u0435\u043c \u043c\u0435\u043d\u0435\u0435 \u0441\u0445\u043e\u0436\u0438\u043c\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u0432\u0430 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u0430.<\/p>\n<pre><code class=\"python\">@staticmethod   def similarity_checker(vector_1, vector_2):     \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0434\u0432\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0438\u0445      \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442.      \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:     vector_1(int): \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440     vector_2(int): \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440      \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:     cosine_similarity([vector_1], vector_2) (int): \u043e\u0446\u0435\u043d\u043a\u0430 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0433\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430     \"\"\"     vectors = [vector_1, vector_2]     for vec in vectors:       if np.ndim(vec) == 1:         vec = np.expand_dims(vec, axis=0)     return cosine_similarity([vector_1], vector_2)<\/code><\/pre>\n<p>\u041a\u0430\u043a\u00a0\u0442\u043e\u043b\u044c\u043a\u043e \u043c\u044b \u0441\u043c\u043e\u0436\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0430 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438, \u0443\u00a0\u043d\u0430\u0441 \u043f\u043e\u044f\u0432\u0438\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0442\u044c \u043e\u0446\u0435\u043d\u043a\u0438 \u0434\u043b\u044f\u00a0\u0437\u0430\u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043b\u043e\u0432 \u0438 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0445\u0440\u0430\u043d\u044f\u0449\u0438\u0445\u0441\u044f \u0432\u00a0\u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<pre><code class=\"python\">@staticmethod   def recommender(vector_file_list,query_vector, file_dict):     \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432, \u0432\u0435\u043a\u0442\u043e\u0440\u044b     \u0437\u0430\u043f\u0440\u043e\u0441\u043e\u0432 \u0438 \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0434\u043b\u044f \u0441\u043f\u0438\u0441\u043a\u0430 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0441 \u0438\u0445 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c\u0438     \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 \u0438 \u0438\u043c\u0435\u043d\u0430\u043c\u0438 \u0444\u0430\u0439\u043b\u043e\u0432.      \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:     vector_file_list(list): \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432     query_vector(int): \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u0432\u0435\u043a\u0442\u043e\u0440     file_dict(dict): \u0441\u043b\u043e\u0432\u0430\u0440\u044c \u0438\u043c\u0435\u043d \u0444\u0430\u0439\u043b\u043e\u0432 \u0438 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0434\u043b\u044f \u0441\u043f\u0438\u0441\u043a\u0430     \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432      \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:     final_recommendation (list): \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432     similarity_list[:len(final_recommendation)] (list): \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u0446\u0435\u043d\u043e\u043a      \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0430 \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439.     \"\"\"     similarity_list = []     score_dict = dict()     for i,file_vector in enumerate(vector_file_list):       x = dataprocessor.similarity_checker(file_vector, query_vector)       score_dict[file_dict[i][1]] = (x[0][0])       similarity_list.append(x)     similarity_list = sorted(similarity_list, reverse = True)     #\u0420\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u0442 \u043b\u0443\u0447\u0448\u0438\u0435 20%     recommended = sorted(score_dict.items(),                    key=lambda x:-x[1])[:int(np.round(.5*len(similarity_list)))]      final_recommendation = []     for i in range(len(recommended)):       final_recommendation.append(recommended[i][0])     #\u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0432 \u0433\u0440\u0430\u0444, \u0435\u0441\u043b\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u0431\u043e\u043b\u0435\u0435 3     return final_recommendation, similarity_list[:len(final_recommendation)]<\/code><\/pre>\n<p>\u0421\u043f\u0438\u0441\u043e\u043a \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043f\u0435\u0440\u0435\u0447\u0435\u043d\u044c \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0440\u0430\u043d\u0435\u0435 \u0438\u0437\u0432\u043b\u0435\u043a\u043b\u0438 \u0438\u0437\u00a0\u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u0412\u0435\u043a\u0442\u043e\u0440 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0441\u043b\u043e\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c \u0438\u0449\u0435\u0442. \u0420\u0430\u043d\u0435\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0439 \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0432\u00a0\u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0438\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442\u0441\u044f \u0432\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043b\u044e\u0447\u0435\u0439, \u0430\u00a0\u0442\u0435\u043a\u0441\u0442 \u0444\u0430\u0439\u043b\u043e\u0432\u00a0\u2014 \u0432\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439. \u0414\u043b\u044f\u00a0\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0441\u0445\u043e\u0434\u0441\u0442\u0432 \u043c\u0435\u0436\u0434\u0443 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438 \u043c\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043c\u043e\u0449\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u0438\u044f. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0440\u0435\u0439\u0442\u0438\u043d\u0433, \u0432\u00a0\u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0432\u044b\u0431\u0438\u0440\u0430\u0435\u043c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u043f\u043e\u00a0\u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u044e \u043a\u00a0\u0437\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u043c\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c. \u042d\u0442\u0438 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044e \u0432\u00a0\u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c. \u041e\u0434\u043d\u0430\u043a\u043e, \u0447\u0442\u043e\u00a0\u0434\u0435\u043b\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u043f\u0440\u0435\u0432\u044b\u0448\u0430\u0435\u0442 \u0442\u0440\u0438? \u0412\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 <strong>\u0442\u0435\u043e\u0440\u0438\u0438 \u0433\u0440\u0430\u0444\u043e\u0432 \u0438 \u0441\u0435\u0442\u0435\u0439<\/strong> \u0432\u00a0\u043d\u0430\u0448\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0441\u0442\u044c \u0438 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438.<\/p>\n<hr\/>\n<h4>\u0410\u043b\u0433\u043e\u0440\u0438\u0442\u043c PageRank<\/h4>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u0441\u0434\u0435\u043b\u0430\u0435\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u0438 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043e\u00a0\u0442\u0435\u043e\u0440\u0438\u0438, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u0430\u0441\u0430\u0435\u0442\u0441\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 PageRank. \u041d\u0435\u00a0\u043f\u043e\u0439\u043c\u0438\u0442\u0435 \u043c\u0435\u043d\u044f \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e, \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u00a0\u2014 \u044d\u0442\u043e \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0434\u043b\u044f\u00a0\u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0430 \u043c\u0435\u0436\u0434\u0443 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438. \u041d\u043e\u00a0\u0432\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435 PageRank \u0432\u00a0\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e\u00a0\u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c (\u0434\u0430\u043d\u043d\u044b\u043c \u0432\u00a0\u043d\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445).<\/p>\n<p>PageRank\u00a0\u0431\u044b\u043b <a href=\"https:\/\/www.geeksforgeeks.org\/page-rank-algorithm-implementation\/\">\u0432\u043f\u0435\u0440\u0432\u044b\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d<\/a> \u041b\u0430\u0440\u0440\u0438 \u041f\u0435\u0439\u0434\u0436\u0435\u043c \u0434\u043b\u044f\u00a0\u0440\u0430\u043d\u0436\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0435\u0431\u2011\u0441\u0430\u0439\u0442\u043e\u0432 \u0438 \u043e\u0446\u0435\u043d\u043a\u0438 \u0438\u0445 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u0438. \u0415\u0433\u043e \u043e\u0441\u043d\u043e\u0432\u043d\u0430\u044f \u0438\u0434\u0435\u044f \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u043b\u0430\u0441\u044c \u0432\u00a0\u0442\u043e\u043c, \u0447\u0442\u043e\u00a0\u0432\u0435\u0431\u2011\u0441\u0430\u0439\u0442 \u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044f \u00ab\u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u043c\u00bb, \u0435\u0441\u043b\u0438 \u043d\u0430\u00a0\u043d\u0435\u0433\u043e \u0441\u0441\u044b\u043b\u0430\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0435\u0435 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0434\u0440\u0443\u0433\u0438\u0445 \u0441\u0430\u0439\u0442\u043e\u0432. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u044d\u0442\u043e\u0439 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0438, \u0443\u0437\u0435\u043b \u043d\u0430\u00a0\u0433\u0440\u0430\u0444\u0435 \u043c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c \u043e\u0446\u0435\u043d\u0435\u043d \u043a\u0430\u043a\u00a0\u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u0439, \u0435\u0441\u043b\u0438 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043e\u0442\u00a0\u0435\u0433\u043e \u0440\u0435\u0431\u0440\u0430 \u0434\u043e\u00a0\u0434\u0440\u0443\u0433\u0438\u0445 \u0443\u0437\u043b\u043e\u0432 \u043c\u0435\u043d\u044c\u0448\u0435. \u0427\u0435\u043c \u043a\u043e\u0440\u043e\u0447\u0435 \u043e\u0431\u0449\u0435\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0443\u0437\u043b\u043e\u043c \u0438 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0443\u0437\u043b\u0430\u043c\u0438 \u0432\u00a0\u0433\u0440\u0430\u0444\u0435, \u0442\u0435\u043c \u0432\u044b\u0448\u0435 \u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u044c.<\/p>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043f\u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f \u0441\u00a0\u043e\u0434\u043d\u0438\u043c \u0438\u0437\u00a0\u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 PageRank, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u00ab<em>\u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e\u00a0\u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044e\/\u0432\u0435\u043a\u0442\u043e\u0440\u0443<\/em>\u00bb (<em>eigenvector centrality<\/em>). \u042d\u0442\u043e\u0442 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c, \u043a\u0430\u043a\u00a0\u0438 PageRank, \u043e\u0446\u0435\u043d\u0438\u0432\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u0443\u0437\u043b\u0430\u043c\u0438 \u043d\u0430\u00a0\u0433\u0440\u0430\u0444\u0435, \u043f\u0440\u0438\u0441\u0432\u0430\u0438\u0432\u0430\u044f \u0431\u043e\u043b\u0435\u0435 \u0432\u044b\u0441\u043e\u043a\u0438\u0435 \u0431\u0430\u043b\u043b\u044b \u0442\u0435\u043c, \u0443\u00a0\u043a\u043e\u0433\u043e \u044d\u0442\u0438 \u0441\u0432\u044f\u0437\u0438 \u0441\u0438\u043b\u044c\u043d\u0435\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u0442\u044c \u043e\u0434\u043d\u043e \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043e\u0442\u043b\u0438\u0447\u0438\u0435: \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u0437\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0441\u00a0\u0434\u0430\u043d\u043d\u044b\u043c \u0443\u0437\u043b\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0435\u0433\u043e \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0441\u0442\u044c. \u042d\u0442\u043e \u043c\u043e\u0436\u043d\u043e \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0441\u00a0\u0443\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043d\u0438\u0435\u043c \u043e\u00a0\u0442\u043e\u043c, \u0447\u0442\u043e\u00a0\u0447\u0435\u043b\u043e\u0432\u0435\u043a, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u043d\u0430\u043a\u043e\u043c \u0441\u043e \u043c\u043d\u043e\u0433\u0438\u043c\u0438 \u0432\u0430\u0436\u043d\u044b\u043c\u0438 \u043b\u044e\u0434\u044c\u043c\u0438, \u043c\u043e\u0436\u0435\u0442 \u0441\u0442\u0430\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u0432\u0430\u0436\u043d\u044b\u043c \u0441\u0430\u043c \u0431\u043b\u0430\u0433\u043e\u0434\u0430\u0440\u044f \u044d\u0442\u0438\u043c \u043a\u0440\u0435\u043f\u043a\u0438\u043c \u0441\u0432\u044f\u0437\u044f\u043c. \u0412\u00a0\u0446\u0435\u043b\u043e\u043c, \u044d\u0442\u0438 \u0434\u0432\u0430 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u0445\u043e\u0436\u0438 \u043f\u043e\u00a0\u0441\u0432\u043e\u0435\u0439 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438.<\/p>\n<hr\/>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432 \u0434\u043b\u044f\u00a0\u044d\u0442\u043e\u0439 \u0431\u0430\u0437\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043e\u043d\u0438 \u043c\u043e\u0433\u0443\u0442\u00a0\u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432\u00a0\u0432\u0438\u0434\u0435 \u0433\u0440\u0430\u0444\u044b, \u0433\u0434\u0435 \u0440\u0430\u0441\u0441\u0442\u043e\u044f\u043d\u0438\u0435 \u043c\u0435\u0436\u0434\u0443 \u0435\u0433\u043e \u0432\u0435\u0440\u0448\u0438\u043d\u0430\u043c\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0438\u0445 \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u043e\u043c \u0441\u00a0\u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438.<\/p>\n<pre><code class=\"python\">@staticmethod   def ranker(recommendation_val, file_vec_dict):     \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u0445     \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438 \u0444\u0430\u0439\u043b\u044b \u0441\u043b\u043e\u0432\u0430\u0440\u0435\u0439 \u0441 \u0431\u0430\u0437\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0438\u0445 \u0432\u0435\u043a\u0442\u043e\u0440\u0430\u043c\u0438.      \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:     reccomendation_val(list): \u0441\u043f\u0438\u0441\u043e\u043a \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439, \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445     \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0433\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430     file_vec_dic(dict): \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0433\u0434\u0435 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043a\u043b\u044e\u0447\u0435\u0439      \u0432\u044b\u0441\u0442\u0443\u043f\u0430\u044e\u0442 \u0438\u043c\u0435\u043d\u0430 \u0444\u0430\u0439\u043b\u043e\u0432, \u0430 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u2014 \u0432\u0435\u043a\u0442\u043e\u0440\u043d\u043e\u0435      \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0442\u0435\u043a\u0441\u0442\u0430.      \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:     ec_recommended(list): \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 20% \u043b\u0443\u0447\u0448\u0438\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439,     \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u043f\u043e      \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u043c\u0443 \u0432\u0435\u043a\u0442\u043e\u0440\u0443.     \"\"\"     my_graph = nx.Graph()     for i in range(len(recommendation_val)):       file_1 = recommendation_val[i]       for j in range(len(recommendation_val)):         file_2 = recommendation_val[j]          if i != j:           #\u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c sim_score \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438 (\u0432\u0435\u0441)           edge_dist = cosine_similarity([file_vec_dict[recommendation_val[i]]],[file_vec_dict[recommendation_val[j]]])           #add an edge from file 1 to file 2 with the weight            my_graph.add_edge(file_1, file_2, weight=edge_dist)      #Pagerank \u0433\u0440\u0430\u0444\u0430          rec = nx.eigenvector_centrality(my_graph)     #\u041f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 20% \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439     ec_recommended = sorted(rec.items(), key=lambda x:-x[1])[:int(np.round(len(rec)))]      return ec_recommended<\/code><\/pre>\n<p>\u0418\u0442\u0430\u043a, \u0447\u0442\u043e\u00a0\u0436\u0435 \u0442\u0435\u043f\u0435\u0440\u044c? \u0423\u00a0\u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u043d\u0430\u00a0\u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0433\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u043c\u0435\u0436\u0434\u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u0442\u043e\u0447\u043a\u043e\u0439 \u0434\u0430\u043d\u043d\u044b\u0445 \u0432\u00a0\u043d\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435, \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438, \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u043d\u044b\u0435 \u0441\u00a0\u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041a\u0430\u043a\u0438\u0435 \u0438\u0437\u00a0\u044d\u0442\u0438\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u043c\u044b \u0434\u043e\u043b\u0436\u043d\u044b \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c? <strong>\u041e\u0431\u0435!<\/strong><\/p>\n<pre><code class=\"python\">@staticmethod   def weighted_final_rank(sim_list,ec_recommended,final_recommendation):     \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0441\u043f\u0438\u0441\u043e\u043a \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0430,        \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0433\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438,        \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u043f\u043e \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438, \u0438 \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438,        \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0433\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430.           \u0412\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435:         sim_list(list): \u0441\u043f\u0438\u0441\u043e\u043a \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0430 \u0434\u043b\u044f \u0444\u0430\u0439\u043b\u043e\u0432         \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.         ec_recommended(list): \u0441\u043f\u0438\u0441\u043e\u043a \u0438\u0437 20% \u043b\u0443\u0447\u0448\u0438\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439,          \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438.         final_recommendation (list): \u0441\u043f\u0438\u0441\u043e\u043a \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439,         \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0445 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0433\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430.          \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:         weighted_final_recommend(list): \u0421\u043f\u0438\u0441\u043e\u043a \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445         \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u0444\u0430\u0439\u043b\u043e\u0432 \u0432 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445.         \"\"\"     final_dict = dict()      for i in range(len(sim_list)):       val = (.8*sim_list[final_recommendation.index(ec_recommendation[i][0])].squeeze()) + (.2 * ec_recommendation[i][1])       final_dict[ec_recommendation[i][0]] = val      weighted_final_recommend = sorted(final_dict.items(), key=lambda x:-x[1])[:int(np.round(len(final_dict)))]      return weighted_final_recommend<\/code><\/pre>\n<p>\u0424\u0438\u043d\u0430\u043b\u044c\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u0441\u043a\u0440\u0438\u043f\u0442\u0430 \u0431\u0443\u0434\u0435\u0442 \u0432\u0437\u0432\u0435\u0448\u0438\u0432\u0430\u0442\u044c \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0441\u00a0\u0443\u0447\u0435\u0442\u043e\u043c \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0433\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u0438 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u0412\u00a0\u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u0432\u0440\u0435\u043c\u044f 80% \u0432\u0435\u0441\u0430 \u0443\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u043c \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043d\u043e\u0433\u043e \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430, \u0438 20%\u00a0\u2014 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u043c, \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u043d\u0430\u00a0\u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438. \u041d\u0430\u00a0\u043e\u0441\u043d\u043e\u0432\u0435 \u044d\u0442\u0438\u0445 \u0432\u0435\u0441\u043e\u0432 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0438 \u043e\u0431\u044a\u0435\u0434\u0438\u043d\u0438\u0442\u044c \u0438\u0445, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0440\u0435\u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0434\u043b\u044f\u00a0\u0432\u0441\u0435\u0445 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043f\u043e\u0434\u043e\u0431\u0438\u044f \u0432\u00a0\u0441\u0438\u0441\u0442\u0435\u043c\u0435. \u0420\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0447\u0438\u043a\u0438 \u043c\u043e\u0433\u0443\u0442 \u043b\u0435\u0433\u043a\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0432\u0435\u0441\u0430 \u0432\u00a0\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u0438 \u043e\u0442\u00a0\u0442\u043e\u0433\u043e, \u043a\u0430\u043a\u043e\u0439 \u0442\u0438\u043f \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u043e\u043d\u0438 \u0441\u0447\u0438\u0442\u0430\u044e\u0442 \u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u043c.<\/p>\n<h3>\u041f\u0440\u0438\u043c\u0435\u0440<\/h3>\n<p>\u041f\u043e\u0437\u0432\u043e\u043b\u044c\u0442\u0435 \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0430\u043c \u043d\u0435\u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u043f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e \u043a\u043e\u0434\u0430. \u0412\u0441\u0435 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b \u0432\u00a0\u043c\u043e\u0435\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0432\u00a0\u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435 \u0444\u043e\u0440\u043c\u0430\u0442\u0430\u0445 \u0438 \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043a\u00a0\u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u043c \u043e\u0431\u043b\u0430\u0441\u0442\u044f\u043c <a href=\"https:\/\/towardsdatascience.com\/tag\/machine-learning\/\">\u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<\/a>. \u041e\u0434\u043d\u0430\u043a\u043e \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u00a0\u043d\u0435\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0445 \u0441 <em>\u0433\u0435\u043d\u0435\u0440\u0430\u0442\u0438\u0432\u043d\u044b\u043c\u0438\u2011\u0441\u043e\u0441\u0442\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c\u0438 \u0441\u0435\u0442\u044f\u043c\u0438<\/em> (GAN), \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044e, \u0447\u0442\u043e\u00a0\u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b\u00a0\u0431\u044b\u0442\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043d\u044b \u0432\u00a0\u043f\u0435\u0440\u0432\u0443\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c, \u043a\u043e\u0433\u0434\u0430 \u0432\u00a0\u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u043e\u0438\u0441\u043a\u043e\u0432\u043e\u0433\u043e \u0442\u0435\u0440\u043c\u0438\u043d\u0430 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u00abGenerative adversarial network\u00bb.<\/p>\n<pre><code class=\"python\">path = '\/content\/drive\/MyDrive\/database\/' db = [f for f in glob.glob(path + '*')]  research_documents, file_dictionary = dataprocessor.data_reader(db) list_files, vectorizer, file_vec_dict = dataprocessor.database_processor(file_dictionary,research_documents) query = 'Generative Adversarial Networks' query = dataprocessor.preprocess(query) query = dataprocessor.input_processor(query, vectorizer) recommendation, sim_list = dataprocessor.recommender(list_files,query, file_dictionary) ec_recommendation = dataprocessor.ranker(recommendation, file_vec_dict) final_weighted_recommended = dataprocessor.weighted_final_rank(sim_list,ec_recommendation,  recommendation) print(final_weighted_recommended)<\/code><\/pre>\n<p>\u041f\u0440\u0438\u00a0\u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0438 \u044d\u0442\u043e\u0433\u043e \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430 \u043a\u043e\u0434\u0430 \u0432\u044b\u0432\u043e\u0434\u044f\u0442\u0441\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0432\u0435\u0441\u0430 \u0434\u043b\u044f\u00a0\u043a\u0430\u0436\u0434\u043e\u0439 \u0438\u0437\u00a0\u043d\u0438\u0445:<\/p>\n<p><strong>[(\u201cGAN_presentation.pptx\u201d, 0.3\u00a0411\u00a0272\u00a0882\u00a0084\u00a0124), (\u201cUsing GANs to Augment UAV Data_V2.docx\u201d, 0.16\u00a0293\u00a0615\u00a0818\u00a0015\u00a0078), (\u201cGANS_DAY_1.docx\u201d, 0.12\u00a0546\u00a0058\u00a0188\u00a0955\u00a0278), (\u201cml_pdf.pdf\u201d, 0.10\u00a0864\u00a0164\u00a0490\u00a0536\u00a0887)]<\/strong><\/p>\n<p>\u0414\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e\u043f\u0440\u043e\u0431\u0443\u0435\u043c \u0435\u0449\u0435 \u0440\u0430\u0437. \u0427\u0442\u043e\u00a0\u043f\u0440\u043e\u0438\u0437\u043e\u0439\u0434\u0435\u0442, \u0435\u0441\u043b\u0438 \u044f \u0437\u0430\u043f\u0440\u043e\u0448\u0443 \u00ab\u041c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435\u00bb?<\/p>\n<p><strong>[(\u201cml_pdf.pdf\u201d, 0.31\u00a0244\u00a0922\u00a0151\u00a0487\u00a0337), (\u201cGAN_presentation.pptx\u201d, 0.18\u00a0170\u00a0070\u00a0184\u00a0645\u00a0432), (\u201cGANS_DAY_1.docx\u201d, 0.14\u00a0825\u00a0501\u00a0243\u00a0059\u00a0303), (\u201cUsing GANs to Augment UAV Data_V2.docx\u201d, 0.1\u00a0309\u00a0153\u00a0863\u00a0914\u00a0564)]<\/strong><\/p>\n<p>\u041a\u0430\u043a\u00a0\u0438 \u043e\u0436\u0438\u0434\u0430\u043b\u043e\u0441\u044c, \u043f\u0435\u0440\u0432\u044b\u043c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c\u044b\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u043c \u0441\u0442\u0430\u043b\u043e \u0432\u0432\u043e\u0434\u043d\u043e\u0435 \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u043e \u043f\u043e\u00a0\u043c\u0430\u0448\u0438\u043d\u043d\u043e\u043c\u0443 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e! \u0412\u00a0\u044d\u0442\u043e\u043c \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b \u0442\u043e\u043b\u044c\u043a\u043e 7\u00a0\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432, \u043d\u043e\u00a0\u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u0445 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u043e, \u0442\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u0432\u044b \u0441\u043c\u043e\u0436\u0435\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c!<\/p>\n<h3>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h3>\n<p>\u0421\u0435\u0433\u043e\u0434\u043d\u044f \u043c\u044b \u043e\u0431\u0441\u0443\u0434\u0438\u043b\u0438, \u043a\u0430\u043a\u00a0\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c <a href=\"https:\/\/towardsdatascience.com\/tag\/recommendation-system\/\">\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443<\/a> \u0434\u043b\u044f\u00a0\u0444\u0430\u0439\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0445\u0440\u0430\u043d\u0438\u0442\u0435, \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0435\u0441\u043b\u0438 \u044d\u0442\u043e \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u043b\u044f\u00a0\u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u041a\u043b\u044e\u0447\u0435\u0432\u043e\u0439 \u043e\u0441\u043e\u0431\u0435\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u044d\u0442\u043e\u0439 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u043e, \u0447\u0442\u043e\u00a0\u043e\u043d\u0430 \u0434\u0435\u043b\u0430\u0435\u0442 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0439 \u0448\u0430\u0433 \u0432\u00a0\u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 \u043a\u043e\u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043f\u043e\u0434\u043e\u0431\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u0432, \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0446\u0435\u043d\u0442\u0440\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f\u00a0\u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u044b\u0445 \u0438 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0445 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439. \u041f\u043e\u043f\u0440\u043e\u0431\u0443\u0439\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c <a href=\"https:\/\/github.com\/benmccloskey\/Research_recommend_model\/blob\/main\/app.py\">\u044d\u0442\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u0443<\/a> (\u043f\u043e\u043b\u043d\u044b\u0439 \u043a\u043e\u0434) \u0432\u00a0\u0441\u0432\u043e\u0435\u0439 \u0440\u0430\u0431\u043e\u0442\u0435, \u0438 \u044f \u043d\u0430\u0434\u0435\u044e\u0441\u044c, \u0447\u0442\u043e\u00a0\u043e\u043d\u0430 \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u043b\u0443\u0447\u0448\u0435 \u043f\u043e\u043d\u044f\u0442\u044c, \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0430\u043d\u044b \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u044b \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0432\u044b \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0435.<\/p>\n<hr\/>\n<p><em>\u0421\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0430 \u0432 \u0440\u0430\u043c\u043a\u0430\u0445 \u043e\u043d\u043b\u0430\u0439\u043d-\u043a\u0443\u0440\u0441\u0430 <\/em><a href=\"https:\/\/otus.pw\/KPHO\/\"><em>\u00abNLP. Advanced\u00bb<\/em><\/a><em>. \u041d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0435 \u043a\u0443\u0440\u0441\u0430 \u043c\u043e\u0436\u043d\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u0438\u0442\u044c\u0441\u044f \u0441 \u043f\u043e\u043b\u043d\u043e\u0439 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u043e\u0439, \u0430 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0437\u0430\u043f\u0438\u0441\u0438 \u043e\u0442\u043a\u0440\u044b\u0442\u044b\u0445 \u0443\u0440\u043e\u043a\u043e\u0432.<\/em><\/p>\n<p><em>\u041e\u0442\u043a\u0440\u044b\u0442\u044b\u0435 \u0443\u0440\u043e\u043a\u0438 \u0432 Otus \u043f\u0440\u043e\u0445\u043e\u0434\u044f\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u0434\u0435\u043d\u044c \u2014 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0438\u0442\u0435 <\/em><a href=\"https:\/\/otus.pw\/Wc8D\/\"><em>\u0432 \u043a\u0430\u043b\u0435\u043d\u0434\u0430\u0440\u044c \u043c\u0435\u0440\u043e\u043f\u0440\u0438\u044f\u0442\u0438\u0439<\/em><\/a><em> \u0438 \u0432\u044b\u0431\u0438\u0440\u0430\u0439\u0442\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0435 \u0442\u0435\u043c\u044b.<\/em><\/p>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/900962\/\"> https:\/\/habr.com\/ru\/articles\/900962\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0433\u043e \u044f\u0437\u044b\u043a\u0430 \u0438 \u0442\u0435\u043e\u0440\u0438\u044e \u0433\u0440\u0430\u0444\u043e\u0432 \u0434\u043b\u044f\u00a0\u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0438 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432. <\/p>\n<h3>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h3>\n<p>\u041f\u043e\u0447\u0442\u0438 \u0432\u0441\u0435 \u043f\u0440\u043e\u0435\u043a\u0442\u044b \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0442\u0441\u044f \u0441\u00a0\u043e\u0434\u043d\u043e\u0433\u043e \u0432\u0430\u0436\u043d\u043e\u0433\u043e \u044d\u0442\u0430\u043f\u0430\u00a0\u2014 <em>\u0430\u043a\u0442\u0438\u0432\u043d\u044b\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439<\/em>. \u0418\u043d\u0432\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u00a0\u0442\u043e, \u0447\u0442\u043e\u00a0\u0443\u0436\u0435\u00a0\u0431\u044b\u043b\u043e \u0441\u0434\u0435\u043b\u0430\u043d\u043e \u0434\u0440\u0443\u0433\u0438\u043c\u0438, \u0432\u00a0\u0440\u0430\u0437\u0432\u0438\u0442\u0438\u0435 \u0438\u0445 \u0440\u0430\u0431\u043e\u0442\u044b\u00a0\u2014 \u044d\u0442\u043e \u043e\u0434\u0438\u043d \u0438\u0437\u00a0\u043f\u0443\u0442\u0435\u0439 \u043a\u00a0\u043f\u043e\u0432\u044b\u0448\u0435\u043d\u0438\u044e \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430. \u0412\u0430\u0436\u043d\u043e \u043d\u0435\u00a0\u0442\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u0432\u043b\u0435\u0447\u044c \u0443\u0440\u043e\u043a\u0438 \u0438\u0437\u00a0\u043e\u043f\u044b\u0442\u0430 \u0434\u0440\u0443\u0433\u0438\u0445, \u043d\u043e\u00a0\u0438 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0435\u0433\u043e <em>\u043d\u0435\u00a0\u0441\u0442\u043e\u0438\u0442 \u0434\u0435\u043b\u0430\u0442\u044c<\/em> \u0432\u00a0\u0441\u0432\u043e\u0435\u043c \u043f\u0440\u043e\u0435\u043a\u0442\u0435, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u0432\u044b\u0441\u0438\u0442\u044c \u0435\u0433\u043e \u0448\u0430\u043d\u0441\u044b \u043d\u0430\u00a0\u0443\u0441\u043f\u0435\u0445.<\/p>\n<p>\u0412\u00a0\u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u044b \u043d\u0430\u0434 \u0441\u0432\u043e\u0435\u0439 \u0434\u0438\u0441\u0441\u0435\u0440\u0442\u0430\u0446\u0438\u0435\u0439 \u044f \u0441\u043e\u0431\u0440\u0430\u043b \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432. \u0421\u0440\u0435\u0434\u0438 \u043d\u0438\u0445\u00a0\u0431\u044b\u043b\u0438 \u043f\u043e\u0434\u0431\u043e\u0440\u043a\u0438 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u043b, \u0438 Excel\u2011\u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u00a0\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u044d\u043a\u0441\u043f\u0435\u0440\u0438\u043c\u0435\u043d\u0442\u043e\u0432. \u0417\u0430\u0432\u0435\u0440\u0448\u0430\u044f \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u043b\u044f\u00a0\u0441\u0432\u043e\u0435\u0439 \u0434\u0438\u0441\u0441\u0435\u0440\u0442\u0430\u0446\u0438\u0438, \u044f \u0437\u0430\u0434\u0430\u043b\u0441\u044f \u0432\u043e\u043f\u0440\u043e\u0441\u043e\u043c: <strong>\u0430\u00a0\u0435\u0441\u0442\u044c\u00a0\u043b\u0438 \u0441\u043f\u043e\u0441\u043e\u0431 \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0433\u043b\u0430\u00a0\u0431\u044b \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u0432\u0441\u0435 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f, \u0438\u043c\u0435\u044e\u0449\u0438\u0435\u0441\u044f \u0432\u00a0\u043c\u043e\u0435\u043c \u0430\u0440\u0445\u0438\u0432\u0435, \u0438 \u043f\u043e\u043c\u043e\u0447\u044c \u043c\u043d\u0435 \u0432\u00a0\u043c\u043e\u0438\u0445 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u0430\u0445?<\/strong><\/p>\n<p>\u041d\u0430\u00a0\u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u0435\u0441\u0442\u044c!<\/p>\n<p><strong><em>\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435:<\/em><\/strong><em> \u042d\u0442\u0430 \u0438\u0434\u0435\u044f \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u043c\u0430 \u043d\u0435\u00a0\u0442\u043e\u043b\u044c\u043a\u043e \u043a\u00a0\u0445\u0440\u0430\u043d\u0438\u043b\u0438\u0449\u0443 \u043d\u0430\u0443\u0447\u043d\u044b\u0445 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u043d\u0430\u043a\u043e\u043f\u0438\u043b\u0438 \u0432\u00a0\u0440\u0430\u043c\u043a\u0430\u0445 \u0441\u0432\u043e\u0438\u0445 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u0439, \u043d\u043e\u00a0\u0438 \u043a\u00a0\u043b\u044e\u0431\u043e\u043c\u0443 \u0434\u0440\u0443\u0433\u043e\u043c\u0443 \u043a\u0430\u0442\u0430\u043b\u043e\u0433\u0443, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u043c\u0443 \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u0442\u0438\u043f\u044b \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432.<\/em><\/p>\n<h3>\u0421\u0435\u0442\u0430\u043f<\/h3>\n<p>\u042f \u0440\u0430\u0437\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u044d\u0442\u0443 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u0441\u0432\u043e\u0435\u0439 \u043a\u043e\u043c\u0430\u043d\u0434\u043e\u0439, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f Python 3. \u0421\u043f\u0430\u0441\u0438\u0431\u043e \u0438\u043c \u0437\u0430\u00a0\u043f\u043e\u043c\u043e\u0449\u044c! \u041c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u0447\u0442\u043e\u2011\u0442\u043e \u043f\u043e\u0438\u0441\u0442\u0438\u043d\u0435 \u0443\u0434\u0438\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0435!<\/p>\n<p>\u042d\u0442\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0446\u0435\u043b\u044b\u0439 \u0440\u044f\u0434 \u0440\u0430\u0437\u043d\u044b\u0445 API, \u0438\u0437\u0443\u0447\u0435\u043d\u0438\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0435\u0439 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0436\u0435\u0442\u00a0\u0431\u044b\u0442\u044c \u043e\u0447\u0435\u043d\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u043c \u0434\u043b\u044f\u00a0\u0432\u0430\u0448\u0435\u0433\u043e \u043f\u0440\u043e\u0444\u0435\u0441\u0441\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u0432\u0438\u0442\u0438\u044f.<\/p>\n<pre><code class=\"python\">import string  import csv from io import StringIO from pptx import Presentation import docx2txt import PyPDF2 import spacy import pandas as pd  import numpy as np import nltk  import re import openpyxl from nltk.stem import WordNetLemmatizer from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.metrics.pairwise import cosine_similarity from gensim.parsing.preprocessing import STOPWORDS as SW nltk.download('stopwords') nltk.download('wordnet') nltk.download('omw-1.4') nltk.download('averaged_perceptron_tagger') from nltk.corpus import wordnet import networkx as nx from networkx.algorithms.shortest_paths import weighted import glob<\/code><\/pre>\n<h4>\u041f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u044f<\/h4>\n<p>\u041e\u0434\u043d\u0438\u043c \u0438\u0437\u00a0\u0441\u0430\u043c\u044b\u0445 \u0441\u043b\u043e\u0436\u043d\u044b\u0445 \u043f\u0440\u0435\u043f\u044f\u0442\u0441\u0442\u0432\u0438\u0439, \u0441\u00a0\u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f,\u00a0\u0431\u044b\u043b\u043e \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043d\u0438\u0435, \u0447\u0442\u043e\u0431\u044b \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043c\u043e\u0433\u043b\u0430 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0440\u0430\u0437\u043d\u044b\u0445 \u0442\u0438\u043f\u043e\u0432. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u044f \u0445\u043e\u0442\u0435\u043b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u00a0\u043b\u0438 \u044d\u043b\u0435\u043a\u0442\u0440\u043e\u043d\u043d\u0430\u044f \u0442\u0430\u0431\u043b\u0438\u0446\u0430 Excel \u043f\u043e\u0445\u043e\u0436\u0443\u044e \u0438\u043b\u0438\u00a0\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0441\u00a0\u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u0437\u00a0PowerPoint \u0438 \u043d\u0430\u0443\u0447\u043d\u043e\u0433\u043e \u0436\u0443\u0440\u043d\u0430\u043b\u0430 \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442\u0435 PDF. \u0427\u0442\u043e\u0431\u044b \u0440\u0435\u0448\u0438\u0442\u044c \u044d\u0442\u0443 \u0437\u0430\u0434\u0430\u0447\u0443, \u044f \u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043b \u043a\u0430\u0436\u0434\u044b\u0439 \u0442\u0438\u043f \u0444\u0430\u0439\u043b\u0430 \u043d\u0430\u00a0Python \u0438 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u044b\u0432\u0430\u043b \u043a\u0430\u0436\u0434\u044b\u0439 \u043e\u0431\u044a\u0435\u043a\u0442 \u0432\u00a0\u0441\u0442\u0440\u043e\u043a\u0443, \u0441\u043e\u0441\u0442\u043e\u044f\u0449\u0443\u044e \u0438\u0437\u00a0\u0441\u043b\u043e\u0432. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u043b\u043e \u043c\u043d\u0435 <em>\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c<\/em> \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u0441\u0445\u043e\u0434\u0441\u0442\u0432\u0430.<\/p>\n<h4>\u041a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f PDF<\/h4>\n<p>\u041f\u0435\u0440\u0432\u044b\u043c \u043a\u043b\u0430\u0441\u0441\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0432\u00a0\u0440\u0430\u043c\u043a\u0430\u0445 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0435\u043a\u0442\u0430, \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043a\u043b\u0430\u0441\u0441 <strong>PdfReader<\/strong>. \u042d\u0442\u043e\u0442 \u043a\u043b\u0430\u0441\u0441 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f\u00a0\u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f PDF\u2011\u0444\u0430\u0439\u043b\u043e\u0432 \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u043e\u0436\u043d\u043e \u043b\u0435\u0433\u043a\u043e \u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430\u00a0\u044f\u0437\u044b\u043a\u0435 Python. \u0421\u0440\u0435\u0434\u0438 \u0432\u0441\u0435\u0445 \u0444\u043e\u0440\u043c\u0430\u0442\u043e\u0432 \u0444\u0430\u0439\u043b\u043e\u0432 \u044f\u00a0\u0431\u044b \u043e\u0442\u043c\u0435\u0442\u0438\u043b, \u0447\u0442\u043e\u00a0PDF\u2011\u0444\u0430\u0439\u043b\u044b \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0434\u043d\u0438\u043c\u0438 \u0438\u0437\u00a0\u0441\u0430\u043c\u044b\u0445 \u0432\u0430\u0436\u043d\u044b\u0445, \u043f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u043d\u043e\u0433\u0438\u0435 \u0436\u0443\u0440\u043d\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0442\u0430\u0442\u044c\u0438, \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c\u044b\u0435 \u0438\u0437\u00a0\u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u0441\u043a\u0438\u0445 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0435\u0432, \u0442\u0430\u043a\u0438\u0445 \u043a\u0430\u043a\u00a0Google Scholar, \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u044b \u0438\u043c\u0435\u043d\u043d\u043e \u0432\u00a0\u044d\u0442\u043e\u043c \u0444\u043e\u0440\u043c\u0430\u0442\u0435.<\/p>\n<pre><code class=\"python\">class pdfReader:      def __init__(self, file_path: str) -&gt; str:         self.file_path = file_path      def PDF_one_pager(self) -&gt; str:         \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043e\u0434\u043d\u043e\u0441\u0442\u0440\u043e\u0447\u043d\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435              pdf.              \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:             one_page_pdf (str): \u0441\u0442\u0440\u043e\u043a\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0430\u044f \u0432\u0435\u0441\u044c \u0442\u0435\u043a\u0441\u0442 pdf-\u0444\u0430\u0439\u043b\u0430.          \"\"\"         content = \"\"         p = open(self.file_path, \"rb\")         pdf = PyPDF2.PdfReader(p)         num_pages = len(pdf.pages)         for i in range(0, num_pages):             content += pdf.pages[i].extract_text() + \"n\"         content = \" \".join(content.replace(u\"xa0\", \" \").strip().split())         page_number_removal = r\"d{1,3} of d{1,3}\"         page_number_removal_pattern = re.compile(page_number_removal, re.IGNORECASE)         content = re.sub(page_number_removal_pattern, '',content)          return content      def pdf_reader(self) -&gt; str:         \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043c\u043e\u0436\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0444\u0430\u0439\u043b\u044b \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 .pdf              \u0438 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 PDF-\u0444\u0430\u0439\u043b, \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u043d\u0430 python.              \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:             read_pdf: A python readable .pdf file.         \"\"\"         opener = open(self.file_path,'rb')         read_pdf = PyPDF2.PdfFileReader(opener)          return read_pdf      def pdf_info(self) -&gt; dict:         \"\"\" \u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u044b\u0439         \u0441\u043b\u043e\u0432\u0430\u0440\u044c PDF.           \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:         dict(pdf_info_dict): \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0438\u0439 \u043c\u0435\u0442\u0430\u0434\u0430\u043d\u043d\u044b\u0435         \u043e\u0431\u044a\u0435\u043a\u0442\u0430.         \"\"\"         opener = open(self.file_path,'rb')         read_pdf = PyPDF2.PdfFileReader(opener)         pdf_info_dict = {}         for key,value in read_pdf.documentInfo.items():             pdf_info_dict[re.sub('\/',\"\",key)] = value         return pdf_info_dict      def pdf_dictionary(self) -&gt; dict:         \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044c, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c              \u043a\u043b\u044e\u0447\u0430\u043c\u0438 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b,\u0430 \u0442\u0435\u043a\u0441\u0442 \u043d\u0430 \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0430\u0445 - \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.              \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:             dict(pdf_dict): \u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0438 \u0442\u0435\u043a\u0441\u0442 \u0441\u043b\u043e\u0432\u0430\u0440\u044f.         \"\"\"         opener = open(self.file_path,'rb')          read_pdf = PyPDF2.PdfReader(opener)         length = read_pdf.pages         pdf_dict = {}         for i in range(length):             page = read_pdf.getPage(i)             text = page.extract_text()             pdf_dict[i] = text             return pdf_dict<\/code><\/pre>\n<h4>\u041a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f Microsoft Powerpoint<\/h4>\n<p>\u041a\u043b\u0430\u0441\u0441 <strong>pptReader<\/strong> \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d \u0434\u043b\u044f\u00a0\u0447\u0442\u0435\u043d\u0438\u044f \u0444\u0430\u0439\u043b\u043e\u0432 Microsoft Powerpoint \u0432\u00a0Python.<\/p>\n<pre><code class=\"python\">class pptReader:      def __init__(self, file_path: str) -&gt; None:         self.file_path = file_path      def ppt_text(self) -&gt; str:     \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0442\u0435\u043a\u0441\u0442\u0430 \u0438\u0437 \u0432\u0441\u0435\u0445         \u0441\u043b\u0430\u0439\u0434\u043e\u0432 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 pptReader.        \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:       text (str): \u0441\u0442\u0440\u043e\u043a\u0430, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0430\u044f \u0442\u0435\u043a\u0441\u0442        \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u043b\u0430\u0439\u0434\u0430 \u043e\u0431\u044a\u0435\u043a\u0442\u0430 pptReader.    \"\"\"       prs = Presentation(self.file_path)       text = str()        for slide in prs.slides:         for shape in slide.shapes:           if not shape.has_text_frame:               continue           for paragraph in shape.text_frame.paragraphs:             for run in paragraph.runs:               text += ' ' + run.text       return text<\/code><\/pre>\n<h4>\u041a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u043e\u0432 Microsoft Word<\/h4>\n<p>\u041a\u043b\u0430\u0441\u0441 <strong>wordDocReader <\/strong>\u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b Microsoft Word \u0432\u00a0Python \u0441\u00a0\u043f\u043e\u043c\u043e\u0449\u044c\u044e API <em>doc2txt<\/em>. \u041e\u043d \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443 \u0441\u00a0\u0442\u0435\u043a\u0441\u0442\u043e\u043c\/\u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0435\u0439, \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0449\u0435\u0439\u0441\u044f \u0432\u00a0\u0434\u0430\u043d\u043d\u043e\u043c Word\u2011\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0435.<\/p>\n<pre><code class=\"python\">class wordDocReader:   def __init__(self, file_path: str) -&gt; str:     self.file_path = file_path    def word_reader(self):   \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u0443\u044e\u0449\u0430\u044f \u043e\u0431\u044a\u0435\u043a\u0442 wordDocReader \u0432 \u0444\u043e\u0440\u043c\u0430\u0442,      \u0447\u0438\u0442\u0430\u0435\u043c\u044b\u0439 \u0432 Python word-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442.\"\"\"      text = docx2txt.process(self.file_path)     text = text.replace('n', ' ')     text = text.replace('xa0', ' ')     text = text.replace('t', ' ')     return text <\/code><\/pre>\n<h4>\u041a\u043b\u0430\u0441\u0441 \u0434\u043b\u044f \u0447\u0442\u0435\u043d\u0438\u044f Microsoft Excel<\/h4>\n<p>\u041d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0430\u0432\u0442\u043e\u0440\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0432\u00a0\u0441\u0432\u043e\u0438 \u043f\u0443\u0431\u043b\u0438\u043a\u0430\u0446\u0438\u0438 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441\u00a0\u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438 \u0432\u00a0\u0444\u043e\u0440\u043c\u0430\u0442\u0435 Excel. \u0412\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0438 \u0434\u0430\u0436\u0435 \u0441\u0430\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043c\u043e\u0447\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b, \u043f\u043e\u0445\u043e\u0436\u0438\u0435 \u043d\u0430\u00a0\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u044b \u0438\u0449\u0435\u0442\u0435. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432\u044b \u0438\u0437\u0443\u0447\u0430\u0435\u0442\u0435 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e\u00a0\u0441\u0442\u0430\u0440\u044b\u0445 \u043a\u043e\u0442\u0438\u0440\u043e\u0432\u043a\u0430\u0445 \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0439 \u0430\u043a\u0446\u0438\u0438, \u0442\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u044f\u0442\u0441\u044f \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0435 \u0438 \u0441\u0438\u043c\u0432\u043e\u043b, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0432\u00a0\u0442\u0430\u0431\u043b\u0438\u0446\u0435 Excel \u0441\u00a0\u0438\u0441\u0442\u043e\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041d\u0430\u0448\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u0439 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0438\u0442 \u0432\u0430\u043c \u044d\u0442\u0443 \u0442\u0430\u0431\u043b\u0438\u0446\u0443, \u0447\u0442\u043e\u00a0\u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u043f\u0440\u043e\u0441\u0442\u0438\u0442 \u0432\u0430\u043c \u043f\u0440\u043e\u0446\u0435\u0441\u0441 \u0438\u0441\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">class xlsxReader:      def __init__(self, file_path: str) -&gt; str:         self.file_path = file_path      def xlsx_text(self):       \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435           Excel-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442.            \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:           text(str): \u0441\u0442\u0440\u043e\u043a\u0430 \u0441 \u0442\u0435\u043a\u0441\u0442\u0430 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.       \"\"\"       inputExcelFile = self.file_path       text = str()       wb = openpyxl.load_workbook(inputExcelFile)       #\u0421\u043e\u0445\u0440\u0430\u043d\u044f\u0435\u0442 excel-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u0443 \u0432 \u0432\u0438\u0434\u0435 CSV-\u0444\u0430\u0439\u043b\u0430       for sn in wb.sheetnames:         excelFile = pd.read_excel(inputExcelFile, engine = 'openpyxl', sheet_name = sn)         excelFile.to_csv(\"ResultCsvFile.csv\", index = None, header=True)          with open(\"ResultCsvFile.csv\", \"r\") as csvFile:            lines = csvFile.read().split(\",\") # \"rn\" \u0435\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e           for val in lines:             if val != '':               text += val + ' '           text = text.replace('ufeff', '')           text = text.replace('n', ' ')       return textCSV File Reader<\/code><\/pre>\n<p>\u041a\u043b\u0430\u0441\u0441 <strong>CSVReader<\/strong> \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u0432\u0430\u043c \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c CSV\u2011\u0444\u0430\u0439\u043b\u044b \u0432\u00a0\u0432\u0430\u0448\u0443 \u0431\u0430\u0437\u0443 \u0434\u0430\u043d\u043d\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u0437\u0430\u0434\u0435\u0439\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0438\u0445 \u0432\u00a0\u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0430\u0446\u0438\u044f\u0445 \u0441\u0438\u0441\u0442\u0435\u043c\u044b.<\/p>\n<pre><code class=\"python\">class csvReader:      def __init__(self, file_path: str) -&gt; str:         self.file_path = file_path      def csv_text(self):       \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u0443          csv-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.            \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:           text(str): \u0441\u0442\u0440\u043e\u043a\u0430 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c csv-\u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.       \"\"\"       text = str()       with open(self.file_path, \"r\") as csvFile:          lines = csvFile.read().split(\",\") # \"rn\" if needed         for val in lines:           text += val + ' '         text = text.replace('ufeff', '')         text = text.replace('n', ' ')       return textMicrosoft PowerPoint Reader<\/code><\/pre>\n<p>\u0415\u0449\u0435 \u043e\u0434\u0438\u043d \u0432\u0430\u0436\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442\u00a0\u2014 \u043d\u0435\u00a0\u043c\u043d\u043e\u0433\u0438\u0435 \u0437\u0430\u0434\u0443\u043c\u044b\u0432\u0430\u044e\u0442\u0441\u044f \u043e\u00a0\u0442\u043e\u043c, \u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0446\u0435\u043d\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442\u0441\u044f \u0432\u00a0\u0442\u0435\u043a\u0441\u0442\u0430\u0445 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0439 PowerPoint. \u042d\u0442\u0438 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 \u043f\u0440\u0435\u0434\u043d\u0430\u0437\u043d\u0430\u0447\u0435\u043d\u044b \u0434\u043b\u044f\u00a0\u0442\u043e\u0433\u043e, \u0447\u0442\u043e\u0431\u044b \u0434\u043e\u043d\u0435\u0441\u0442\u0438 \u0434\u043e\u00a0\u0430\u0443\u0434\u0438\u0442\u043e\u0440\u0438\u0438 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0435 \u0438\u0434\u0435\u0438 \u0438 \u0432\u0430\u0436\u043d\u044b\u0435 \u0441\u0432\u0435\u0434\u0435\u043d\u0438\u044f. \u0412\u00a0\u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u0440\u0430\u0437\u0434\u0435\u043b\u0435 \u043c\u044b \u043d\u0430\u0443\u0447\u0438\u043c\u0441\u044f \u0441\u0432\u044f\u0437\u044b\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u043f\u0440\u0435\u0437\u0435\u043d\u0442\u0430\u0446\u0438\u0438 PowerPoint, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0435\u0441\u0442\u044c \u0432\u00a0\u0432\u0430\u0448\u0435\u0439 \u0431\u0430\u0437\u0435 \u0434\u0430\u043d\u043d\u044b\u0445, \u0441\u00a0\u0434\u0440\u0443\u0433\u0438\u043c\u0438 \u0438\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0430\u043c\u0438 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438. \u042d\u0442\u043e \u043f\u043e\u043c\u043e\u0436\u0435\u0442 \u0432\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0446\u0435\u043b\u043e\u0441\u0442\u043d\u044b\u0435 \u0438 \u0432\u0437\u0430\u0438\u043c\u043e\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u0435 \u0440\u0430\u0431\u043e\u0447\u0438\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u044b.<\/p>\n<pre><code class=\"python\">class pptReader:      def __init__(self, file_path: str) -&gt; str:         self.file_path = file_path      def ppt_text(self):       \"\"\"\u0424\u0443\u043d\u043a\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435          \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 Microsoft PowerPoint.          \u0412\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442:         text(str): \u0441\u0442\u0440\u043e\u043a\u0430 \u0441 \u0442\u0435\u043a\u0441\u0442\u043e\u043c \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430.     \"\"\"       prs = Presentation(self.file_path)       text = str()       for slide in prs.slides:         for shape in slide.shapes:           if not shape.has_text_frame:               continue           for paragraph in shape.text_frame.paragraphs:             for run in<\/code><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-457624","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457624","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=457624"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/457624\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=457624"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=457624"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=457624"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}