Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/aggregation-helper-functions.R
Original file line number Diff line number Diff line change
Expand Up @@ -235,13 +235,13 @@ make_typestring <- function(strings, ...) {
codepts <- get_codepoints(chars)
codepts[codepts %in% get_codepoints(base_glyphs)] <- "B"
codepts[codepts %in% get_codepoints(modifiers)] <- "M"
codepts[codepts %in% get_codepoints(clicks)] <- "M"
codepts[codepts %in% get_codepoints(clicks)] <- "K"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked git blame for this line, which led me to #365. It's PR description says (among other things):

when building feature vectors, clicks are now handled like modifiers (not like base glyphs), which makes it easier to get the correct features (previously they were incorrect)

SO I think this change will likely result in incorrect feature vectors for clicks. I'd rather try changing the line in order_ipa that checks for modifiers %in% mods (see other comment)

codepts[codepts %in% get_codepoints(diacritics)] <- "D"
codepts[codepts %in% get_codepoints(contour_glyphs)] <- "C"
codepts[codepts %in% get_codepoints(tones)] <- "T"
codepts[codepts %in% get_codepoints(null_phone)] <- "N"
codepts[codepts %in% get_codepoints(disjunct)] <- "|"
missed <- !codepts %in% c("B", "M", "C", "D", "T", "N", "|")
missed <- !codepts %in% c("B", "M", "K", "C", "D", "T", "N", "|")
if (any(missed)) {
warning(paste("Unfamiliar glyph components.", "Phone:", string,
"Codepoint:", codepts[missed]),
Expand Down
Loading