robertostling / efmaral Goto Github PK
View Code? Open in Web Editor NEWEfficient Markov Chain word alignment
License: GNU General Public License v3.0
Efficient Markov Chain word alignment
License: GNU General Public License v3.0
Is efmaral supported on Windows? I can't find any relevant instructions.
This is a problem in setup.py
and is caused by Cython not having the correct path to numpy includes if numpy is in a virtual env. A solution is to add include_dirs
to every Extension which uses numpy. Working setup.py below:
from distutils.core import setup, Extension
from Cython.Build import cythonize
import numpy
gibbsmodule = Extension(
'gibbs',
sources=['gibbs.c'],
libraries=[],
include_dirs=[numpy.get_include()],
# NOTE: the -Wno.. arguments are to compensate for a bug in the build
# system
extra_compile_args=['-std=c99', '-Wall', '-fopenmp',
'-Wno-error=declaration-after-statement',
'-Wno-declaration-after-statement',
'-Wno-unused-function',
# Enable this to use simd_math_primes.h for expf/logf
# This should speed up fertility distribution sampling
# by about 20%, so overall impact is quite limited.
#'-DAPPROXIMATE_MATH',
],
extra_link_args=['-lgomp'])
cyalign_ext=Extension('cyalign',['cyalign.pyx'],include_dirs=[numpy.get_include()])
setup(
name = 'Gibbs aligner',
ext_modules = cythonize(cyalign_ext) + [gibbsmodule]
)
I added the "--output-prob" parameter, but I can't figure out how to use it. How can I get word alignment results with probability? (like "word1 word2 0.01")
"python3 align.py -i data.txt -v > test.moses --output-prob prob.txt"
I run this, but only generates the file"prob1.txt" , there is nothing in test.moses( it should be the alignment result but the content in the file is empty). And by the way, I also tried eflomal , it seems that it can only generate sentence_score, I don't know whether eflomal can also generate alignment probabilities like efmaral. Thank you for your kindness and patience.
Thanks for the very efficient and accurate aligner. I would be great to have a flag that allows a user to indicate whether he or she wants the input to be lowercased or not :) It seems like the input is always lowercased (correct me if I am wrong).
Can you please create a release so I can create a better workflow for EasyBuild.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.