Is it possible to reference a Natural Class in search via Regular Expression?

20 views
Skip to first unread message

Kevin Warfel

unread,
Jun 20, 2017, 11:52:38 AM6/20/17
to flex...@googlegroups.com

When using the “Filter for” option in the drop-down box under “Headword” in the Lexicon Edit view, is it possible to reference a Natural Class that has been defined in one’s project?

 

That is, if one selects Filter for in this drop-down box

 

this dialog box comes up:

 

 

Can one reference a Natural Class (e.g., C or V or …) in the Regular Expression that you type into that search box? I suspect it’s not possible, but if it is, I know  a user who would be glad to know about it (and how to do it).

 

Thanks,

Kevin

 

Kevin Warfel

Associate Dictionary and Lexicography Services Coordinator

a.k.a. Dictionary Development Coordinator

SIL International

 

Current technology makes it possible to provide those translating into just about any language with both a dictionary and a thesaurus in the target language, the standard tools of the trade for professional translators, so why are mother-tongue translators in minority languages still expected to do their work without these tools?  Ask me about Rapid Word Collection after reading about it at rapidwords.net.

 

Ron Moe

unread,
Jun 20, 2017, 1:42:28 PM6/20/17
to flex...@googlegroups.com
To the right of the "Enter text to search for:" box is a > button. It brings up a box with some help for regular expressions. The last item in the list is "Regular Expression Help" which gets you into the Help files. There you will find examples of regular expressions such as [aeiou] which is the regular expression for any vowel. It isn't as easy as V for vowel, but it works. I have a file of all the IPA characters and other things which I sometimes need to insert into texts. So if you have natural classes that you would need to use regularly, I would create a file and put them all in the file:
[aeiou] vowels
[bcdfghjklmnpqrstvwxyz] consonants
[ptkbdg] stops

Ron Moe

--
You are subscribed to the publicly accessible group "FLEx list".
Only members can post but anyone can view messages on the website.
To change your status, please write to flex_d...@sil.org.
You can join this group by going to 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+unsubscribe@googlegroups.com.
To post to this group, send email to flex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flex-list/039cd1a8715d14a7f08a5cba99e43fdf%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Kevin Warfel

unread,
Jun 20, 2017, 1:48:43 PM6/20/17
to flex...@googlegroups.com

Thanks, Ron. Those are very helpful suggestions.

 

So based on what you wrote, it seems that the answer to my question is “Not exactly, but you can create a sort of natural class in the Regular Expression by listing all of the class members inside square brackets. You just can’t refer to it with the Natural Class label defined in the Natural Class section of the project (e.g., C or V or …).” Is that an accurate interpretation of what you wrote?

 

Kevin

--

To unsubscribe from this group and stop receiving emails from it, send an email to flex-list+...@googlegroups.com.


To post to this group, send email to flex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flex-list/039cd1a8715d14a7f08a5cba99e43fdf%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

 

--

You are subscribed to the publicly accessible group "FLEx list".
Only members can post but anyone can view messages on the website.
To change your status, please write to flex_d...@sil.org.
You can join this group by going to 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 post to this group, send email to flex...@googlegroups.com.

Hugh Paterson

unread,
Jun 20, 2017, 2:09:04 PM6/20/17
to flex...@googlegroups.com
@Beth

this seems to be a UX issue. is there a way to log UX issues for FLEx? How does the FLEx team track UX issues independent of "bugs" and "Features"?  feel free to PM a response.

- Hugh

--

To unsubscribe from this group and stop receiving emails from it, send an email to flex-list+unsubscribe@googlegroups.com.


To post to this group, send email to flex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flex-list/039cd1a8715d14a7f08a5cba99e43fdf%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You are subscribed to the publicly accessible group "FLEx list".
Only members can post but anyone can view messages on the website.
To change your status, please write to flex_d...@sil.org.
You can join this group by going to 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+unsubscribe@googlegroups.com.

--
You are subscribed to the publicly accessible group "FLEx list".
Only members can post but anyone can view messages on the website.
To change your status, please write to flex_d...@sil.org.
You can join this group by going to 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+unsubscribe@googlegroups.com.

To post to this group, send email to flex...@googlegroups.com.

Randy Regnier

unread,
Jun 20, 2017, 2:27:46 PM6/20/17
to flex...@googlegroups.com

On 6/20/2017 8:52 AM, Kevin Warfel wrote:

