Git Product home page Git Product logo

smarties's Introduction

Smarties 🎨

Smarties is a Text Classifier using an innovative approach based on Wikipedia auto-learning to classify any documents/text. We use a Machine Learning and Doc2Vec algorithms.

Did you see this scene in Avengers: Age of Ultron ? Our learnable programs work kind similar (without the vilain part, we hope... 😄 ). Our Ai use the most advanced open knowledge base to learn for identifing new categories, and our solution can always learn new related topics.

Getting Started 🔰

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

You need to have python 3.+ install on your machine. Please follow this link to install

Installing

pip install Smarties

Example 📍

wiki_dico_path = "wiki_dico.json"

if __name__ == '__main__':
    sm.set_lang('english')
    #construct the knowledge base to a wiki_dico.json file
    title_theme_list = []
    title_theme_list.append(('Soccer', 'Soccer'))
    title_theme_list.append(('Baseball', 'Baseball'))
    title_theme_list.append(('Golf', 'Golf'))
    title_theme_list.append(('Basketball', 'Basketball'))
    title_theme_list.append(('Judo', 'Judo'))

    sm.construct_wiki_dico(wiki_dico_path, title_theme_list, init=True, max_article_links=30, find_links=True)
    sm.construct_database_from_knwoledge_base(wiki_dico_path, database_file_ouput="database_file_custom_name.csv")

    df = sm.import_database(database_file ="database_file_custom_name.csv", sampling=True)
    df = sm.sort_keyword_from_database(df, stoppath=stoppath, number_of_character_per_word_at_least=5,
                                       number_of_words_at_most_per_phrase=20,
                                       number_of_keywords_appears_in_the_text_at_least=10)

    classifier,df = sm.model_from_database(df)

    sentence_to_predict = "The French soccer team is perhaps one of the best team around the world."
    sm.predict(classifier, df, sentence_to_predict)

Language Supported :

  • arabic
  • danish
  • german
  • english
  • spanish
  • french
  • indonesian
  • italian
  • japanese
  • dutch
  • portuguese
  • brasilian
  • romanian
  • russian

TODO 😁

Please feel free to contribute ! Report any bugs in the issue section.

  • Complete Code documentation and README
  • Build a basis code
  • Multi Langage identification and support
  • File format support
  • Text Granularity classification
  • Text processing (Clean, tokenizing,...)
  • Wikipedia auto-search by class
  • Database creation from a json (Wikipedia learning, Datastructure, sampling..)
  • Create text classification algorithm (RAKE, GridSearch, RFC, Doc2Vec)
  • Input example and return classification
  • Multiple output classification by granularity

LICENSE

Please be aware that this code is under the GPL3 license. You must report each utilisation of this code to the author of this code (anisayari). Please push your code using this API on a forked Github repo public.

smarties's People

Contributors

anisayari avatar

Stargazers

Niklesh  avatar Oğuz Çatal avatar

Watchers

James Cloos 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.