lingu log

How many possible Persian words are there?

Possible word combination of Persian

The syllable structure of Persian is CVCC meaning it can have one (C)onsonant following a (V)owel and two consonants. Persian has 23 consonants and 6 vowels. The minimum number of vowels and consonants a syllable can have is one vowel.

The Persian syllable structure can be:

(C), (C)(V), (C)(V)(C), (C)(V)(C)(C)

Which gives us:

6 + (23*6) + (23*6*23) + (23*6*23*23) =


This is only the possibility of occurring monosyllabic words.

For a bisyllabic word we have:

76320**2 = 5824742400

For a trisyllabic word we have:

76320**3 = 444544339968000

Biggest word I could find in Persian is:

اطمينان آفرينترين

Which has 8 syllables which gives us:




Talk at NAEC2017

Below is my talk at NAEC2017 tited Improvement of English to Persian Machine Translation via N-grams of Part-of-Speech tags:

Improvement of English to Persian Machine Translation via N-grams of Part-of-Speech tags from Adel Rahimi

Custom themes for IDLE

The IDLE (Integrated DeveLopment Environment or Integrated Development and Learning Environment) has numerous …. but the biggest is how the idle looks…odd colors and white background (that I’m sure no programmer ever likes), and

defining your theme in IDLE is easy as…well not that easy because in different operating systems you have different directories and in different versions of python you have different directories to go in. As I have Windows 10 (x64) installed on my computer and using python 3.4 config directory on my computer is c:\python34\lib\idlelib\ within this directory you can find the file config-highlight.def you can edit this file with a text editor (sublime, Vim, and Atom to name a few) and then you can add your custom theme. Here a great theme I use:

after appending this code in the end of the config file you have to go to the IDLE => Options => Configure IDLE => Highlighting under Highlighting theme you can find the custom theme you have defined.

Here is what it looks like: idletheme

The alien life mystery


What comes first into the mind of the reader when they hear the word “alien” is an ill formed human shaped with less or more fingers and green body color. But c’mon! What are the chances?! What I mean is How is it likely that other creatures are living in another galaxy that is like humans?

Aliens and extraterrestrial life forms are not the way we think they are. They aren’t necessarily intelligent. Actually the point is that the term intelligent life form is often confused with alien. SETI (Search for extraterrestrial intelligence), for example is an institute founded by Carl Sagan. SETI researchers are looking for intelligent life forms. But what an intelligent life form would be? What I mean is how would they look like? How would they talk?

What is life?

The first thing is that we should think a little bit outside the box now. An alien could be anything. A plankton living in a planet could be a life form. A tree, A cockroach, or even a peptide. Hold on to peptide we need that. As K. Severin et. al. mentioned in their paper a simple peptide could be 32 amino acids long. Give the number of Amino Acids (20) we can calculate the probability of occurrence of this phenomenon.

(1/20)^32 which is equal to 2.3283064365386962890625e-42 which give us the chance of 1 in a (4.29) x 10^40 This number is really big. Actually not that big but still really big. You see a Googol is 10^100 there are, however, 10^80 atoms in the observable universe! But still this is a probability. You may reach this in the first trial. For example someone may get 10 sixes in a ow when rolling a dice! It’s not improbable, but it’s less likely. Another example is us! You see the chances of us living here is very very astounding. You and me are the wonders! Let’s get to our discussion will there be an intelligent life form? or Will there be any aliens at all? the short answer, we can’t say. BUT we can assume some some stuff. First of all we still don’t know how big is the universe. The universe is approximately 13.8 billion years. That being said what we see from the edge of the universe (or as we call it observable universe because we can’t see what is further) is for 13.8 billion years ago. This is staggering. Considering these three factors a) The universe is so huge b) The universe is unknown c) We can’t see the current light from the observable universe we can’t say that the alien life exist for sure but there is a chance that there is. How do they speak?