When using the “Filter for” option in the drop-down box under “Headword” in the Lexicon Edit view, is it possible to reference a Natural Class that has been defined in one’s project?

 

That is, if one selects Filter for in this drop-down box

 

this dialog box comes up:

 

 

Can one reference a Natural Class (e.g., C or V or …) in the Regular Expression that you type into that search box? I suspect it’s not possible, but if it is, I know  a user who would be glad to know about it (and how to do it).


Regex has no knowledge of the FieldWorks data model, so it cannot search that model path to get that Natural Class. The scope of that search would be the Headword string for the lexical entries.

Randy Regnier

Ron Moe

unread,
Jun 20, 2017, 8:18:59 PM6/20/17
to flex...@googlegroups.com
Yes. Regular Expressions are used outside of FLEx. My understanding is that they are a standard computer language that is used by a range of programs. The Natural Classes that you set up for the parser are unrelated (as Randy has pointed out). Since Regular Expressions is a standard, you can't just define your own symbols like "V" and "C". (You could in Consistent Changes.) I suppose the Filter system in FLEx could be expanded to access the Natural Classes. But since we already have a sort of "work around" that can do what you need, I don't suppose it would be a high priority. I hardly ever use Regular Expressions, but they are very powerful.
Ron

--

To unsubscribe from this group and stop receiving emails from it, send an email to flex-list+unsubscribe@googlegroups.com.


To post to this group, send email to flex...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/flex-list/039cd1a8715d14a7f08a5cba99e43fdf%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

--
You are subscribed to the publicly accessible group "FLEx list".
Only members can post but anyone can view messages on the website.
To change your status, please write to flex_d...@sil.org.
You can join this group by going to 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+unsubscribe@googlegroups.com.

To post to this group, send email to flex...@googlegroups.com.

--
You are subscribed to the publicly accessible group "FLEx list".
Only members can post but anyone can view messages on the website.
To change your status, please write to flex_d...@sil.org.
You can join this group by going to 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+unsubscribe@googlegroups.com.

To post to this group, send email to flex...@googlegroups.com.

GregT

unread,
Jun 20, 2017, 11:36:45 PM6/20/17
to FLEx list
This cam bye done with phonology assistant. It has a standard definition but allows the user to modify it if necessary.

maxwell

unread,
Jun 21, 2017, 12:25:33 PM6/21/17
to flex...@googlegroups.com, Ron Moe
On 2017-06-20 20:18, Ron Moe wrote:
> Yes. Regular Expressions are used outside of FLEx. My understanding is
> that
> they are a standard computer language that is used by a range of
> programs.

Just to add some confusion to this discussion. Regular expressions
represent a finite state grammar. Notations for regular expressions
vary considerably among applications; if you use Linux, for example,
'grep' and 'sed' have slightly different notations, and 'grep -P' (which
is intended to allow some of the abbreviations used for regular
expressions in Perl) has a superset of the notation of ordinary 'grep'.

In the morphology and phonology parts of FLEx (and maybe elsewhere in
FLEx), a different regular expression notation is used for the
environments of phonological rules and allomorphs. This was designed to
model the common usage among (some) linguists. A Natural Class, for
example, is equivalent to a regular expression that lists a set of
phonemes or graphemes as a disjunct set, and can in principle be
converted into that notation.

So in principle it should be possible to translate the left or right
environment of any allomorph or phonological rule, or any sub-piece of
such an environment (such as a Natural Class), into a regular expression
in some other notation.

Mike Maxwell
University of Maryland

David Coward

unread,
Jun 23, 2017, 8:33:40 AM6/23/17
to flex...@googlegroups.com, Ron Moe

Wouldn't it be simpler to provide a set of preconfigured natural classes that can be edited or expanded by end user? This was in Shoebox from the very beginning. I think this would be much more accessible for most humans, for whom regular expression nomenclature is pretty opaque.

 

 

Sent from my Windows 10 phone

 

From: maxwell
Sent: Wednesday, June 21, 2017 12:25 PM
To: flex...@googlegroups.com
Cc: Ron Moe
Subject: Re: [FLEx] Is it possible to reference a Natural Class in search viaRegular Expression?

 

On 2017-06-20 20:18, Ron Moe wrote:

--

You are subscribed to the publicly accessible group "FLEx list".

Only members can post but anyone can view messages on the website.

To change your status, please write to flex_d...@sil.org.

You can join this group by going to 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 post to this group, send email to flex...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages