Rules

This file is used by Nepali Wikipedia Translator application to generate the rules in runtime.

Lets say that all the apples and Bananas need to be changed with Fruits.

Text.

All apples are good and Bananas are good for health. 

Required text after conversion:

All fruits are good and fruits are good for health.

We can have nouns in nounlist.txt

apple|fruit
banana.

So here :

(HI_noun)+ will be Apple
(NE_noun)+ will be fruit
(HI_noun)+ will be Banana
(NE_noun)+ will be fruit

The rule file will contain a rule :

(HI_noun)+s|(NE_noun)+s

Now the application will search for all the nouns with s in it.

apple and banana

add s in it

apples
bananas

replace apples with fruits

fruits

replace bananas with fruits

fruits

the result will be

All fruits are good and fruits are good for health.

Benefit सम्पादन गर्नुहोस्

You can add a single rule: Nouns have 's' in it. You can update the Nouns in the nounlist.txt and you don't have to worry about the rules every time. The rules will be used automatically for all the nouns that are catagorised as Nouns.

Hence Nouns will be treated as nouns to make them plural (adding s) Similarly other parts of speech can have their own rules. Its likely that the list of nouns can increase, because there are more than apple and banana as nouns. Lets say papaya. In the future when you add papaya, you will not have to worry about pluralizing into papayas because the rule has already been created for papayas as (HI_noun)+s will be papayas as long as you categorize papaya as a noun.

"RajeshPandey/Nepali Wikipedia Translator/Rules"को प्रयोगकर्ता पृष्ठमा फर्कनुहोस्।