Well the science of studying how alien forms and alien life would communicate is called Xenolinguistcs. We’re not sure if they even speak so that we would have something called xenophonetics or xenophonolgy. Or even if they use our methods of writing, or even do they write?!

Humans have created a thing called language because this is our only way of communication the sounds we produce is constrained by our speech organs. but would they even produce speech? If they had a capability in their mind that they could transmit their neuron pulses with their hands or even with their foreheads they probably won’t need to communicate verbally.

How about writing?

Writing is rather different. Writing was not necessary at first. You can talk and communicate easily. How about them? Well we use writing for two major reasons:

1) speech fades quickly and we will forget

2) communication with later generations

Aliens might be good at remembering, they might be good at communicating with other generations as well.

How About other aspects of language like our syntax?

Human languages differ in terms of word order. SOV (Subject, Object, Verb) language like Kurdish, Armenian, Korean and Hungarian exist. Other languages like Polish exist in which the basic word order is SVO but speakers can move words around the sentence (it might change the emphatic meaning). So how would the languages of aliens differ from us? Again the concept of Experiencer, Instrument, Agent etc. (As in Theta role in Government and Binding Theory) are social constraints. For example what if alien life forms don’t have any Subject or Agent? What if they don’t cooperate with each other? They live alone. Or what if their perspective of world different?


To conclude the probability of alien life form is really high. The probability of intelligent life form is lower but still likely due to the fact that we are still not sure about the size of the universe! If they are intelligent and if they are living in a planet like us with atmosphere and gravity force of 9.8 m/s^2 chances are high that they will evolve to be sort of like us. Or will they? our physiological shape is constrained by a lot of factors and plus it’s not at it’s best. we’re so weak. We even need shoes to walk but our Homo ancestors can walk and wander easily. There was a really complex process that led to humans in this form. We can say probably if the place aliens live is similar to us they might incorporate our tools in language. Using writing, using double articulation etc. but it might differ in some senses. For example our perception of sun might be different from theirs. They might even have two moons and therefore invent two words. OR dualism might not work on their side. They may have 3 genders. Well not in the sense that we are thinking for example during evolution there may be a group of Hominids still living and have incorporated language but only their males lived because they were the only gender who were physically tough. So an imaginary language would be:

/bvav/ = He

/bv/ = She

/bvai/ = It

Or maybe their cognitive view is different. For instance humans tend to name things in similar classes similar names. For example Who said that the plural form a noun should be the same as it's singular form?

Further Reading:






  • Severin, K., Lee, D.H., Kennan, A.J. and Ghadiri, M.R., 1997. A synthetic peptide ligase. Nature, 389(6652), pp.706-709.



Transfer files to your devices with IIS

IIS is a great web server from good guys at Microsoft. Since it’s Microsoft technology it is natively supported in all the version of Microsoft windows. We’re gonna use IIS as a web server for our home computer and use it to transfer files to other devices like iPad.


  • You must have Windows computers
  • All the devices mus be connected to the same WiFi


  • IIS Activation
  • IIS Configuration

First Step: Activation

First (on some devices) you need to activate IIS in the Control Panel:

Go to Control Panel --> All Control Panel Items --> Programs and Features or simply copy the below address in your address bar:

Control Panel\All Control Panel Items\Programs and Features

Now Click on Turn Windows Features On or Off and then check Internet Information Services.


Now you have our IIS set-up and running all the files in c:\inetpub will be published in localhost (supposing your Windows is installed in Drive C) Go to the address localhost in your browser and voila!

Second Step: Configuration

Now go to IIS configuration it is located in Control Panel\All Control Panel Items\Administrative Tools open Internet Information Services (IIS) Manager and go to Directory Browsing


Now, All you have to do is to know you computer’s IP address in your local network simply go to CMD (By pressing Win key + R now type CMD. In the Command Prompt window type Ip config. Copy your IPv4 address.


Now go to your inetpub folder and copy anything you want to transfer to you devices. enter the IP Address you had copied previously in your iPad, iPhone etc. and hit go.