All the Q & A’s are queries that work on the ae_emuDB
that comes with the emuR package:
course_data_dir = "./myEMURdata" # change to valid dir path on your system
library(emuR)
create_emuRdemoData(course_data_dir)
db = load_emuDB(file.path(course_data_dir, "emuR_demoData", "ae_emuDB"),
verbose = F)
Please place your answers in the R Markdown code blocks or write the answers next to the A:
query(db, "Phonetic == n")
## # A tibble: 12 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 n 1032. 1196. 0fc618… 0000 msajc… 158 158 Phon…
## 2 n 1741. 1791. 0fc618… 0000 msajc… 168 168 Phon…
## 3 n 1515. 1554. 0fc618… 0000 msajc… 170 170 Phon…
## 4 n 2431. 2528. 0fc618… 0000 msajc… 184 184 Phon…
## 5 n 895. 1023. 0fc618… 0000 msajc… 158 158 Phon…
## 6 n 2402. 2475. 0fc618… 0000 msajc… 182 182 Phon…
## 7 n 2227. 2271. 0fc618… 0000 msajc… 216 216 Phon…
## 8 n 3046. 3068. 0fc618… 0000 msajc… 229 229 Phon…
## 9 n 1435. 1495. 0fc618… 0000 msajc… 127 127 Phon…
## 10 n 1775. 1834. 0fc618… 0000 msajc… 132 132 Phon…
## 11 n 509. 544. 0fc618… 0000 msajc… 166 166 Phon…
## 12 n 2448. 2480. 0fc618… 0000 msajc… 199 199 Phon…
## # … with 7 more variables: attribute <chr>, start_item_seq_idx <int>,
## # end_item_seq_idx <int>, type <chr>, sample_start <int>, sample_end <int>,
## # sample_rate <int>
query(db, "Phonetic != n|p")
## # A tibble: 239 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 V 187. 257. 0fc618… 0000 msajc… 147 147 Phon…
## 2 m 257. 340. 0fc618… 0000 msajc… 148 148 Phon…
## 3 V 340. 427. 0fc618… 0000 msajc… 149 149 Phon…
## 4 N 427. 483. 0fc618… 0000 msajc… 150 150 Phon…
## 5 s 483. 567. 0fc618… 0000 msajc… 151 151 Phon…
## 6 t 567. 597. 0fc618… 0000 msajc… 152 152 Phon…
## 7 H 597. 674. 0fc618… 0000 msajc… 153 153 Phon…
## 8 @: 674. 740. 0fc618… 0000 msajc… 154 154 Phon…
## 9 f 740. 893. 0fc618… 0000 msajc… 155 155 Phon…
## 10 r 893. 950. 0fc618… 0000 msajc… 156 156 Phon…
## # … with 229 more rows, and 7 more variables: attribute <chr>,
## # start_item_seq_idx <int>, end_item_seq_idx <int>, type <chr>,
## # sample_start <int>, sample_end <int>, sample_rate <int>
query(db, "Word =~ .*")
## # A tibble: 54 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 C 187. 674. 0fc618… 0000 msajc… 2 2 Word
## 2 F 674. 740. 0fc618… 0000 msajc… 24 24 Word
## 3 C 740. 1289. 0fc618… 0000 msajc… 30 30 Word
## 4 F 1289. 1463. 0fc618… 0000 msajc… 43 43 Word
## 5 F 1463. 1634. 0fc618… 0000 msajc… 52 52 Word
## 6 C 1634. 2150. 0fc618… 0000 msajc… 61 61 Word
## 7 C 2034. 2604. 0fc618… 0000 msajc… 83 83 Word
## 8 F 300. 412. 0fc618… 0000 msajc… 2 2 Word
## 9 F 412. 572. 0fc618… 0000 msajc… 14 14 Word
## 10 C 572. 1091. 0fc618… 0000 msajc… 21 21 Word
## # … with 44 more rows, and 7 more variables: attribute <chr>,
## # start_item_seq_idx <int>, end_item_seq_idx <int>, type <chr>,
## # sample_start <int>, sample_end <int>, sample_rate <int>
query(db, "[Phonetic == E -> Phonetic == n]")
## # A tibble: 2 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 E->n 950. 1196. 0fc618… 0000 msajc… 157 158 Phon…
## 2 E->n 1437. 1554. 0fc618… 0000 msajc… 169 170 Phon…
## # … with 7 more variables: attribute <chr>, start_item_seq_idx <int>,
## # end_item_seq_idx <int>, type <chr>, sample_start <int>, sample_end <int>,
## # sample_rate <int>
query(db, "[#Phonetic == E -> Phonetic == n]")
## # A tibble: 2 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 E 950. 1032. 0fc618… 0000 msajc… 157 157 Phon…
## 2 E 1437. 1515. 0fc618… 0000 msajc… 169 169 Phon…
## # … with 7 more variables: attribute <chr>, start_item_seq_idx <int>,
## # end_item_seq_idx <int>, type <chr>, sample_start <int>, sample_end <int>,
## # sample_rate <int>
query(db, "[Phonetic == E -> #Phonetic == n]")
## # A tibble: 2 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 n 1032. 1196. 0fc618… 0000 msajc… 158 158 Phon…
## 2 n 1515. 1554. 0fc618… 0000 msajc… 170 170 Phon…
## # … with 7 more variables: attribute <chr>, start_item_seq_idx <int>,
## # end_item_seq_idx <int>, type <chr>, sample_start <int>, sample_end <int>,
## # sample_rate <int>
query(db, "[[Text == amongst -> Text == her] -> Text == friends]")
## # A tibble: 1 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 among… 740. 1289. 0fc618… 0000 msajc… 2 30 Word
## # … with 7 more variables: attribute <chr>, start_item_seq_idx <int>,
## # end_item_seq_idx <int>, type <chr>, sample_start <int>, sample_end <int>,
## # sample_rate <int>
query(db, "[#Text =~ .* -> Text == to]")
## # A tibble: 3 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 futile 572. 1091. 0fc618… 0000 msajc… 21 21 Word
## 2 them 1456. 1565. 0fc618… 0000 msajc… 51 51 Word
## 3 tempt… 1401. 1806. 0fc618… 0000 msajc… 51 51 Word
## # … with 7 more variables: attribute <chr>, start_item_seq_idx <int>,
## # end_item_seq_idx <int>, type <chr>, sample_start <int>, sample_end <int>,
## # sample_rate <int>
query(db, "[Text == always & Word == C]")
## # A tibble: 1 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 always 775. 1280. 0fc618… 0000 msajc… 28 28 Word
## # … with 7 more variables: attribute <chr>, start_item_seq_idx <int>,
## # end_item_seq_idx <int>, type <chr>, sample_start <int>, sample_end <int>,
## # sample_rate <int>
query(db, "[Text =~ .* & Word == C & Accent == S]")
## # A tibble: 25 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 among… 187. 674. 0fc618… 0000 msajc… 2 2 Word
## 2 frien… 740. 1289. 0fc618… 0000 msajc… 30 30 Word
## 3 beaut… 2034. 2604. 0fc618… 0000 msajc… 83 83 Word
## 4 futile 572. 1091. 0fc618… 0000 msajc… 21 21 Word
## 5 furth… 1628. 1958. 0fc618… 0000 msajc… 68 68 Word
## 6 resis… 1958. 2754. 0fc618… 0000 msajc… 80 80 Word
## 7 chill 380. 745. 0fc618… 0000 msajc… 13 13 Word
## 8 wind 745. 1083. 0fc618… 0000 msajc… 23 23 Word
## 9 caused 1083. 1456. 0fc618… 0000 msajc… 36 36 Word
## 10 shiver 1651. 1995. 0fc618… 0000 msajc… 70 70 Word
## # … with 15 more rows, and 7 more variables: attribute <chr>,
## # start_item_seq_idx <int>, end_item_seq_idx <int>, type <chr>,
## # sample_start <int>, sample_end <int>, sample_rate <int>
query(db, "[Phoneme == p ^ Syllable == S]")
## # A tibble: 3 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 p 559. 640. 0fc618… 0000 msajc… 147 147 Phon…
## 2 p 1656. 1699. 0fc618… 0000 msajc… 122 122 Phon…
## 3 p 864. 970. 0fc618… 0000 msajc… 136 136 Phon…
## # … with 7 more variables: attribute <chr>, start_item_seq_idx <int>,
## # end_item_seq_idx <int>, type <chr>, sample_start <int>, sample_end <int>,
## # sample_rate <int>
query(db, "[Syllable =~ .* ^ Phoneme != k|p|t]")
## # A tibble: 83 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 W 187. 257. 0fc618… 0000 msajc… 102 102 Syll…
## 2 S 257. 674. 0fc618… 0000 msajc… 103 103 Syll…
## 3 S 674. 740. 0fc618… 0000 msajc… 104 104 Syll…
## 4 S 740. 1289. 0fc618… 0000 msajc… 105 105 Syll…
## 5 W 1289. 1463. 0fc618… 0000 msajc… 106 106 Syll…
## 6 W 1463. 1634. 0fc618… 0000 msajc… 107 107 Syll…
## 7 W 1634. 1791. 0fc618… 0000 msajc… 108 108 Syll…
## 8 S 1791. 1945. 0fc618… 0000 msajc… 109 109 Syll…
## 9 W 1945. 2150. 0fc618… 0000 msajc… 110 110 Syll…
## 10 S 2034. 2284. 0fc618… 0000 msajc… 111 111 Syll…
## # … with 73 more rows, and 7 more variables: attribute <chr>,
## # start_item_seq_idx <int>, end_item_seq_idx <int>, type <chr>,
## # sample_start <int>, sample_end <int>, sample_rate <int>
query(db, "[[Phonetic =~ .* ^ Syllable == S] ^ Text == amongst|beautiful]")
## # A tibble: 9 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 m 257. 340. 0fc618… 0000 msajc… 148 148 Phon…
## 2 V 340. 427. 0fc618… 0000 msajc… 149 149 Phon…
## 3 N 427. 483. 0fc618… 0000 msajc… 150 150 Phon…
## 4 s 483. 567. 0fc618… 0000 msajc… 151 151 Phon…
## 5 t 567. 597. 0fc618… 0000 msajc… 152 152 Phon…
## 6 H 597. 674. 0fc618… 0000 msajc… 153 153 Phon…
## 7 db 2034. 2150. 0fc618… 0000 msajc… 173 173 Phon…
## 8 j 2150. 2211. 0fc618… 0000 msajc… 174 174 Phon…
## 9 u: 2211. 2284. 0fc618… 0000 msajc… 175 175 Phon…
## # … with 7 more variables: attribute <chr>, start_item_seq_idx <int>,
## # end_item_seq_idx <int>, type <chr>, sample_start <int>, sample_end <int>,
## # sample_rate <int>
query(db, "[[Phonetic =~ .* ^ Syllable == S] ^ #Text == amongst|beautiful]")
## # A tibble: 2 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 among… 187. 674. 0fc618… 0000 msajc… 2 2 Word
## 2 beaut… 2034. 2604. 0fc618… 0000 msajc… 83 83 Word
## # … with 7 more variables: attribute <chr>, start_item_seq_idx <int>,
## # end_item_seq_idx <int>, type <chr>, sample_start <int>, sample_end <int>,
## # sample_rate <int>
query(db, "[Start(Word, Syllable) == TRUE]")
## # A tibble: 54 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 W 187. 257. 0fc618… 0000 msajc… 102 102 Syll…
## 2 S 674. 740. 0fc618… 0000 msajc… 104 104 Syll…
## 3 S 740. 1289. 0fc618… 0000 msajc… 105 105 Syll…
## 4 W 1289. 1463. 0fc618… 0000 msajc… 106 106 Syll…
## 5 W 1463. 1634. 0fc618… 0000 msajc… 107 107 Syll…
## 6 W 1634. 1791. 0fc618… 0000 msajc… 108 108 Syll…
## 7 S 2034. 2284. 0fc618… 0000 msajc… 111 111 Syll…
## 8 W 300. 412. 0fc618… 0000 msajc… 105 105 Syll…
## 9 W 412. 572. 0fc618… 0000 msajc… 106 106 Syll…
## 10 S 572. 798. 0fc618… 0000 msajc… 107 107 Syll…
## # … with 44 more rows, and 7 more variables: attribute <chr>,
## # start_item_seq_idx <int>, end_item_seq_idx <int>, type <chr>,
## # sample_start <int>, sample_end <int>, sample_rate <int>
query(db, "[End(Word, Syllable) == TRUE]")
## # A tibble: 54 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 S 257. 674. 0fc618… 0000 msajc… 103 103 Syll…
## 2 S 674. 740. 0fc618… 0000 msajc… 104 104 Syll…
## 3 S 740. 1289. 0fc618… 0000 msajc… 105 105 Syll…
## 4 W 1289. 1463. 0fc618… 0000 msajc… 106 106 Syll…
## 5 W 1463. 1634. 0fc618… 0000 msajc… 107 107 Syll…
## 6 W 1945. 2150. 0fc618… 0000 msajc… 110 110 Syll…
## 7 W 2362. 2604. 0fc618… 0000 msajc… 113 113 Syll…
## 8 W 300. 412. 0fc618… 0000 msajc… 105 105 Syll…
## 9 W 412. 572. 0fc618… 0000 msajc… 106 106 Syll…
## 10 S 798. 1091. 0fc618… 0000 msajc… 108 108 Syll…
## # … with 44 more rows, and 7 more variables: attribute <chr>,
## # start_item_seq_idx <int>, end_item_seq_idx <int>, type <chr>,
## # sample_start <int>, sample_end <int>, sample_rate <int>
query(db, "[Medial(Word, Syllable) == TRUE]")
## # A tibble: 9 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 S 1791. 1945. 0fc618… 0000 msajc… 109 109 Syll…
## 2 W 2284. 2362. 0fc618… 0000 msajc… 112 112 Syll…
## 3 S 2078. 2228. 0fc618… 0000 msajc… 117 117 Syll…
## 4 W 2220. 2305. 0fc618… 0000 msajc… 116 116 Syll…
## 5 W 2305. 2534. 0fc618… 0000 msajc… 117 117 Syll…
## 6 W 640. 707. 0fc618… 0000 msajc… 131 131 Syll…
## 7 S 2271. 2502. 0fc618… 0000 msajc… 137 137 Syll…
## 8 W 3046. 3123. 0fc618… 0000 msajc… 141 141 Syll…
## 9 W 2037. 2173. 0fc618… 0000 msajc… 122 122 Syll…
## # … with 7 more variables: attribute <chr>, start_item_seq_idx <int>,
## # end_item_seq_idx <int>, type <chr>, sample_start <int>, sample_end <int>,
## # sample_rate <int>
query(db, "[Num(Word, Syllable) == 4]")
## # A tibble: 1 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 C 1995. 2692. 0fc618… 0000 msajc… 82 82 Word
## # … with 7 more variables: attribute <chr>, start_item_seq_idx <int>,
## # end_item_seq_idx <int>, type <chr>, sample_start <int>, sample_end <int>,
## # sample_rate <int>
query(db, "[Phoneme =~ .* ^ End(Word, Syllable) == FALSE]")
## # A tibble: 61 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 V 187. 257. 0fc618… 0000 msajc… 114 114 Phon…
## 2 k 1634. 1715. 0fc618… 0000 msajc… 131 131 Phon…
## 3 @ 1715. 1741. 0fc618… 0000 msajc… 132 132 Phon…
## 4 n 1741. 1791. 0fc618… 0000 msajc… 133 133 Phon…
## 5 s 1791. 1893. 0fc618… 0000 msajc… 134 134 Phon…
## 6 I 1893. 1945. 0fc618… 0000 msajc… 135 135 Phon…
## 7 b 2034. 2150. 0fc618… 0000 msajc… 139 139 Phon…
## 8 j 2150. 2211. 0fc618… 0000 msajc… 140 140 Phon…
## 9 u: 2211. 2284. 0fc618… 0000 msajc… 141 141 Phon…
## 10 d 2284. 2303. 0fc618… 0000 msajc… 142 142 Phon…
## # … with 51 more rows, and 7 more variables: attribute <chr>,
## # start_item_seq_idx <int>, end_item_seq_idx <int>, type <chr>,
## # sample_start <int>, sample_end <int>, sample_rate <int>
query(db, "[Text =~ .* ^ Num(Syllable, Phoneme) == 4]")
## # A tibble: 7 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 C 745. 1083. 0fc618… 0000 msajc… 23 23 Word
## 2 C 1083. 1456. 0fc618… 0000 msajc… 36 36 Word
## 3 C 1995. 2692. 0fc618… 0000 msajc… 82 82 Word
## 4 C 425. 1129. 0fc618… 0000 msajc… 13 13 Word
## 5 C 1401. 1806. 0fc618… 0000 msajc… 51 51 Word
## 6 C 1039. 1422. 0fc618… 0000 msajc… 32 32 Word
## 7 C 667. 1211. 0fc618… 0000 msajc… 25 25 Word
## # … with 7 more variables: attribute <chr>, start_item_seq_idx <int>,
## # end_item_seq_idx <int>, type <chr>, sample_start <int>, sample_end <int>,
## # sample_rate <int>
query(db, "[[#Syllable == S ^ Phoneme == s] -> Syllable == S]")
## # A tibble: 4 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 S 257. 674. 0fc618… 0000 msajc… 103 103 Syll…
## 2 S 1213. 1797. 0fc618… 0000 msajc… 134 134 Syll…
## 3 S 1114. 1401. 0fc618… 0000 msajc… 101 101 Syll…
## 4 S 1248. 1579. 0fc618… 0000 msajc… 119 119 Syll…
## # … with 7 more variables: attribute <chr>, start_item_seq_idx <int>,
## # end_item_seq_idx <int>, type <chr>, sample_start <int>, sample_end <int>,
## # sample_rate <int>
# NOTE: usage of paste0() is optional
# as it is only used for formatting purposes
query(db, paste0("[[Phonetic == H -> Phonetic =~ .*] ",
"-> Phonetic == I | U]"))
## # A tibble: 1 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 H->h-… 1098. 1213. 0fc618… 0000 msajc… 196 198 Phon…
## # … with 7 more variables: attribute <chr>, start_item_seq_idx <int>,
## # end_item_seq_idx <int>, type <chr>, sample_start <int>, sample_end <int>,
## # sample_rate <int>
# NOTE: usage of paste0() is optional
# as it is only used for formatting purposes
query(db, paste0("[Syllable == W & End(Word, Syllable) == TRUE ",
"^ Num(Word, Syllable) == 3]"))
## # A tibble: 7 x 16
## labels start end db_uuid session bundle start_item_id end_item_id level
## <chr> <dbl> <dbl> <chr> <chr> <chr> <int> <int> <chr>
## 1 W 1945. 2150. 0fc618… 0000 msajc… 110 110 Syll…
## 2 W 2362. 2604. 0fc618… 0000 msajc… 113 113 Syll…
## 3 W 2228. 2754. 0fc618… 0000 msajc… 118 118 Syll…
## 4 W 707. 1129. 0fc618… 0000 msajc… 132 132 Syll…
## 5 W 2502. 2694. 0fc618… 0000 msajc… 138 138 Syll…
## 6 W 3123. 3457. 0fc618… 0000 msajc… 142 142 Syll…
## 7 W 2173. 2368. 0fc618… 0000 msajc… 123 123 Syll…
## # … with 7 more variables: attribute <chr>, start_item_seq_idx <int>,
## # end_item_seq_idx <int>, type <chr>, sample_start <int>, sample_end <int>,
## # sample_rate <int>