Comments

Flat
Windows: "rror: Lexical mistake "
User: kmaclean
Date: 6/10/2008 8:54 am
Views: 5543
Rating: 25

If you get this error when trying to compile your grammar and voca files: 

$ mkdfa.pl sample
sample.grammar has 3 rules
sample.voca    has 6 categories and 18 words
---
Now parsing grammar file
"rror:       Lexical mistake "

---
no .dfa or .dict file generated

use the Cygwin "dos2unix" command in the same directory as your grammar and voca files, for example:

$ cd temp

$ ls
sample.grammar  sample.voca

$ dos2unix *.*
sample.grammar: done.
sample.term: done.
sample.voca: done.

$ mkdfa.pl sample
sample.grammar has 3 rules
sample.voca    has 6 categories and 18 words
---
Now parsing grammar file
Now modifying grammar to minimize states[-1]
Now parsing vocabulary file
Now making nondeterministic finite automaton[6/6]
Now making deterministic finite automaton[6/6]
Now making triplet list[6/6]
---
generated: sample.dfa sample.term sample.dict

$ ls
sample.dfa  sample.dict  sample.grammar  sample.term  sample.voca

Ken 

Re: Windows: "rror: Lexical mistake "
User: RedCisc
Date: 6/28/2009 12:19 pm
Views: 127
Rating: 19

Beautiful. Thanks for the help.

Re: Windows: "rror: Lexical mistake "
User: khanh
Date: 5/6/2011 2:35 am
Views: 178
Rating: 10

I have the similar problems. My voca is:

% NS_B

<s> sil

 

% NS_E

</s> sil

 

% CALL_V

GỌI g ọi 

 

% DIAL_V

BẤM b ấ m

 

% NAME_N

KHÁNH kh á nh

h à

THẦY th ầ y

ĐẠT đ ạ t

LINH l i nh

 

% DIGIT

KHÔNG kh ô ng

MỘT m ộ t

HAI h ai

BA b a

BỐN b ố n

NĂM n ă m

SÁU s á u 

BẢY b ả y

TÁM t á m

CHÍN ch í n

MƯỜI m ườ i

Re: Windows: "rror: Lexical mistake "
User: kmaclean
Date: 5/6/2011 9:57 am
Views: 102
Rating: 14

>I have the similar problems. My voca is:

I don't think you can use non-ASCII characters for you phonemes (you can use any character for the actual word itself, just not the phoneme)

Re: Windows: "rror: Lexical mistake "
User: adees
Date: 6/11/2012 8:57 pm
Views: 279
Rating: 17

Hi ken,

I try to do what u have suggested as below, but still got the error line 66. Please help me. Thanks a lot Ken.

ACER@ACER-PC ~

ls

voxforge

 

ACER@ACER-PC ~

cd voxforge

 

ACER@ACER-PC ~/voxforge

ls

HTK_Scripts  manual

 

ACER@ACER-PC ~/voxforge

cd manual

 

ACER@ACER-PC ~/voxforge/manual

ls

sample.grammar.txt  sample.voca.rtf

 

ACER@ACER-PC ~/voxforge/manual

dos2unix *.*

dos2unix: converting file sample.grammar.txt to Unix format ...

dos2unix: Skipping binary file sample.voca.rtf

 

ACER@ACER-PC ~/voxforge/manual

mkdfa.pl sample

cannot open "sample.grammar" at /Julius/bin/mkdfa.pl line 66.

PreviousNext