Write Python in Urdu - اردو میں کوڈ لکھیں

Overview

UrduPython

Write simple Python in Urdu.

How to Use

  1. Write Urdu code in سامپل۔پے The mappings are as following:
    "۔":          ".",
    "،":          ",",
    "۱":          "1",
    "۲":          "2",
    "۳":          "3",
    "۴":          "4",
    "۵":          "5",
    "۶":          "6",
    "۷":          "7",
    "۸":          "8",
    "۹":          "9",
    "۰":          "0",
    "چھاپ":       "print",
    "ورنہ اگر":   "elif",
    "اگر":        "if",
    "ورنہ":       "else",
    "جبتک":       "while",
    "جو":         "for",
    "اندر":       "in", 
    "داخله":      "input",
    "توڑ":        "break",
    "جاری":       "continue",
    "گزر":        "pass",
    "حق":         "True",
    "باطل":       "False",
    "ہے":         "is",
    "طبقه":       "class",
    "وضح":        "def",
    "ابتدا":      "init",
    "خود":        "self",
    "واپس":       "return",
    "ستلی":       "string",
    "ستل":        "str",
    "شامل":       "append",
    "نکل":        "pop",
    "اور":        "and",
    "یا":         "or",    
    "سب":         "all",
    "کوئ":        "any",
    "ندارد":      "None",
  1. Translate and run the code in one command: python urdu_python.py

Guide

For macOS

Use TextEdit (default text editor) to write Urdu code. Activate right-to-left typing through Menu: Format->Text->Writing Direction->Right-to-Left

For Linux/Windows

Download and install Notepad++. Right click and activate RTL (Right-to-left).

You might also like...
A Python package implementing a new model for text classification with visualization tools for Explainable AI :octocat:
A Python package implementing a new model for text classification with visualization tools for Explainable AI :octocat:

A Python package implementing a new model for text classification with visualization tools for Explainable AI 🍣 Online live demos: http://tworld.io/s

Python bindings to the dutch NLP tool Frog (pos tagger, lemmatiser, NER tagger, morphological analysis, shallow parser, dependency parser)

Frog for Python This is a Python binding to the Natural Language Processing suite Frog. Frog is intended for Dutch and performs part-of-speech tagging

A python wrapper around the ZPar parser for English.

NOTE This project is no longer under active development since there are now really nice pure Python parsers such as Stanza and Spacy. The repository w

💫 Industrial-strength Natural Language Processing (NLP) in Python

spaCy: Industrial-strength NLP spaCy is a library for advanced Natural Language Processing in Python and Cython. It's built on the very latest researc

Python interface for converting Penn Treebank trees to Stanford Dependencies and Universal Depenencies

PyStanfordDependencies Python interface for converting Penn Treebank trees to Universal Dependencies and Stanford Dependencies. Example usage Start by

Fuzzy String Matching in Python

FuzzyWuzzy Fuzzy string matching like a boss. It uses Levenshtein Distance to calculate the differences between sequences in a simple-to-use package.

🎐 a python library for doing approximate and phonetic matching of strings.

jellyfish Jellyfish is a python library for doing approximate and phonetic matching of strings. Written by James Turk [email protected] and Michael

Python wrapper for Stanford CoreNLP tools v3.4.1

Python interface to Stanford Core NLP tools v3.4.1 This is a Python wrapper for Stanford University's NLP group's Java-based CoreNLP tools. It can eit

Comments
  • How to solve imports?

    How to solve imports?

    Preface

    Python imports are interesting.

    They can happen in many forms. For example:

    import os
    os.open()
    

    makes os available in the global namespace, so you can call the function it contains as os.open(). In this case, you cannot call open() directly.

    Another way is:

    from os import open
    open()
    

    This now makes open available in the global namespace, hence you can call it directly.

    Also, imports in Python can happen anywhere in the code, so when they do happen again, they override the previous ones.

    e.g.

    from os import open
    .
    .
    # some code...
    .
    .
    from numpy import open # just an example
    

    The second import's open will now become the global open.


    How to solve this in UrduPython?

    There are some methods which I'm contemplating. Ideas for module imports

    Do nothing

    Pros:

    • Works out-of-the-box
    • No extra work needed
    • Always compatible

    Cons:

    • Hurts user experience (mix of English and Urdu)

    Use global translations

    e.g. numpy.open and os.open -> Open == کھولو in both scenarios, using a global dictionary

    Pros:

    • One word fits all
    • Minimizes effort

    Cons:

    • Compatibility issues (Example?? Idk)
    • Meaning may vary across libraries, e.g. open might mean open a file (کھولو) or something which is already opened (کھلا). Depends on what the function does. So meanings might become jumbled.

    Use package-specific translations

    e.g. numpy would have it's own list of translations, nested translations, etc

    Pros:

    • Separate meaning for each package

    Cons:

    • Needs runtime checking, so compilation step might not work
    • What if an import happens later?
    enhancement discussion 
    opened by SaadBazaz 0
Owner
Saad A. Bazaz
Human.
Saad A. Bazaz
A python script to prefab your scripts/text files, and re create them with ease and not have to open your browser to copy code or write code yourself

Scriptfab - What is it? A python script to prefab your scripts/text files, and re create them with ease and not have to open your browser to copy code

DevNugget 3 Jul 28, 2021
Write Alphabet, Words and Sentences with your eyes.

The-Next-Gen-AI-Eye-Writer The Eye tracking Technique has become one of the most popular techniques within the human and computer interaction era, thi

Rohan Kasabe 2 Apr 5, 2022
Python module (C extension and plain python) implementing Aho-Corasick algorithm

pyahocorasick pyahocorasick is a fast and memory efficient library for exact or approximate multi-pattern string search meaning that you can find mult

Wojciech Muła 763 Dec 27, 2022
Python module (C extension and plain python) implementing Aho-Corasick algorithm

pyahocorasick pyahocorasick is a fast and memory efficient library for exact or approximate multi-pattern string search meaning that you can find mult

Wojciech Muła 579 Feb 17, 2021
Python-zhuyin - An open source Python library that provides a unified interface for converting between Chinese pinyin and Zhuyin (bopomofo)

Python-zhuyin - An open source Python library that provides a unified interface for converting between Chinese pinyin and Zhuyin (bopomofo)

null 2 Dec 29, 2022
Ελληνικά νέα (Python script) / Greek News Feed (Python script)

Ελληνικά νέα (Python script) / Greek News Feed (Python script) Ελληνικά English Το 2017 είχα υλοποιήσει ένα Python script για να εμφανίζει τα τωρινά ν

Loren Kociko 1 Jun 14, 2022
Web mining module for Python, with tools for scraping, natural language processing, machine learning, network analysis and visualization.

Pattern Pattern is a web mining module for Python. It has tools for: Data Mining: web services (Google, Twitter, Wikipedia), web crawler, HTML DOM par

Computational Linguistics Research Group 8.4k Dec 30, 2022
A python framework to transform natural language questions to queries in a database query language.

__ _ _ _ ___ _ __ _ _ / _` | | | |/ _ \ '_ \| | | | | (_| | |_| | __/ |_) | |_| | \__, |\__,_|\___| .__/ \__, | |_| |_| |___/

Machinalis 1.2k Dec 18, 2022
Python library for processing Chinese text

SnowNLP: Simplified Chinese Text Processing SnowNLP是一个python写的类库,可以方便的处理中文文本内容,是受到了TextBlob的启发而写的,由于现在大部分的自然语言处理库基本都是针对英文的,于是写了一个方便处理中文的类库,并且和TextBlob

Rui Wang 6k Jan 2, 2023