filtering reduplication

13 views
Skip to first unread message

Gary Persons

unread,
Jun 3, 2024, 9:23:01 AMJun 3
to flex-list

Using Regular Expressions, how do you filter for the reduplication of CV (e.g. gaga, dada, etc.)? Can you use Natural Classes in Regular Expressions?

Gary

Kevin Warfel

unread,
Jun 3, 2024, 10:47:16 AMJun 3
to flex...@googlegroups.com

Hi, Gary.

 

My ability with regular expressions is pretty basic, so someone else may have a better way to do what you’re wanting, but you can try something like this:

^([bcdfghjklmnprstvwyz][aeiou])\1

 

Amend that to specify whatever consonants you have in your language in the first set of square brackets and the vowels that exist in your language in the second set of square brackets.

If you can reference a natural class in a regular expression, I don’t know how to do it.

 

Note: This regular expression looks for word-initial reduplication only.

 

Best wishes,

 

Kevin Warfel

Associate Dictionary & Lexicography Services Coordinator

Rapid Word Collection workshop consultant

--
"FLEx list" messages are public. Only members can post.
flex_d...@sil.org
http://groups.google.com/group/flex-list.
---
You received this message because you are subscribed to the Google Groups "FLEx list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flex-list+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flex-list/051601dab5b9%242656c950%2473045bf0%24%40sil.org.

Gary Persons

unread,
Jun 3, 2024, 11:04:49 AMJun 3
to flex...@googlegroups.com

Thanks Kevin, I was trying to do it with Natural Classes, but this works.

Gary

Reply all
Reply to author
Forward
0 new messages