C# Class Common.HtmlCleaner.PersianProofWriter

Show file Open project: rabbal/Mvc5

Public Methods

Method Description
ApplyHalfSpaceRule ( this text ) : string

Adds zwnj char between word and prefix/suffix

ApplyModeratePersianRules ( this text ) : string
ApplyPersianYeKe ( this text ) : string

Fixes common writing mistakes caused by using a bad keyboard layout, such as replacing Arabic Ye with Persian one and so on ...

CleanupExtraMarks ( this text ) : string

Replaces more than one ! or ? mark with just one

CleanupZwnj ( this text ) : string

Removes unnecessary zwnj char that are succeeded/preceded by a space

ContainsFarsi ( this text ) : bool

Does text contain Persian characters?

YeHeHalfSpace ( this text ) : string

Converts ه ی to ه‌ی

Method Details

ApplyHalfSpaceRule() public static method

Adds zwnj char between word and prefix/suffix
public static ApplyHalfSpaceRule ( this text ) : string
text this Text to process
return string

ApplyModeratePersianRules() public static method

public static ApplyModeratePersianRules ( this text ) : string
text this
return string

ApplyPersianYeKe() public static method

Fixes common writing mistakes caused by using a bad keyboard layout, such as replacing Arabic Ye with Persian one and so on ...
public static ApplyPersianYeKe ( this text ) : string
text this Text to process
return string

CleanupExtraMarks() public static method

Replaces more than one ! or ? mark with just one
public static CleanupExtraMarks ( this text ) : string
text this Text to process
return string

CleanupZwnj() public static method

Removes unnecessary zwnj char that are succeeded/preceded by a space
public static CleanupZwnj ( this text ) : string
text this Text to process
return string

ContainsFarsi() public static method

Does text contain Persian characters?
public static ContainsFarsi ( this text ) : bool
text this Text to process
return bool

YeHeHalfSpace() public static method

Converts ه ی to ه‌ی
public static YeHeHalfSpace ( this text ) : string
text this Text to process
return string