GithubHelp home page GithubHelp logo

german-article-predictor's Introduction

German-Article-Predictor

Description: As the name suggests this is a repository with a code that predicts what article a german word is. Obviously what I could do is to just save entire dictionary of words and read it every time. This was not my aim, however. What I wanted to do is to see how random german articles indeed are and therefore see if I could build a classifier for them. So what I did is I created a neural network to do it. This repository contains a Convolutional Neural Network that reaches around 96% accuracy. I got my words' dictionary from a similar GitHub project: https://github.com/aakhundov/deep-german

Required libraries:

  • tensorflow (version 1.12.0, recommended to use tensorflow-gpu and theano)
  • keras (version 2.2.2)
  • numpy (version 1.15.1)
  • pandas (version 0.23.4)

My specs:

  • i7-7700HQ Processor
  • 16GB RAM
  • NVIDIA Quadro M1200 4GB graphics card

Training: What my code does first is it converts all words to OneHotEncoder form by changing every letter to a string of zeros of alphabet's length and one in place where this letter would be placed in alphabet. I do it for every letter and then I just connect them to one long string of ones and zeros. This final string has to be of some constant size, so for every word I add zeros so that they will all fit the fixed size. I also have an array that contains what article every word has. I then train my neural network on these two sets, paramaters such as learning rate and batch size can be easily changed. As mentioned before my CNN reached accuracy of around 96%, meaning that after training it can get most of the articles right. After training you can test your neural network by changing 'train' variable to False and setting neural network file location in 'filepathToOpen'. Then you will be able to type words in console to check if it works (use german characters and only small letters).

german-article-predictor's People

Contributors

jaswar 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.