Giter VIP home page Giter VIP logo

multi-domaine-corpwd's Introduction

Multi-Domaine-CorpWD

This work is supported by the Ministry of Higher Education and Scientific Research in Algeria (Project C00L07UN100120180002) Conception & Supervision : L. Ouahrani & D. Bennouar / Contributor : Abdennour BenHamida.

This code allows to generate a multi domaines corpus based on keywords related to the subject of the study, cleaned and ready to use, works with all languages. The corpus will be stored in a json file in the same path as the ".py" is running. The output contains:

  • Corpus Name
  • Words count : total number of words and diffrent words
  • Articles count: number of wikipedia articles returned into the corpus
  • Articles: a dictionary containing all the textual data returned stored as { Article's title : Content}

1- Requirments:

  • You may need to enable these two commandes if your punkt isn't installed, once dowloaded and installed nltk will work perfectly fine: #1- import nltk #2- nltk.download('punkt')
  • Python 2.7 or later
  • Internet connection
  • At least 20mb of free storage

2- Libraries used:

  • Wikipedia: API for wiki articles, installation is required (pip install wikipedia or pip3 if it doesn't work)
  • re.sub: function that alllow as to delete portions of text that are or not in the text
  • word_tokenize: we use to tokenize (split) our texts into a list of words
  • request exception to handle connection errors and timeouts
  • sleep for time out exeptions handling
  • langdetect: a tool that detects languages, so that we don't return any article that is not written in arabic

3- How to use:

  • Call the "BuildCorp" function with its two parameters:
    • Keywords: a string with arabic owrds describing the domaines needed, one string with all the descriptions
    • Nmae: name of the json file that will be created after generation
  • The more keywords you insert, the bigger and more precise the corpus will be. According to the description, the generator will start by creating combination of all words included in the descprition to insure a more accurate relation between textual data returned.

For further questions or inquiries about this code, you can contact:

multi-domaine-corpwd's People

Contributors

benhamidaabdennour avatar

Watchers

 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.