<commit_before>nuve
===
Nuve is a Natural Language Processing Library for Turkish. Currently it supports:

 - Morphologic analysis (33K word per second on a i5 2.8 GHz 64 bit machine)
 - Morphologic generation
 - Stemming
 - Sentence (segmentation) boundary detection
 - N-gram extraction
 
Morphologic Analysis is demonstrated here: http://nuvedemo.apphb.com

Morphologic Generation is demonstrated here: http://fiilcek.apphb.com

Use cases for the above tasks are as follows: 


#### Morphologic Analysis and Stemming

```c#
Language tr = Language.Turkish;

//Analysis
var analyzer = new WordAnalyzer(tr);

//Morphologic Analysis and stemming
IList<Word> solutions = analyzer.Analyze("deneme");

foreach (var solution in solutions)
{
    Console.WriteLine("\t{0}", solution);
    Console.WriteLine("\toriginal:{0} stem:{1}\n",
    solution.GetSurface(),
    solution.GetStem().GetSurface()); //Stemming
}
```
Output:

```
	de/FIIL Ul/FY_EDILGEN_Ul_(U)n yAmA/FC_YF_YETERSIZLIK_(y)AmA
	original:deneme stem:deneme
	
	dene/FIIL mA/FIILIMSI_ISIM_mA
	original:deneme stem:deneme

	dene/FIIL mA/FY_OLUMSUZLUK_mA
	original:deneme stem:deneme
```

####Morphologic Generation

```c#
Root root = tr.GetRootsHavingSurface("kitap").First();

var word = new Word(root);
word.AddSuffix(tr.GetSuffix("IC_COGUL_lAr"));
word.AddSuffix(tr.GetSuffix("IC_SAHIPLIK_BEN_(U)m"));
word.AddSuffix(tr.GetSuffix("IC_HAL_BULUNMA_DA"));
word.AddSuffix(tr.GetSuffix("IC_AITLIK_ki"));
word.AddSuffix(tr.GetSuffix("IC_COGUL_lAr"));
word.AddSuffix(tr.GetSuffix("IC_HAL_AYRILMA_DAn"));

Console.WriteLine(word.GetSurface()); //prints "kitabımdakilerden"
```

Use the `public bool AddSuffix(Suffix suffix, Language language)` in order to make sure that the word is still valid after adding the suffix

```c#
Root root = tr.GetRootsHavingSurface("kitap").First();

var word = new Word(root);
if(!word.AddSuffix(tr.GetSuffix("IC_COGUL_lAr"), tr))
{
    Console.WriteLine("Adding the suffix IC_COGUL_lAr after a verb is not valid!");<commit_msg>readme is updated<commit_after>nuve
===
Nuve is a Natural Language Processing Library for Turkish. Currently it supports:

 - Morphologic analysis (33K word per second on a i5 2.8 GHz 64 bit machine)
 - Morphologic generation
 - Stemming
 - Sentence (segmentation) boundary detection
 - N-gram extraction
 
Morphologic Analysis is demonstrated here: http://nuvedemo.apphb.com

Morphologic Generation is demonstrated here: http://fiilcek.apphb.com

Use cases for the above tasks are as follows: 


#### Morphologic Analysis and Stemming

```c#
Language tr = Language.Turkish;

//Analysis
var analyzer = new WordAnalyzer(tr);

//Morphologic Analysis and stemming
IList<Word> solutions = analyzer.Analyze("deneme");

foreach (var solution in solutions)
{
    Console.WriteLine("\t{0}", solution);
    Console.WriteLine("\toriginal:{0} stem:{1}\n",
    solution.GetSurface(),
    solution.GetStem().GetSurface()); //Stemming
}
```
Output:

```
	de/FIIL Ul/FY_EDILGEN_Ul_(U)n yAmA/FC_YF_YETERSIZLIK_(y)AmA
	original:deneme stem:deneme
	
	dene/FIIL mA/FIILIMSI_ISIM_mA
	original:deneme stem:deneme

	dene/FIIL mA/FY_OLUMSUZLUK_mA
	original:deneme stem:deneme
```

####Morphologic Generation

```c#
Root root = tr.GetRootsHavingSurface("kitap").First();

var word = new Word(root);
word.AddSuffix(tr.GetSuffix("IC_COGUL_lAr"));
word.AddSuffix(tr.GetSuffix("IC_SAHIPLIK_BEN_(U)m"));
word.AddSuffix(tr.GetSuffix("IC_HAL_BULUNMA_DA"));
word.AddSuffix(tr.GetSuffix("IC_AITLIK_ki"));
word.AddSuffix(tr.GetSuffix("IC_COGUL_lAr"));
word.AddSuffix(tr.GetSuffix("IC_HAL_AYRILMA_DAn"));

Console.WriteLine(word.GetSurface()); //prints "kitabımdakilerden"
```

Use the `public bool AddSuffix(Suffix suffix, Language language)` in order to make sure that the word is still valid after adding the suffix

```c#
Root root = tr.GetRootsHavingSurface("gel").First(); //A Turkish verb root 

var word = new Word(root);
if(!word.AddSuffix(tr.GetSuffix("IC_COGUL_lAr"), tr)) //Plural suffix can not be appended to verbs!
{
    Console.WriteLine("Adding the suffix IC_COGUL_lAr after a verb is not valid!");
{'fraction_non_alphanumeric': 0.12986060161408658, 'fraction_numerical': 0.004891171435558816, 'mean_word_length': 5.57556270096463, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '547201', 'n_tokens_mistral': 1520, 'n_tokens_neox': 1432, 'n_words': 343}