Installing sequitur

888 views
Skip to first unread message

Daniel J Douglas

unread,
Jul 31, 2015, 10:46:33 AM7/31/15
to kaldi-help
I am trying to install sequitur and have been stepping through all the errors. This most recent one:

In file included from sequitur_wrap.cpp:3110:

./Multigram.hh:32:10: fatal error: 'tr1/unordered_map' file not found

#include <tr1/unordered_map>

         ^

1 error generated.

error: command 'cc' failed with exit status 1

make: *** [build] Error 1


Seems to be looking for a file tools/sequitur/tr1/unordered_map , but there is no tr1/ directory created in tools. Could you explain this error to me? Thanks.

-Daniel

Jan Trmal

unread,
Jul 31, 2015, 10:52:01 AM7/31/15
to kaldi-help
This does not actually relate to tools directory -- <tr1/unordered_map> is/was C++ TR1 system header (https://en.wikipedia.org/wiki/C%2B%2B_Technical_Report_1). Also, it does not really have anything to do with Kaldi. I can understand that does not help you in any way.
Depending on your gcc version, you might either update gcc  (if you have an old one) or try replacing "<tr1/unordered_map>" with "<unordered_map>".
Let me know if it fixes the problem.
If yes, I will figure out patch so that the install script works.
y.


--
You received this message because you are subscribed to the Google Groups "kaldi-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel J Douglas

unread,
Jul 31, 2015, 11:04:44 AM7/31/15
to kaldi...@googlegroups.com
I updated gcc to 5.2.0 and changed the include to <unordered_map>. Process still fails with the same error.

-Daniel

--
You received this message because you are subscribed to a topic in the Google Groups "kaldi-help" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/kaldi-help/x3AJzKHe5lY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to kaldi-help+...@googlegroups.com.

Jan Trmal

unread,
Jul 31, 2015, 11:13:07 AM7/31/15
to kaldi-help
You might have the same problem with another file -- in that case you have to change all occurrences. 
Or, you did re-run the full script again -- in that case your change got replaced by the original file from the archive,
In that case, go to sequitur directory (tools/sequitur) and just run make.
Also, please use my personal e-mail (jtr...@gmail.com) to follow-up (this subject is hardly interesting for subscribers of kaldi-help)
y.

Daniel Povey

unread,
Jul 31, 2015, 1:26:02 PM7/31/15
to kaldi-help
Incidentally, I have been told that Phonetisaurus gives almost as good accuracy as Sequitur and is way faster and easier to install.  We wight want to consider switching some of the recipes.
Dan

Jan Trmal

unread,
Jul 31, 2015, 6:31:53 PM7/31/15
to kaldi-help
All, in the end, we didn't manage to install it.
The reason is that even after installing gcc, the python distutils were using clang command switches. Searching the internet, it seems the distutils will use whatever flags the python was built with. We did try to reset the flags, but without success.
I don't have access to a mac, so I couldn't try it myself. If someone from the more experienced crowd has mac, it would be great if he/she could figure out where is the problem.
y.

On Fri, Jul 31, 2015 at 11:04 AM, Daniel J Douglas <daniel....@temple.edu> wrote:

Daniel Povey

unread,
Jul 31, 2015, 6:44:20 PM7/31/15
to kaldi-help
Yenda, I don't know if you have any time to play around with phonetisaurus?
Sequitur is abandonware; these problems are going to get worse and worse unless we find someone who has the time to properly support it.
Dan


Daniel Povey

unread,
Jul 31, 2015, 6:48:07 PM7/31/15
to kaldi-help
BTW, one possible thing we could do to try to keep sequitur up to date it to create a git project for it.  This would encourage others to help.  The code is gplv2, so we are within our rights to do this, as long as we keep the same license; of course we would acknowledge the original authors.  Maybe someone on this list who is familiar with github could set this up?

Dan

Jan Trmal

unread,
Jul 31, 2015, 8:39:40 PM7/31/15
to kaldi-help
I'm not planning to go into sequitur in the near future. I was trying to make it work reliably while we were still in Babel and it left a bitter aftertaste that still didn't manage to vanish.  Looking at the github page of phonetisarus (https://github.com/AdolfVonKleist/Phonetisaurus) it's not particularly active either (well, still better something than nothing, I know).

For the time being, I agree we should make the sequitur fork on github and try to keep it compilable.
y.

tadej...@gmail.com

unread,
Oct 1, 2015, 11:16:06 AM10/1/15
to kaldi-help
Hi, all,
not sure if this thread is still relevant, but it's the only hit on google when pasting that error that happens when trying to build sequitur when included in kaldi on OS X.
For posterity, I solved it by:

1) Using Yenda's sequitur fork on github: https://github.com/sequitur-g2p/sequitur-g2p
2) forcing clang to use the GNU libstdc++ instead of libc++ when compiling sequitur:

CPPFLAGS="-stdlib=libstdc++" python setup.py install

-- Tadej

Jan Trmal

unread,
Oct 1, 2015, 12:39:56 PM10/1/15
to kaldi-help

Tadej, Thanks  for letting us know.
Dan,  perhaps we should consider using the github repo of sequitur (at least until the scripts for phonetisaurus will be available)?
Y.

Daniel Povey

unread,
Oct 1, 2015, 2:34:39 PM10/1/15
to kaldi-help
agreed- that seems to make sense.

Guoguo Chen

unread,
Oct 1, 2015, 2:57:27 PM10/1/15
to kaldi...@googlegroups.com
Just came across this threads... I have been using phonetisaurus for some time already actually. I wrote some simple scripts for that, it's simple. The general procedure is:

1. Use phonetisaurus to create grapheme/phoneme alignments.
2. Build n-gram models for graphones, I use srilm.
3. Convert the LM to OpenFst format, I use phonetisaurus
4. Apply G2P models (one n-best from the LM), I used phonetisaurus

It's much faster than Sequitur, and it makes more sense for languages such as Chinese, as it implements the many-to-many alignment algorithm.

Yenda, I can share my scripts with you if we have a plan to use that. I used an old version of phonetisaurus though (the time I started using phonetisaurus, there was a problem with their github repo).

Guoguo
--

Soky Kak

unread,
Jul 6, 2016, 11:23:55 AM7/6/16
to kaldi-help
Dear Guoguo Chen,

I am really interested in your noted. Currently, I am finding the tool to create the g2p for Khmer Language that I have around 30K keywords.
I have tried to find any document of Phonetisaurus but I can't found it. So, Could you provide me some documents of phonetisaurus from first step like install and configure (for Mac OS or CentOS).
Note: currently, I have built manually but It takes a lot time for it that why I need a tool for helping this.

Best regards,
Reply all
Reply to author
Forward
0 new messages