Author: Otlogetswe

  • The Naked truth

    This painting of “The Truth coming out of the well” was done by the Frenchman Jean-Léon Gérôme in 1896 and in an attempt to explain it one story goes like this: Truth and the Lie meet one day. The Lie says to the Truth: “It’s a marvelous day today!” The Truth looks up to the…

  • Beef cuts amongst Batswana

    My paper on Setswana beef cuts (dirwe tsa kgomo) has been accepted by the Anthropology Southern Africa. It contributes to a better understanding of butchering practices, especially during a Setswana wedding. Can you name the numbered parts of a Setswana cow below?

  • Collocation Exploration!

    Collocations are expressions of multiple words which commonly co-occur. For example, the top few bigram collocations in a Setswana corpus are listed below, as measured using Pointwise Mutual Information: While the results above are highly collocated, the expressions are also very infrequent. Therefore it is useful to apply filters, such as ignoring all bigrams which…

  • Sets

    Yesterday I played around with the idea of sets. Sets are mutable unordered collections of unique elements. Common uses include membership testing, removing duplicates from a sequence, and computing standard math operations on sets such as intersection, union, difference, and symmetric difference. Sets do not record element position or order of insertion. Accordingly, sets do…

  • 3 and 4 consonantal clusters

    We use the re.findall() (“find all”) method to find all (non-overlapping) matches of the given regular expression. Bellow we find all the three consonantal cluster followed by Four consonantal clusters together with their frequencies: [(‘tlh’, 7752), (‘tsh’, 5245), (‘tsw’, 3250), (‘nts’, 2373), (‘ngw’, 1247), (‘ntl’, 853), (‘tlw’, 652), (‘kgw’, 606), (‘nkg’, 480), (‘nth’, 363), (‘mph’,…

  • Python index of Cv word pairs patterns

    If we want to be able to inspect words with certain consont-vowel combinations, it would be helpful to have an index, allowing us to quickly find the list of words that contains a given consonant-vowel pair, e.g. cv_index[‘tu’] should give us all words containing tu. Here’s how we can do this:

  • Python: Consonant-vowel pairs

    Let’s combine regular expressions with conditional frequency distributions. Here we will extract all consonant-vowel sequences from the words of Setswana, such as [ka] and [si]. Since each of these is a pair, it can be used to initialize a conditional frequency distribution. We then tabulate the frequency of each pair. This analysis can shed light…