Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#156 emu.query() strange results

closed-wont-fix
Tina John
emu-r (15)
5
2012-02-07
2010-07-01
Grand Wazoo
No

Hi,

There seems to be a bug in the way queries sumbitted to the emu.query() function are processed :

The two following (identical) queries give different results :

> segs <- emu.query("mydb", "*", "Phonetic = i|y|u|e|2|o|E|9|O|a")
moving data from Tcl to R
Read 56 records

> segs <- emu.query("mydb", "*", "Phonetic = 2|o|E|9|O|a|i|y|u|e")
moving data from Tcl to R
Read 6 records

When I declare all symbols in the Legal labels of the template file as being a Vowel category, I get the "correct" result, or at least the number of records returned (104) is equal to the sum of the numbers returned by individual calls :

> segs <- emu.query("mydb", "*", "Phonetic = Vowel")
moving data from Tcl to R
Read 104 records

Maybe Emu doesn't like the use of numbers as phonetic symbols ?

Versions : Emu 2.3 , Emu/R 4.2

Discussion

  • shotee
    shotee
    2010-11-15

    Numbers as phonetic symbols can be surrounded with apostrophes in queries .
    This gives consistent results. Otherwise the parser interprets queries
    with starting numeric symbol as numbers and transforms compare targets also to numbers.
    So the query "phonetic=2" gives all symbols starting with "2".

     
  • Tina John
    Tina John
    2012-02-07

    use the apostroph for queries with numbers e.g. '2|o|E|9|O|a|i|y|u|e'

     
  • Tina John
    Tina John
    2012-02-07

    • assigned_to: nobody --> rasnatty
    • status: open --> closed-wont-fix