1 Preliminaries

This are the commands for analysing the primary data associated with this publication.

Load libraries and data:

library(emuR)
library(tidyverse)
library(gridExtra)
library(lmerTest)
library(emmeans)

# Primary dataset: Change the path to the location of plurals_emuDB
pfad1 = "/Volumes/vdata/ERC3/Kenya/primary"

# Secondary dataset: create a path for storing secondary data
pfad2 = "/Volumes/vdata/ERC3/Kenya/secondary"

# read in morphological information
#m.df = read.table(file.path(pfad, "morpho_cc.txt"), header=T)

db = load_emuDB(file.path(pfad1, "plurals_emuDB"))
## INFO: Checking if cache needs update for 75 sessions and 1360 bundles ...
## INFO: Performing precheck and calculating checksums (== MD5 sums) for _annot.json files ...
## INFO: Nothing to update!

1.1 Main aim(s)

The main aim of this study is to document the phonetic variation in prefixes that mark plurals in class 8 nouns for three central Kenya dialects of the Meru-Tharaka group with a particular focus on the unstudied variety of Tigania. Previous auditory-based studies of a small number of individuals suggest that Imenti in the north and Chuka in the south mark plurals with labial and non-labial prefixes respectively. Given that Tigania borders Imenti to the north (and is therefore geographically distant from Chuka) and taking into account various kinds of evidence that Imenti has some characteristics of a standard accent in being the preferred variety that is taught in schools throughout Meru, the expectation was that Tigania should pattern more closely with Imenti than with Chuka.

1.2 Segment list

  • word labels (wordlabs)
  • vowel labels (vlabs)
  • vowel start and end (vstart, vend)
  • stem consonant (stemcons)
  • dialect (dial)
  • speaker (spk)
  • speaker sex (sex)
  • pair (each singular-plural word pair, includes all realisations of field, fields, )
