Code Monkey home page Code Monkey logo

lenta_ai's Introduction

Нейронные сети, генерирующая фейковые заголовки новостей методами Char-RNN и Word Embeddings

Содержание

  • preprocessing.ipynb: ноутбук с кодом предварительной обработки данных и составления корпуса для обучения
  • char_rnn.ipynb: код нейронной сети на основе подхода Char-RNN
  • word_embeddings.ipynb: нейронная сеть, реализующая Word Embeddings
  • ./data: предобработанные файлы с данными
  • ./models: предобученная модель

Зависимости

  • python 3.5
  • tensorflow 1.4
  • keras 2.0
  • numpy
  • ijson
  • pymorphy2

Установка

Клонируете репозиторий, устанавливаете зависимости.

Предварительная обработка текста

Понадобится оригинальный датасет, подготовленный Ильдар Габдрахманов ildarchegg, который нужно распаковать в ./data/ и переименовать файл lenta.json в lenta_full.json.

Обучение

Запускаете char_rnn.ipynb или word_embeddings.ipynb.

Запуск предобученной модели

Необходимо распаковать содержимое ./models/model.zip в ./models/, затем запускаем из корня python lenta_ai.py. Параметры генерации можно менять внутри скрипта.

Результаты

Примеры генерируемых заголовков можно посмотреть здесь: https://lenta-ai.herokuapp.com/

lenta_ai's People

Contributors

voice32 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.