how to convert .lm file(language model) to .lm.bin(binary file)? - nlp

I am using pocketsphinx for offline speech recognition. I use lmtool to get language model and dictionary.But the language model has extension .lm but pocketsphinx requires .lm.bin file. So, how can I convert this?

You just need to:
1. Download http://sourceforge.net/projects/cmusphinx/files/sphinxbase/0.8/sphinxbase-0.8-win32.zip
Unpackage sphinxbase-0.8-win32.zip. The folder will be PATH\
In my case thats C:\Users\carope9\Desktop\
Move lm file to PATH\sphinxbase-0.8-win32\bin\Release
Open CMD and write cd PATH\sphinxbase-0.8-win32\bin\Release
Write sphinx_lm_convert -i YOUR_LM_FILE -o YOUR_LM.BIN_FILE
example: sphinx_lm_convert -i es_ES.lm -o es_ES.lm.bin
Your new lm.bin file will be into PATH\sphinxbase-0.8-win32\bin\Release
If you don't use Windows need to download source files from http://sourceforge.net/projects/cmusphinx/files/sphinxbase/0.8/sphinxbase-0.8.tar.gz but I don't know how to install it I'm reading https://sourceforge.net/p/cmusphinx/discussion/help/thread/c67930c0/?limit=25
P/D: According to some people this doesn't work, it worked for me and I don't know how to correct their error. Hope it helps you.

Related

Gromacs: .ene extension not recognized

I'm new to Gromacs (and protein-analysis coding in general, but have some experience with python-based code). I'm trying to convert a .ene file received from pyDock to a more readable format (it currently opens
When I try to use different commands that the gromacs guide says accept .ene files (gmx eneconv and gmx dump), for example
gmx eneconv -f project.ene -o converted.edr
and
gmx dump -e project.ene -om read.mdp
I get the error
File 'project.ene' cannot be used by GROMACS because it does not have a recognizable extension.
The following extensions are possible for this option:
.edr
I have updated my OS and re-installed gromacs. My installation is working according to the 'Getting Started' page.
I am also open to suggestions for other programs to open and read the .ene file type.
Thanks!
"ene" is short for "energy" which contains binary data for energy, temperature, volume, etc, and is only used in older version of Gromacs. In new version of Gromacs this is replaced by "edr" file which contains portable binary data. See "gmx dump -h", you will find the following lines:
Options to specify output files:
-o [<.edr>] (fixed.edr)
Energy file
If you insist on using ene file, you should install an older version of Gromacs.

How can i generate the response file for my binary installable?

I have the binary file to install a component when i am running using ./filename.bin it comes into console mode and asks for language selection and directory selection and all , i tried ./filename.bin -r path/response.properties, help me if anyone knows.
as you said that you have already tried using ./filename.bin -r path/response.properties and still it does not work then , do one thing go for the console mode while creating the response file like :-
./filename.bin -i console -r path/response.properties
then install what you are installing, the response file will capture that.
And to use that later you can just include tat while running your bin file to take the input from response file.

keep gettext catalogs up to date

I have a node.js project and I am using I18next to localize it, with the gettext http://i18next.com/node/pages/doc_init.html#gettext backend.
My template engine i am using with this project is https://github.com/bminer/node-blade which is similar to jade.
Then I use the https://www.npmjs.org/package/i18next-parser library with i18next -r -o ../tmp -l en command to extract all the msgid's and create a dev.json file.
Once this is done, i use i18next-conv -l en -s ../dev.json -t dev.po to convert this to a gettext format.
From this I would create a fr.po file and then get this translated to french, as an example.
So far this process works fine, the question is, how best to keep all the msgid's should for example, I need to add new strings to the catalog and then merge these into the fr.po file without loosing any strings which have already been translated?
any advice much appreciated.

MPEG DASH:using Gpac to get MPD files

My goal is to convert some mpeg4 files in my hard disk into mpd files that will alllow me to use it in mpeg dash streaming .i read about gpac's MP4Box capability to create mpd files and i followed the instructions of the following link to successfully compile gpac for ubuntu like in the instructions in this two links
http://gpac.wp.mines-telecom.fr/2011/04/20/compiling-gpac-on-ubuntu/
http://gpac.wp.mines-telecom.fr/2012/02/01/dash-support/
But when i try to execute any command such as
MP4Box -dash 10000 -frag 1000 -rap myFile.mp4
I get the following error
Option -dash unknown. Please check usage
I wonder is there any commands or instructions that i must execute when building gpac to add the dash and if is there any other methods to get my own MPD File not those provided by itec.
Thanks in advance !!!
Try to follow the compile instruction carefully & make sure to fetch the latest version from SVN.
MP4Box should work with your commands.
looks like you are using a outdated version of MP4Box. try downloading and compiling the latest one from here (for me the same command works): http://gpac.wp.mines-telecom.fr/downloads/gpac-nightly-builds/

running py3to2 using windows 7

I've tried my best for an hour, but I just don't understand code lingo well enough to get py3to2 to work. I have a script written in Python 3 that I want to convert to 2. Downloaded and unzipped py3to2 from here:
https://bitbucket.org/amentajo/lib3to2/overview
This is all the read me says about running it:
Usage
Run "./3to2" to convert stdin ("-"), files or directories given as
arguments. By default, the tool outputs a unified diff-formatted patch on
standard output and a "what was changed" summary on standard error, but the
"-w" option can be given to write back converted files, creating
".bak"-named backup files.
If you are root, you can also install with "./setup.py build" and
"./setup.py install" ("make install" does this for you).
Do I need to run Python? Command line? I'm lost. Has anyone done this? Thanks.
Do you know how to use pip?
Just type in C:/[Enter your python folder]/Scripts/pip install 3to2
Go to the Scripts folder in the Python folder and rename 3to2 to 3to2.py
Then, type in C:/[Enter python folder again]/python.exe C:/[Enter python folder]/Scripts/3to2.py -w Path/To/The/Python/File

Resources