# Automatic Era Identification in Classical Arabic Poetry
## 3 Dataset and Methods
### Methods
#### 3.2.2 Feature Extraction
In our experiments we used K = 20 and K = 50, which allowed a domain expert to review the topics manually (these numbers were also selected following [PERSON] et al. [67], who analyzed a large corpus of Facebook posts that resulted in 2000 topics--so our number of topics is two orders of magnitude smaller). Consequently, each word is associated with one of the topics inferred by LDA, where the \begin{table}
\begin{tabular}{p{56.9 pt} p{113.8 pt} p{113.8 pt}} \hline \hline
**Type** & **Feature** & **Feature Description** \\ \hline \multirow{8}{*}{**Statistical**} & & The number of lines (_bayts_) in the poem. (We are aware that there are different versions of these poems. This often includes some changes in the words, some change in the order of the verses and some verses that are deleted from one version of the poem but do appear in the other. These changes do not affect the length of the poem. Even when some verses of the poem are deleted, their number is often very low. We do not rely on the ‘short passages anthologies’, such as, for example, in the _[PERSON]_ anthologies (such as that compiled by [PERSON] (d. 845 CE), for example). In these, the whole poem is not quoted but usually an excerpt from it. We depend, in this study, on the diwans of the poets; i.e., books that often include the whole poem as it was transmitted to the classical collectors of these poems). \\ \cline{2-3}  & Average line length & Average line length (hemistich) in terms of tokens. \\ \cline{2-3}  & Average word length & Average word length calculated in terms of characters. \\ \hline \multirow{8}{*}{**Lexical**} & Word count & The number of times that any word appears in the poem. \\  & Stem count & The number of times that any word stem appears in the poem. \\  & Stem bigrams & The number of times that any two-word sequence appears in the poem. \\  & Unique stem count & The total number of unique stems that appear in the poem. \\  & Character count & The proportion of each character within the poem. \\  & Character trigrams & The number of times that any three-word sequence appears in the poem. \\ \hline \multirow{8}{*}{**Syntactic**} & POS distribution & The proportion of each part of speech assigned to the words of the poem. \\  & POS bigram dist. & The proportion of part-of-speech sequences assigned to consecutive word pairs in the poem. \\  & Negation words & The proportion of each negation word (assigned the POS of Neg) in the poem. \\  & Function words & The proportion of each function word (assigned the POS of Preposition) in the poem. \\ \hline \multirow{8}{*}{**Domain-specific**} & _Kafiya_ & Denotes the rhyming letter of the poem. \\  & Hemming & The proportion of lines in the poems in which the end of the first hemistich matches the end of the verse in the final consonant and final vowel. \\  & First Last Counter & The two hemistiches in a line end with words derived from the same root. \\  & Same But Different & Encodes cases where the two hemistiches in a line end with two words derived from stems that share the same letters with a different order (the encodings take the form of an indication and stem pairs). \\  & Tasbrh (Simile) & Indicates whether a certain object or condition shares some attribute with another object or condition; specifically, we attend lexical analogy (‘_k_’, _‘mith_’, _‘ka-anna_’, _‘ka-mā_’)—modeling both the stem and count. \\  & Lexical diversity & Measures the ratio of unique content words to the number of all content words—high ratio indicates word repetitions and, hence, lower diversity. \\ \hline
**Topical** & & The proportion of each topic as automatically analyzed and associated with the poem. \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Features and feature descriptions, grouped by type. poem is described as a distribution over topics based on its word topic association. Below, we describe the outcomes of topic analysis in more detail.