Skip to main content

using kdevelop to setup moses machine translation decoder

To setup ~/tl/dbgC/D0901aMoses/ver11
  1. Make sure language model SRILM is compiled in ~/tl/binC/B0901aSRILM157/ver01. Specifically we need the include and lib directories.
  2. Create a new subproject, and name it as Amoses, copy *.cpp and *.h files into the subproject, and remove LanguageModelIRSTLM.cpp. Link the include file of srilm project into this folder.
  3. Create a new subproject, and name it as AmosesCmd. Include the library from srilm, i.e. liboolm.a, libmisc.a, and libdstruct.a. Moreover, we need /usr/lib64/libz.a or -lz. In LINK LIBRARY OUTSIDE PROJECT add/edit the link to external library path and static library, e.g. -L/storage/sda9/tl09/binC/B0901aSRILM157/ver01/lib/i686-m64,-L/storage/sda9/tl09/dbgC/D0901aMoses/ver11/debug/src/Amoses/, -lmosesA, -lmisc, -loolm, -ldstruct, -lz.
  4. Set CXXFLAGS in SUBPROJECT Option using the following compiler setting: -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -DHAVE_CONFIG_H -DHAVE_SRILM

Comments

Popular posts from this blog

Web App Scaling with Flask Blueprint and Namespaces

A real-world Flask-RESTX-based API  may have multiple namespaces. The best practice for scaling a web application is to use a blueprint along with multiple namespace. The namespace is used to group a set of CRUD operations for a specific resource.  Blueprint can be used to combine (mixing) multiple namespaces. Here’s an example directory structure: project\ ├── app.py # Application file ├── apis #    ├── v20 # API directory    │   ├── __init__.py    │   ├── specs.py # API namespaces and REST methods    │   ├── steps.py # API namespaces and REST methods    └── v20bp.py # API blueprint file Here is an example app.py. Using a blue print allow you to mount your API on any url prefix. from flask import Flask from apis.v20bp import blueprint as api app = ...