prefix.df = query(db, 
           "[prefix == b|c|ç|ɕ|ð|k|K|p|s|ʃ|tɕ|ts|tʃ|v|ʔ|β
           ^ #MAU =~ .*]")  %>% 
  mutate(
  wordlabs = requery_hier(db, ., "ORT-MAU")$labels,
  vlabs = requery_seq(db, ., 1)$labels,
  vstart = requery_seq(db, ., 1)$start,
  vend = requery_seq(db, ., 1)$end,
  stemcons = requery_seq(db, ., 2)$labels,
  dial= substring(bundle, 1, 2), 
  spk = substring(bundle, 1, 4),
  sex= substring(bundle, 5, 5),
  age= substring(session, 8, 9),
  c_partner = substring(session, 13, 13),
  pair = gsub('.{2}$', '', substring(bundle, 9)),
  age_group= ifelse(age >40, "old", "young"), 
  word_morpho = recode(wordlabs, 
                       "Biara" = "Bi.ara",
                       "BiEBa" = "Bi.EBa",
                       "Bieni" = "Bi.Eni",
                       "BiEni" = "Bi.Eni",
                       "Biimba" = "Bi.imba", 
                       "Biongo" = "Bi.ongo",
                       "Biura" = "Bi.ura",
                       "Biora" = "Bi.ura", 
                       "ciao" = "ciO",
                       "siao" = "siO", 
                       "ciara" = "ci.ara",
                       "ciEBa" = "ci.EBa",
                       "cieni" = "ci.Eni",
                       "ciEni" = "ci.Eni",
                       "ciimba" = "ci.imba",
                       "cimba" = "ci.imba",
                       "ciola" = "ci.ora",
                       "ciongo" = "ci.ongo",
                       "ciora" = "ci.ora",
                       "ciura" = "ci.ora",
                       "siara" = "si.ara",
                       "sjara" = "si.ara",
                       "siEBa" = "si.EBa",
                       "siEni" = "si.Eni",
                       "siimba" = "si.imba",
                       "simba" = "si.imba",
                       "siola" = "si.ora",
                       "siora" = "si.ora",
                       "siura" = "si.ora",
                       "siongo" = "si.ongo"),
category= recode(wordlabs,
                 "Biara" = "pl",
                 "BiEBa" = "pl",
                 "Bieni" = "pl",
                 "BiEni" = "pl",
                 "Biimba" = "pl",
                 "Biongo" = "pl", 
                 "Biura" = "pl", 
                 "Biora" = "pl",
                 "ciao" = "sg",
                 "ciO" = "sg",
                 "siao" = "pl",
                 "siO" ="pl", 
                 "ciara" = "sg",
                 "ciEBa" = "sg",
                 "cieni" = "sg",
                 "ciEni" = "sg",
                 "ciimba" = "sg",
                 "cimba" = "sg",
                 "ciola" = "sg", 
                 "ciora" = "sg",
                 "ciongo" = "sg",
                 "ciora" = "sg",
                 "ciura" = "sg",
                 "siara" = "pl",
                 "sjara" = "pl",
                 "siEBa" = "pl",
                 "siEni" = "pl",
                 "siimba" = "pl",
                 "simba" = "pl",
                 "siola" = "pl",
                 "siora" = "pl",
                 "siura" = "pl",
                 "siongo" = "pl"), 
stem= recode(word_morpho,
             "Bi.ara" = "ara",
             "Bi.EBa" = "EBa",
             "Bi.Eni" = "Eni",
             "Bi.imba" = "imba",
             "Bi.ongo" = "ongo", 
             "Bi.ura" = "ora", 
             "ci.ara" = "ara",
             "ci.EBa" = "EBa",
             "ci.Eni" = "Eni",
             "ci.imba" = "imba",
             "ci.ora" = "ora",
             "ci.ongo" = "ongo",
             "si.ara" = "ara",
             "si.EBa" = "EBa",
             "si.Eni" = "Eni",
             "si.imba" = "imba",
             "si.ora" = "ora",
             "si.ongo" = "ongo"), 
pair= recode(pair,
             "N02_ciola" = "N02_ciora",
             "N02_ciura" = "N02_ciora",
             "N05_cimba" ="N05_ciimba",
             "N07_cieni"="N07_ciEni",
             "N04_cieba" ="N04_ciEBa",
             "u07_kwanda" ="kwanda",
             "l21_kwanda" ="kwanda",
             "l32_kudara" ="kudara"), 
interviewer= recode(c_partner,
                    "C" = "native", 
                    "K"="Imenti"), 
labels = factor(labels, levels =
                           c("b","β","v", "ð",
                             "ts", "s", "tʃ" , "ʃ", 
                             "tɕ", "ɕ" , "ç" , "c","k" ,"ʔ")))

Exclude /siO, ciO/ because there are so few of them and exclude stem /Eni/ because this only occurs in 2 dialects. Also exclude kudara kwanda and one with no name (““) Also make age numeric.

prefix.df = prefix.df %>%
  filter(!(stem %in% 
             c("ciO", "Eni", "siO", "kudara", "kwanda", ""))) %>%
  mutate(age = as.numeric(age),
         stem = factor(stem))

This spectral data is required for fig. 2

p.df = prefix.df %>%
  filter(labels %in% c("tʃ", "tɕ", "ʃ", "ɕ" )) %>%
  filter(dial!="Im") %>%
  mutate(labels = factor(labels),
         dial = factor(dial), 
         dorlabs = case_when(labels %in% c("tʃ", "ʃ") ~ "AP",
                             T ~ "DO")) %>%
  get_trackdata(db, ., "spectrum",  cut = .5) %>%
  convert_wideToLong(., calcFreqs = T) %>%
  group_by(sl_rowIdx) %>%
  # spectral smoothing with 10 coefficients
  mutate(dctsmooth = dct(track_value, m = 10, fit = T)) %>%
  ungroup() %>%
  filter(freq > 2000 & freq < 8000) %>%
 group_by(dorlabs, freq, dial) %>%
 summarise(track_value = mean(track_value), 
           dctsmooth = mean(dctsmooth)) %>%
 ungroup() 
## 
##   INFO: parsing 344 dft segments/events
## 
  |                                                                            
  |                                                                      |   0%
  |                                                                            
  |                                                                      |   1%
  |                                                                            
  |=                                                                     |   1%
  |                                                                            
  |=                                                                     |   2%
  |                                                                            
  |==                                                                    |   2%
  |                                                                            
  |==                                                                    |   3%
  |                                                                            
  |===                                                                   |   4%
  |                                                                            
  |===                                                                   |   5%
  |                                                                            
  |====                                                                  |   5%
  |                                                                            
  |====                                                                  |   6%
  |                                                                            
  |=====                                                                 |   7%
  |                                                                            
  |=====                                                                 |   8%
  |                                                                            
  |======                                                                |   8%
  |                                                                            
  |======                                                                |   9%
  |                                                                            
  |=======                                                               |   9%
  |                                                                            
  |=======                                                               |  10%
  |                                                                            
  |========                                                              |  11%
  |                                                                            
  |========                                                              |  12%
  |                                                                            
  |=========                                                             |  12%
  |                                                                            
  |=========                                                             |  13%
  |                                                                            
  |==========                                                            |  14%
  |                                                                            
  |==========                                                            |  15%
  |                                                                            
  |===========                                                           |  15%
  |                                                                            
  |===========                                                           |  16%
  |                                                                            
  |============                                                          |  17%
  |                                                                            
  |============                                                          |  18%
  |                                                                            
  |=============                                                         |  18%
  |                                                                            
  |=============                                                         |  19%
  |                                                                            
  |==============                                                        |  19%
  |                                                                            
  |==============                                                        |  20%
  |                                                                            
  |==============                                                        |  21%
  |                                                                            
  |===============                                                       |  21%
  |                                                                            
  |===============                                                       |  22%
  |                                                                            
  |================                                                      |  22%
  |                                                                            
  |================                                                      |  23%
  |                                                                            
  |================                                                      |  24%
  |                                                                            
  |=================                                                     |  24%
  |                                                                            
  |=================                                                     |  25%
  |                                                                            
  |==================                                                    |  25%
  |                                                                            
  |==================                                                    |  26%
  |                                                                            
  |===================                                                   |  26%
  |                                                                            
  |===================                                                   |  27%
  |                                                                            
  |===================                                                   |  28%
  |                                                                            
  |====================                                                  |  28%
  |                                                                            
  |====================                                                  |  29%
  |                                                                            
  |=====================                                                 |  29%
  |                                                                            
  |=====================                                                 |  30%
  |                                                                            
  |=====================                                                 |  31%
  |                                                                            
  |======================                                                |  31%
  |                                                                            
  |======================                                                |  32%
  |                                                                            
  |=======================                                               |  32%
  |                                                                            
  |=======================                                               |  33%
  |                                                                            
  |========================                                              |  34%
  |                                                                            
  |========================                                              |  35%
  |                                                                            
  |=========================                                             |  35%
  |                                                                            
  |=========================                                             |  36%
  |                                                                            
  |==========================                                            |  37%
  |                                                                            
  |==========================                                            |  38%
  |                                                                            
  |===========================                                           |  38%
  |                                                                            
  |===========================                                           |  39%
  |                                                                            
  |============================                                          |  40%
  |                                                                            
  |============================                                          |  41%
  |                                                                            
  |=============================                                         |  41%
  |                                                                            
  |=============================                                         |  42%
  |                                                                            
  |==============================                                        |  42%
  |                                                                            
  |==============================                                        |  43%
  |                                                                            
  |===============================                                       |  44%
  |                                                                            
  |===============================                                       |  45%
  |                                                                            
  |================================                                      |  45%
  |                                                                            
  |================================                                      |  46%
  |                                                                            
  |=================================                                     |  47%
  |                                                                            
  |=================================                                     |  48%
  |                                                                            
  |==================================                                    |  48%
  |                                                                            
  |==================================                                    |  49%
  |                                                                            
  |===================================                                   |  49%
  |                                                                            
  |===================================                                   |  50%
  |                                                                            
  |===================================                                   |  51%
  |                                                                            
  |====================================                                  |  51%
  |                                                                            
  |====================================                                  |  52%
  |                                                                            
  |=====================================                                 |  52%
  |                                                                            
  |=====================================                                 |  53%
  |                                                                            
  |======================================                                |  54%
  |                                                                            
  |======================================                                |  55%
  |                                                                            
  |=======================================                               |  55%
  |                                                                            
  |=======================================                               |  56%
  |                                                                            
  |========================================                              |  57%
  |                                                                            
  |========================================                              |  58%
  |                                                                            
  |=========================================                             |  58%
  |                                                                            
  |=========================================                             |  59%
  |                                                                            
  |==========================================                            |  59%
  |                                                                            
  |==========================================                            |  60%
  |                                                                            
  |===========================================                           |  61%
  |                                                                            
  |===========================================                           |  62%
  |                                                                            
  |============================================                          |  62%
  |                                                                            
  |============================================                          |  63%
  |                                                                            
  |=============================================                         |  64%
  |                                                                            
  |=============================================                         |  65%
  |                                                                            
  |==============================================                        |  65%
  |                                                                            
  |==============================================                        |  66%
  |                                                                            
  |===============================================                       |  67%
  |                                                                            
  |===============================================                       |  68%
  |                                                                            
  |================================================                      |  68%
  |                                                                            
  |================================================                      |  69%
  |                                                                            
  |=================================================                     |  69%
  |                                                                            
  |=================================================                     |  70%
  |                                                                            
  |=================================================                     |  71%
  |                                                                            
  |==================================================                    |  71%
  |                                                                            
  |==================================================                    |  72%
  |                                                                            
  |===================================================                   |  72%
  |                                                                            
  |===================================================                   |  73%
  |                                                                            
  |===================================================                   |  74%
  |                                                                            
  |====================================================                  |  74%
  |                                                                            
  |====================================================                  |  75%
  |                                                                            
  |=====================================================                 |  75%
  |                                                                            
  |=====================================================                 |  76%
  |                                                                            
  |======================================================                |  76%
  |                                                                            
  |======================================================                |  77%
  |                                                                            
  |======================================================                |  78%
  |                                                                            
  |=======================================================               |  78%
  |                                                                            
  |=======================================================               |  79%
  |                                                                            
  |========================================================              |  79%
  |                                                                            
  |========================================================              |  80%
  |                                                                            
  |========================================================              |  81%
  |                                                                            
  |=========================================================             |  81%
  |                                                                            
  |=========================================================             |  82%
  |                                                                            
  |==========================================================            |  82%
  |                                                                            
  |==========================================================            |  83%
  |                                                                            
  |===========================================================           |  84%
  |                                                                            
  |===========================================================           |  85%
  |                                                                            
  |============================================================          |  85%
  |                                                                            
  |============================================================          |  86%
  |                                                                            
  |=============================================================         |  87%
  |                                                                            
  |=============================================================         |  88%
  |                                                                            
  |==============================================================        |  88%
  |                                                                            
  |==============================================================        |  89%
  |                                                                            
  |===============================================================       |  90%
  |                                                                            
  |===============================================================       |  91%
  |                                                                            
  |================================================================      |  91%
  |                                                                            
  |================================================================      |  92%
  |                                                                            
  |=================================================================     |  92%
  |                                                                            
  |=================================================================     |  93%
  |                                                                            
  |==================================================================    |  94%
  |                                                                            
  |==================================================================    |  95%
  |                                                                            
  |===================================================================   |  95%
  |                                                                            
  |===================================================================   |  96%
  |                                                                            
  |====================================================================  |  97%
  |                                                                            
  |====================================================================  |  98%
  |                                                                            
  |===================================================================== |  98%
  |                                                                            
  |===================================================================== |  99%
  |                                                                            
  |======================================================================|  99%
  |                                                                            
  |======================================================================| 100%
##   INFO: adding fs attribute to trackdata$data fields
## `summarise()` has grouped output by 'dorlabs', 'freq'. You can override using
## the `.groups` argument.

Store in secondary dataset

write.table(prefix.df, file.path(pfad2, 
                                 "prefix.df.txt"), quote=F)
write.table(p.df, file.path(pfad2, 
                                 "spectral.df.txt"), quote=F)