Giter Site home page Giter Site logo

dido1998 / textcompression Goto Github PK

View Code? Open in Web Editor NEW
3.0 2.0 0.0 206 KB

Data driven approach for compressing text using an encoder-decoder architecture and word-level embeddings.

License: MIT License

Python 100.00%
natural-language-processing text-compression deep-learning seq2seq recurrent-neural-networks lstm

textcompression's Introduction

TextCompression

This is a repo dedicated for demonstrating a possible technique for Text Compression.

Dataset

I have used the image_coco.txt for training which can be obtained from-

https://github.com/geek-ai/Texygen/blob/master/data/image_coco.txt

This dataset contains sentence of about 100 characters long. I have been able to compress each sentence into a vector of size 5.

Method

I have used the encoder-decoder architecture with a few tweaks which are explained in the comments with the code.

Results

  • Input sentence: three dogs by a screen door that has a pet entrance in it leading to the outside of the house \n
  • compressed vector: [0.82584465 0.8639319 0.03209151 0.6374205 0.53023213]
  • Reproduced sentence: three dogs by a screen door that has a pet entrance in it leading to the outside of the house
  • Input sentence: a woman with short brown hair is looking into a circular mirror and holding a camera up to her cheek
  • compressed vector: [1.5469722 0.7479113 0.5978319 0. 0.91678953]
  • Reproduced sentence: a woman with short brown hair is looking into a circular mirror with a camera in her hand
  • Input sentence: a kitchen with wooden cabinets and a gas range
  • comressed vector: [3.8299806 1.2600164 0. 3.721849 1.0740554]
  • Reproduced sentence: a man with a bandana is riding a motorcycle

textcompression's People

Contributors

dido1998 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.