com.bahmanm.persianutils

Members list

Type members

Classlikes

sealed trait ConvertibleDate

Base trait for date representations that can be converted across calendar systems.

Base trait for date representations that can be converted across calendar systems.

Attributes

Supertypes
class Object
trait Matchable
class Any
Known subtypes
object DateConverter

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object DateToWord

Converts date representations into Persian verbal expressions.

Converts date representations into Persian verbal expressions.

Example:

 DateToWord(PersianDate(1361, 3, 3))    // "سوم خرداد یک هزار و سیصد و شصت و یک"
 DateToWord(GregorianDate(1992, 12, 3)) // "سوم دسامبر یک هزار و نه‌صد و نود و دو"

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
DateToWord.type
final case class GregorianDate(year: Int, month: Int, day: Int) extends ConvertibleDate

Represents a date in the Gregorian calendar.

Represents a date in the Gregorian calendar.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object GregorianDate

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
class InvalidDateException extends Exception

Attributes

Supertypes
class Exception
class Throwable
trait Serializable
class Object
trait Matchable
class Any
Show all
object NumToWord

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
NumToWord.type
final case class PersianDate(year: Int, month: Int, day: Int) extends ConvertibleDate

Represents a date in the Persian (Solar Hijri / Jalali) calendar.

Represents a date in the Persian (Solar Hijri / Jalali) calendar.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object PersianDate

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
final case class SanitiserConfig(standardiseCharacters: Boolean = ..., cleanSpacing: Boolean = ..., removeTatweel: Boolean = ..., standardiseDigits: Boolean = ..., standardisePunctuation: Boolean = ..., removeDiacritics: Boolean = ...)

Configuration options for TextSanitiser.

Configuration options for TextSanitiser.

Value parameters

cleanSpacing

cleans and canonicalises whitespace, non-breaking spaces, and zero-width non-joiners

removeDiacritics

strips Arabic Tashkeel (harakat) short vowel diacritics

removeTatweel

strips Kashida / Tatweel elongation characters

standardiseCharacters

replaces Arabic and non-standard character variants with standard Persian characters

standardiseDigits

converts Western ASCII and Eastern Arabic digits into Persian digits

standardisePunctuation

normalises punctuation symbols into Persian equivalents

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object TextSanitiser

Utility for sanitising and normalising Persian text.

Utility for sanitising and normalising Persian text.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type