Skip to main content

A text-processing language based on Python 3.

Project description

Natsulang text processing language

This is a small text processing language based on Python 3. It is now being used in a software called CJCMCG.

Example

Recently, a Chinese book called <平安经> is hot on the Internet. All sentences in this book is in the format of **平安. The most famous paragraph translated in English is like this:

Born safe. One month safe. 100 days safe. 1 year old safe. 2 years old safe. 3 years old safe. 4 years old safe. 5 years
old safe. 6 years old safe. 7 years old safe. 8 years old safe. 9 years old safe. 10 years old safe...

In chinese, the paragraph is:

初生平安,满月平安,百天平安,1岁平安,2岁平安,3岁平安,4岁平安,5岁平安,6岁平安,7岁平安,8岁平安,9岁平安,10岁平安...

This paragraph is so tidy, that it can be generated with programs. Using natsulang, you can generate this paragraph like below:

初生平安,满月平安,百天平安{s="";for(i:range(1,121))(s+=","+str(i)+"岁平安");s}。

Maybe you are headache with your math proofs. This is not a problem in Natsulang. Just use the following program:

Input what you want to proof: {name=input();}
Proof:

Proposition A: {name}
Proposition B: Proposition C is false.
Proposition C: At lease one proposition between A and B is true.

Lemma 1: Proposition C is true

Proof: If C is false, then A and B is both false, and B is false, then C is true. This contradicts.

Now start proof:

If A is false, since C is true, B is true, and C is false. This contradicts. So A is true, i.e., {name}

Q.E.D

Can you find how this program works?

Run Natsulang

First, you need to download Python 3 and install. If you're using Windows, you need to add Python 3 to Path.

For Unix-based operating systems, download the natsulang file and put it into Path directories like /usr/local/bin.

For Windows, download the natsulang file to your user directory, and use python natsulang in the terminal (if the current directory is your user directory).

Learn

You can learn Natsulang here.

English tutorials are preparing, please wait for some time.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

natsulang-1.0.0b1.tar.gz (6.1 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

natsulang-1.0.0b1-py3.8.egg (10.8 kB view details)

Uploaded Egg

natsulang-1.0.0b1-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file natsulang-1.0.0b1.tar.gz.

File metadata

  • Download URL: natsulang-1.0.0b1.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for natsulang-1.0.0b1.tar.gz
Algorithm Hash digest
SHA256 a2ae3f9cf7b027f8cca4c9343674aa89a7f34583d99e6abf94110831247ae951
MD5 f48b967b7be9f1c3ec3218f58565beba
BLAKE2b-256 39412d12ad047e31191ef3f5dbb0a73c05348b66be192589857b3906407a5734

See more details on using hashes here.

File details

Details for the file natsulang-1.0.0b1-py3.8.egg.

File metadata

  • Download URL: natsulang-1.0.0b1-py3.8.egg
  • Upload date:
  • Size: 10.8 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for natsulang-1.0.0b1-py3.8.egg
Algorithm Hash digest
SHA256 ef2d0cce32945647192a82672d0556d9c8cb8c7937e3d8d7732ae13488871e12
MD5 1fb6dcbb4f6a0181ace831c78b814f05
BLAKE2b-256 9a3e9becfa9b090f2e33912df33899e27fa0229bbe9d0aa58a769ab251565bd5

See more details on using hashes here.

File details

Details for the file natsulang-1.0.0b1-py3-none-any.whl.

File metadata

  • Download URL: natsulang-1.0.0b1-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.23.0 setuptools/49.6.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.2

File hashes

Hashes for natsulang-1.0.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 695f6bcc9e10a0c81f00e342fe8d57ffb84f80b3792d04e5ef42a1193d84f40c
MD5 a1cb7ebd3ec851863002de0e21f761be
BLAKE2b-256 8cbd1652161efef030744e1fbc7b065393c3dd76baecdf2d80f75a129cc2f6e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page