Git Product home page Git Product logo

bayanat's Introduction

bayanat is a simple library for gathering statistics about Arabic text.

Examples

from bayanat import Bayanat
dataset = Bayanat(path)

Functions

  • get_top_freq_words retrieves n most frequent words.
  • get_top_freq_chars retrieves n most chars chars.
  • get_largest_word get the largest word in the corpus.
  • get_top_longest_words get the top longest words in the corpus.
  • sample_words_by_char sample words by character.
  • sample_random_sentence sample a sentence with a given size.
  • get_ratio_of_non_arabic show percentage of non Arabic chars.
  • get_ratio_of_english show percentage of English chars.
  • get_ratio_of_arabic show percentage of Arabic chars.
  • get_stats print number of chars, words and lines.
  • get_size_vocab gets the number of unique words in the text.
  • plot_top_freq_words plots n most frequent words a bar graph.
  • plot_top_freq_words plots n most frequent chars a bar graph.
  • plot_embeddings given some words it plots the words using embeddings. This uses AraVec model.
  • plot_word_cloud plots the word cloud of a given text

Demo

Run directly on Colab.

Contribution

This is an open source project where we encourage contributions from the community.

License

MIT license.

Citation

@misc{bayanat2020,
  author = {Zaid Alyafeai and Maged Saeed},
  title = {bayanat: Statistics of Arabic Text.},
  year = {2020},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/ARBML/bayanat}}
}

bayanat's People

Contributors

abdulelahsm avatar zaidalyafeai avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

bayanat's Issues

adding docstrings

Awesome work. I played with the notebook and liked what you've done here. I suggest including docstrings for the methods in Bayanat.py. I can work on that this weekend if you guys need help

Embedding model is not working

This is, Most probably, because the embedding model is not available anymore.

Maybe we need to save it somewhere in the repo?

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.