API References

QuranTree.PrefixType
Prefix(data::Symbol, pos::AbstractPartOfSpeech)

Create a new Prefix object with data as the symbol of the morphological feature with pos as the corresponding Part of Speech.

source
QuranTree.StemType
Stem(data::Symbol, pos::AbstractPartOfSpeech)

Create a new Stem object with data as the symbol of the morphological feature with pos as the corresponding Part of Speech.

source
QuranTree.SuffixType
Suffix(data::Symbol, pos::AbstractPartOfSpeech)

Create a new Suffix object with data as the symbol of the morphological feature with pos as the corresponding Part of Speech.

source
Base.parseMethod
parse(::Type{QuranFeatures}, f::AbstractString)

Extract the features of a morphological Feature object.

Examples

julia> data = QuranData()
julia> crps, tnzl = load(data)
julia> crpsdata = table(crps)
julia> tnzldata = table(tnzl)
julia> parse(QuranFeatures, select(crpsdata.data, :features)[53])
Stem(:NEG, NEG, AbstractQuranFeature[Lemma("laA"), Special("<in~")])
source
QuranTree.chapter_nameMethod
chapter_name(quran::AbstractQuran, transliterate::Bool=false; lang::Symbol=:arabic)

Extract the chapter name of the input quran, in either :arabic (default) or :english

Examples

julia> data = QuranData()
julia> crps, tnzl = load(data)
julia> crpsdata = table(crps)
julia> tnzldata = table(tnzl)
julia> chapter_name(crpsdata[13][2][1])
"ٱلرَّعْد"
source
QuranTree.lemmaMethod
lemma(feat::AbstractQuranFeature)

Extract the lemma of the feature.

Examples

julia> data = QuranData()
julia> crps, tnzl = load(data)
julia> crpsdata = table(crps)
julia> tnzldata = table(tnzl)
julia> lemma(parse(QuranFeatures, select(crpsdata[112].data, :features)[1]))
"qaAla"
source
QuranTree.loadMethod
load(data::QuranData)

Load the raw QuranData as a ReadOnlyArray for both Quranic Corpus and Tanzil Data.

Examples

julia> data = QuranData()
julia> crps, tnzl = load(data);
source
QuranTree.rootMethod
root(feat::AbstractQuranFeature)

Extract the root of the feature.

Examples

julia> data = QuranData()
julia> crps, tnzl = load(data)
julia> crpsdata = table(crps)
julia> tnzldata = table(tnzl)
julia> root(parse(QuranFeatures, select(crpsdata[112].data, :features)[1]))
"qwl"
source
QuranTree.specialMethod
special(feat::AbstractQuranFeature)

Extract the special feature of the token.

Examples

julia> data = QuranData()
julia> crps, tnzl = load(data)
julia> crpsdata = table(crps)
julia> tnzldata = table(tnzl)
julia> special(parse(QuranFeatures, select(crpsdata.data, :features)[53]))
"<in~"
source
QuranTree.tableMethod
table(crps::CorpusRaw)

Convert the CorpusRaw read-only array into a tabularized CorpusData using IndexedTable.

Examples

julia> data = QuranData()
julia> crps, tnzl = load(data)
julia> crpsdata = table(crps);
source
QuranTree.tableMethod
table(tnzl::TanzilRaw)

Convert the TanzilRaw read-only array into a tabularized TanzilData using IndexedTable.

Examples

julia> data = QuranData()
julia> crps, tnzl = load(data)
julia> tnzldata = table(tnzl);
source
QuranTree.versesMethod
verses(quran::AbstractQuran; number=false, start_end=true)

Extract the verses of a AbstractQuran object.

Examples

julia> data = QuranData()
julia> crps, tnzl = load(data)
julia> crpsdata = table(crps)
julia> tnzldata = table(tnzl)
julia> verses(crpsdata[1])[7]
"Sira`Ta {l~a*iyna >anoEamota Ealayohimo gayori {lomagoDuwbi Ealayohimo walaA {lD~aA^l~iyna"
julia> verses(crpsdata[113:114], number=true)[1]
"113:(1,5)"
julia> verses(crpsdata[113:114], number=true, start_end=false)[1]
([113], [1, 2, 3, 4, 5])
source
QuranTree.versesMethod
verses(data::DataFrame[, a::Int64[, b::Int64]]; number=false, start_end=true)

Extract the verses of a DataFrame object from row a to row b.

source
QuranTree.versesMethod
verses(quran::TanzilData)

Extract the verses of a TanzilData object.

Examples

julia> data = QuranData()
julia> crps, tnzl = load(data)
julia> crpsdata = table(crps)
julia> tnzldata = table(tnzl)
julia> verses(tnzldata)[1]
"بِسْمِ ٱللَّهِ ٱلرَّحْمَٰنِ ٱلرَّحِيمِ"
source
QuranTree.wordsMethod
words(quran::AbstractQuran)

Extract words of the input quran.

Examples

julia> data = QuranData()
julia> crps, tnzl = load(data)
julia> crpsdata = table(crps)
julia> tnzldata = table(tnzl)
julia> words(tnzldata[1][7])[1]
"صِرَٰطَ"
source
Yunir.isfeatMethod
isfeat(feat::QuranFeatures, pos::Type{<:AbstractQuranFeature})

Check if the morphological Feature object is a type of pos.

Examples

julia> data = QuranData()
julia> crps, tnzl = load(data)
julia> crpsdata = table(crps)
julia> tnzldata = table(tnzl)
julia> isfeat(parse(QuranFeatures, select(crpsdata[1].data, :features)[2]), Stem)
true
source
QuranTree.@dataMacro
@data(expr)

Extract the data property object.

Examples

julia> data = QuranData()
julia> crps, tnzl = load(data)
julia> crpsdata = table(crps);
julia> tnzldata = table(tnzl);
julia> feat = parse(Features, select(crpsdata.data, :features)[53])
julia> @data feat
:NEG
source
QuranTree.@descMacro
@desc(expr)

Extract the detailed description of a AbstractQuranFeature.

Examples

julia> data = QuranData()
julia> crps, tnzl = load(data)
julia> crpsdata = table(crps);
julia> tnzldata = table(tnzl);
julia> feat = parse(Features, select(crpsdata.data, :features)[53])
julia> @desc feat
Stem
────
Negative:
 ├ data: NEG
 ├ desc: Negative particle
 └ ar_label: حرف نفي
Lemma:
 └ data: laA
Special:
 └ data: <in~
source