diff --git a/.beautify-ignore b/.beautify-ignore new file mode 100644 index 0000000000..b7eb51a205 --- /dev/null +++ b/.beautify-ignore @@ -0,0 +1,38 @@ +# Files and directories that beautify.py should not clean up. +# +# This file is not as advanced as, say, .gitignore. It only supports files +# and directory paths relative to the project root, one per line, no globs, +# no quotes. +# +# Leading and trailing whitespace is stripped from filenames, but internal +# whitespace is preserved. +# +# Lines starting with a hash mark, such as this one, are comments. The hash +# mark must be the first character on the line. Blank lines are ignored. +# +# The .beautify-ignore file must be encoded in UTF-8. + +boost +contrib +irstlm +jam-files +lm +mingw/MosesGUI/icons_rc.py +mingw/MosesGUI/Ui_credits.py +mingw/MosesGUI/Ui_mainWindow.py +moses/TranslationModel/UG +moses/server +moses/parameters +moses/thread_safe_container.h +phrase-extract/pcfg-common +phrase-extract/syntax-common +randlm +# Filename suffixes in here are language codes, so e.g. ".pl" means +# Polish, not Perl. +scripts/share/nonbreaking_prefixes +search +srilm +util +xmlrpc-c +.git +util/ug_cache_with_timeout.h diff --git a/.gitignore b/.gitignore index b8fa569e7d..975e71dccb 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +tools +*.d *.pyc *.lo *.o @@ -19,6 +21,7 @@ lm/build_binary lm/query mert/evaluator mert/extractor +mert/hgdecode mert/mert mert/megam_i686.opt mert/pro @@ -57,7 +60,6 @@ scripts/training/phrase-extract/relax-parse scripts/training/phrase-extract/score scripts/training/phrase-extract/statistics scripts/training/symal/symal -scripts/training/train-model.perl dist bin previous.sh @@ -67,3 +69,22 @@ contrib/other-builds/*.xcodeproj/xcuserdata/ */*.xcodeproj/xcuserdata mert/sentence-bleu +mert/sentence-bleu-nbest +._* +.DS_Store +*.pbxuser +*.mode1v3 + +*.exe +build/ +nbproject/ + +mingw/MosesGUI/MosesGUI.e4p +mingw/MosesGUI/_eric4project/ + +contrib/m4m/merge-sorted +mert/hgdecode +.bash_history* +doxygen.conf +doxy +opt diff --git a/.gitmodules b/.gitmodules index a0fb859dba..90a9b30bad 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,6 +1,9 @@ [submodule "contrib/arrow-pipelines/python/pcl"] path = contrib/arrow-pipelines/python/pcl - url = git://github.com/ianj-als/pcl.git + url = https://github.com/ianj-als/pcl.git [submodule "contrib/omtc/omtc"] path = contrib/omtc/omtc - url = git://github.com/ianj-als/omtc.git + url = https://github.com/ianj-als/omtc.git +[submodule "regtest"] + path = regtest + url = https://github.com/moses-smt/moses-regression-tests diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000000..c80b60de57 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,24 @@ +sudo: false +dist: trusty +language: c +compiler: gcc +env: + matrix: +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - subversion + - automake + - libtool + - zlib1g-dev + - libbz2-dev + - liblzma-dev + - libboost-all-dev + - libgoogle-perftools-dev + - libxmlrpc-c++.*-dev + - cmake + - csh +script: +- ./bjam -j4 diff --git a/BUILD-INSTRUCTIONS.txt b/BUILD-INSTRUCTIONS.txt deleted file mode 100644 index c44c9cfc15..0000000000 --- a/BUILD-INSTRUCTIONS.txt +++ /dev/null @@ -1,143 +0,0 @@ -PRELIMINARIES - -Moses is primarily targeted at gcc on UNIX. - -Moses requires gcc, Boost >= 1.36, and zlib including the headers that some -distributions package separately (i.e. -dev or -devel packages). Source is -available at http://boost.org . - -There are several optional dependencies: - -GIZA++ from http://code.google.com/p/giza-pp/ is used to align words in the parallel corpus during training. - -Moses server requires xmlrpc-c with abyss-server. Source is available from -http://xmlrpc-c.sourceforge.net/. - -The scripts support building ARPA format language models with SRILM or IRSTLM. -To apply models inside the decoder, you can use SRILM, IRSTLM, or KenLM. The -ARPA format is exchangable so that e.g. you can build a model with SRILM and -run the decoder with IRSTLM or KenLM. - -If you want to use SRILM, you will need to download its source and build it. -The SRILM can be downloaded from -http://www.speech.sri.com/projects/srilm/download.html . -On x86_64, the default machine type is broken. Edit sbin/machine-type, find -this code - else if (`uname -m` == x86_64) then - set MACHINE_TYPE = i686 -and change it to - else if (`uname -m` == x86_64) then - set MACHINE_TYPE = i686-m64 -You may have to chmod +w sbin/machine-type first. - -If you want to use IRSTLM, you will need to download its source and build it. -The IRSTLM can be downloaded from either the SourceForge website -http://sourceforge.net/projects/irstlm -or the official IRSTLM website -http://hlt.fbk.eu/en/irstlm - -KenLM is included with Moses. - --------------------------------------------------------------------------- - -ADVICE ON INSTALLING EXTERNAL LIBRARIES - -Generally, for trouble installing external libraries, you should get support -directly from the library maker: - -Boost: http://www.boost.org/doc/libs/release/more/getting_started/unix-variants.html -IRSTLM: https://list.fbk.eu/sympa/subscribe/user-irstlm -SRILM: http://www.speech.sri.com/projects/srilm/#srilm-user - -However, here's some general advice on installing software (for bash users): - -#Determine where you want to install packages -PREFIX=$HOME/usr -#If your system has lib64 directories, lib64 should be used AND NOT lib -if [ -d /lib64 ]; then - LIBDIR=$PREFIX/lib64 -else - LIBDIR=$PREFIX/lib -fi -#If you're installing to a non-standard path, tell programs where to find things: -export PATH=$PREFIX/bin${PATH:+:$PATH} -export LD_LIBRARY_PATH=$LIBDIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} -export LIBRARY_PATH=$LIBDIR${LIBRARY_PATH:+:$LIBRARY_PATH} -export CPATH=$PREFIX/include${CPATH:+:$CPATH} - -Add all the above code to your .bashrc or .bash_login as appropriate. Then -you're ready to install packages in non-standard paths: - -#For autotools packages e.g. xmlrpc-c and zlib -./configure --prefix=$PREFIX --libdir=$LIBDIR [other options here] - -#tcmalloc is a malloc implementation with threaded performance. To see how it -#improves Moses performance, read -# http://www.mail-archive.com/moses-support@mit.edu/msg07303.html -#It is part of gperftools which can be downloaded from from -# https://code.google.com/p/gperftools/downloads/list -#configure with this: -./configure --prefix=$PREFIX --libdir=$LIBDIR --enable-shared --enable-static --enable-minimal - -#For bzip2: -wget http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz -tar xzvf bzip2-1.0.6.tar.gz -cd bzip2-1.0.6/ -#Compile and install libbz2.a (static library) -make -make install PREFIX=$PREFIX -mkdir -p $LIBDIR -#Note this may be the same file; you can ignore the error -mv $PREFIX/lib/libbz2.a $LIBDIR 2>/dev/null -#Compile and install libbz2.so (dynamic library) -make clean -make -f Makefile-libbz2_so -cp libbz2.so.* $LIBDIR -ln -sf libbz2.so.1.0 $LIBDIR/libbz2.so - -#For Boost: -./bootstrap.sh -./b2 --prefix=$PREFIX --libdir=$LIBDIR --layout=tagged link=static,shared threading=multi,single install || echo FAILURE - --------------------------------------------------------------------------- - -BUILDING - -Building consists of running - ./bjam [options] - -Common options are: ---with-srilm=/path/to/srilm to compile the decoder with SRILM support ---with-irstlm=/path/to/irstlm to compile the decoder with IRSTLM support --jN where N is the number of CPUs - ---with-macports=/path/to/macports use MacPorts on Mac OS X. - -If you leave out /path/to/macports bjam will use the /opt/local as default. -You don't have to use --with-boost with-macports as it is implicitly set. -Also note that using --with-macports automatically triggers "using darwin". - -Binaries will appear in dist/bin. - -You can clean up data from previous builds using - ./bjam --clean - -For further documentation, run - ./bjam --help - --------------------------------------------------------------------------- - -ALTERNATIVE WAYS TO BUILD ON UNIX AND OTHER PLATFORMS - -Microsoft Windows ------------------ -Moses is primarily targeted at gcc on UNIX. Windows users should -install using Cygwin. Outdated instructions can be found here: -http://ssli.ee.washington.edu/people/amittai/Moses-on-Win7.pdf . - -Binaries for all external libraries needed can be downloaded from - http://www.statmt.org/moses/?n=Moses.LibrariesUsed - -Only the decoder is developed and tested under Windows. There are -difficulties using the training scripts under Windows, even with -Cygwin, but it can be done. diff --git a/COPYING b/COPYING new file mode 100644 index 0000000000..805dbfe123 --- /dev/null +++ b/COPYING @@ -0,0 +1,460 @@ + + GNU LESSER GENERAL PUBLIC LICENSE + Version 2.1, February 1999 + + Copyright (C) 1991, 1999 Free Software Foundation, Inc. + 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the Lesser GPL. It also counts + as the successor of the GNU Library Public License, version 2, hence + the version number 2.1.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Lesser General Public License, applies to some +specially designated software packages--typically libraries--of the +Free Software Foundation and other authors who decide to use it. You +can use it too, but we suggest you first think carefully about whether +this license or the ordinary General Public License is the better +strategy to use in any particular case, based on the explanations +below. + + When we speak of free software, we are referring to freedom of use, +not price. Our General Public Licenses are designed to make sure that +you have the freedom to distribute copies of free software (and charge +for this service if you wish); that you receive source code or can get +it if you want it; that you can change the software and use pieces of +it in new free programs; and that you are informed that you can do +these things. + + To protect your rights, we need to make restrictions that forbid +distributors to deny you these rights or to ask you to surrender these +rights. These restrictions translate to certain responsibilities for +you if you distribute copies of the library or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link other code with the library, you must provide +complete object files to the recipients, so that they can relink them +with the library after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + We protect your rights with a two-step method: (1) we copyright the +library, and (2) we offer you this license, which gives you legal +permission to copy, distribute and/or modify the library. + + To protect each distributor, we want to make it very clear that +there is no warranty for the free library. Also, if the library is +modified by someone else and passed on, the recipients should know +that what they have is not the original version, so that the original +author's reputation will not be affected by problems that might be +introduced by others. + + Finally, software patents pose a constant threat to the existence of +any free program. We wish to make sure that a company cannot +effectively restrict the users of a free program by obtaining a +restrictive license from a patent holder. Therefore, we insist that +any patent license obtained for a version of the library must be +consistent with the full freedom of use specified in this license. + + Most GNU software, including some libraries, is covered by the +ordinary GNU General Public License. This license, the GNU Lesser +General Public License, applies to certain designated libraries, and +is quite different from the ordinary General Public License. We use +this license for certain libraries in order to permit linking those +libraries into non-free programs. + + When a program is linked with a library, whether statically or using +a shared library, the combination of the two is legally speaking a +combined work, a derivative of the original library. The ordinary +General Public License therefore permits such linking only if the +entire combination fits its criteria of freedom. The Lesser General +Public License permits more lax criteria for linking other code with +the library. + + We call this license the "Lesser" General Public License because it +does Less to protect the user's freedom than the ordinary General +Public License. It also provides other free software developers Less +of an advantage over competing non-free programs. These disadvantages +are the reason we use the ordinary General Public License for many +libraries. However, the Lesser license provides advantages in certain +special circumstances. + + For example, on rare occasions, there may be a special need to +encourage the widest possible use of a certain library, so that it +becomes a de-facto standard. To achieve this, non-free programs must +be allowed to use the library. A more frequent case is that a free +library does the same job as widely used non-free libraries. In this +case, there is little to gain by limiting the free library to free +software only, so we use the Lesser General Public License. + + In other cases, permission to use a particular library in non-free +programs enables a greater number of people to use a large body of +free software. For example, permission to use the GNU C Library in +non-free programs enables many more people to use the whole GNU +operating system, as well as its variant, the GNU/Linux operating +system. + + Although the Lesser General Public License is Less protective of the +users' freedom, it does ensure that the user of a program that is +linked with the Library has the freedom and the wherewithal to run +that program using a modified version of the Library. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, whereas the latter must +be combined with the library in order to run. + + GNU LESSER GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library or other +program which contains a notice placed by the copyright holder or +other authorized party saying it may be distributed under the terms of +this Lesser General Public License (also called "this License"). +Each licensee is addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control +compilation and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also combine or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Use a suitable shared library mechanism for linking with the + Library. A suitable mechanism is one that (1) uses at run time a + copy of the library already present on the user's computer system, + rather than copying library functions into the executable, and (2) + will operate properly with a modified version of the library, if + the user installs one, as long as the modified version is + interface-compatible with the version that the work was made with. + + c) Accompany the work with a written offer, valid for at least + three years, to give the same user the materials specified in + Subsection 6a, above, for a charge no more than the cost of + performing this distribution. + + d) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + e) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the materials to be distributed need not include anything that is +normally distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties with +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply, and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License +may add an explicit geographical distribution limitation excluding those +countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Lesser General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + diff --git a/Jamroot b/Jamroot index e6db1d2078..91969fb9cc 100644 --- a/Jamroot +++ b/Jamroot @@ -1,9 +1,11 @@ #BUILDING MOSES -# + #PACKAGES #Language models (optional): #--with-irstlm=/path/to/irstlm #--with-srilm=/path/to/srilm See moses/LM/Jamfile for more options. +#--with-maxent-srilm=true (requires a maxent-enabled version of SRILM to be specified via --with-srilm) +#--with-nplm=/path/to/nplm #--with-randlm=/path/to/randlm #KenLM is always compiled. # @@ -15,11 +17,15 @@ #Note that, like language models, this is the --prefix where the library was #installed, not some executable within the library. # +#--no-xmlrpc-c +# Don't use xmlrpc-c library, even if it exists. Don't build moses server +# #Compact phrase table and compact lexical reordering table #--with-cmph=/path/to/cmph # #Thread-caching malloc (if present, used for multi-threaded builds by default) -#--without-tcmalloc +#--without-tcmalloc does not compile with tcmalloc even if present +#--full-tcmalloc links against the full version (useful for memory profiling) # #REGRESSION TESTING #--with-regtest=/path/to/moses-reg-test-data @@ -48,11 +54,11 @@ # --static forces static linking (the default will fall # back to shared) # -# debug-symbols=on|off include (default) or exclude debugging +# debug-symbols=on|off include or exclude (default) debugging # information also known as -g # --notrace compiles without TRACE macros # -# --enable-boost-pool uses Boost pools for the memory SCFG table +# --enable-boost-pool uses Boost pools for the memory SCFG tabgle # # --enable-mpi switch on mpi # --without-libsegfault does not link with libSegFault @@ -61,27 +67,96 @@ # # --max-factors maximum number of factors (default 4) # +# --unlabelled-source ignore source labels (redundant in hiero or string-to-tree system) +# for better performance #CONTROLLING THE BUILD #-a to build from scratch #-j$NCPUS to compile in parallel #--clean to clean +#--debug-build to build with Og. Only available with gcc 4.8+ +import os ; import option ; import modules ; import path ; path-constant TOP : . ; + include $(TOP)/jam-files/sanity.jam ; -boost 103600 ; +home = [ os.environ "HOME" ] ; +if [ path.exists $(home)/moses-environment.jam ] +{ + # for those of use who don't like typing in command line bjam options all day long + include $(home)/moses-environment.jam ; +} +include $(TOP)/jam-files/check-environment.jam ; # get resource locations + # from environment variables +include $(TOP)/jam-files/xmlrpc-c.jam ; # xmlrpc-c stuff for the server +# include $(TOP)/jam-files/curlpp.jam ; # curlpp stuff for bias lookup (MMT only) + +# exit "done" : 0 ; + +max-order = [ option.get "max-kenlm-order" : 6 : 6 ] ; +if ! [ option.get "max-kenlm-order" ] +{ + # some classes in Moses pull in header files from KenLM, so this needs to be + # defined here, not in moses/lm/Jamfile + option.set "max-kenlm-order" : 6 ; + requirements += KENLM_MAX_ORDER=$(max-order) ; +} +# exit "all done" : 0 ; + +boost 104400 ; external-lib z ; +#lib dl : : static:static shared:shared ; +#requirements += dl ; +requirements += -std=c++0x ; + +# Allow moses to report the git commit hash of the version used for compilation +moses_githash = [ _shell "git describe --dirty" ] ; +requirements += MOSES_VERSION_ID=\\\"$(moses_githash)\\\" ; + if ! [ option.get "without-tcmalloc" : : "yes" ] && [ test_library "tcmalloc_minimal" ] { - external-lib tcmalloc_minimal ; - requirements += multi:tcmalloc_minimal ; + if [ option.get "full-tcmalloc" : : "yes" ] { + external-lib unwind ; + external-lib tcmalloc_and_profiler : : unwind ; + requirements += tcmalloc_and_profiler unwind -fno-omit-frame-pointer -fno-omit-frame-pointer ; + } else { + external-lib tcmalloc_minimal ; + requirements += multi:tcmalloc_minimal ; + } } else { echo "Tip: install tcmalloc for faster threading. See BUILD-INSTRUCTIONS.txt for more information." ; } +if [ option.get "filter-warnings" : : "yes" ] { + # given the low coding standards in Moses, we may want to filter out + # warnings about poor coding practice that no-one is ever going to fix + # anyway ... + requirements += -Wno-deprecated ; + requirements += -Wno-reorder ; + requirements += -Wno-sign-compare ; + requirements += -Wno-unused-but-set-variable ; + requirements += -Wno-unused-result ; + requirements += -Wno-unused-variable ; + requirements += -Wno-comment ; + requirements += -Wno-strict-aliasing ; + requirements += -Wno-overloaded-virtual ; +} + +if [ option.get "debug-build" : : "yes" ] { + requirements += -Og ; + echo "Building with -Og to enable easier profiling and debugging. Only available on gcc 4.8+." ; +} + +if [ option.get "with-address-sanitizer" : : "yes" ] { + requirements += -fsanitize=address ; + requirements += -fno-omit-frame-pointer ; + requirements += -fsanitize=address ; + echo "Building with AddressSanitizer to enable debugging of memory errors. Only available on gcc 4.8+." ; +} + if [ option.get "enable-mpi" : : "yes" ] { import mpi ; using mpi ; @@ -93,17 +168,55 @@ if [ option.get "enable-mpi" : : "yes" ] { requirements += boost_serialization ; } +mmt = [ option.get "mmt" ] ; +if $(mmt) { + requirements += MMT ; + requirements += $(mmt) ; + mmt_githash = [ _shell "cd $(mmt) && git describe --dirty" ] ; + requirements += MMT_VERSION_ID=\\\"$(mmt_githash)\\\" ; +} + requirements += [ option.get "notrace" : TRACE_ENABLE=1 ] ; requirements += [ option.get "enable-boost-pool" : : USE_BOOST_POOL ] ; +requirements += [ option.get "with-mm" : : PT_UG ] ; +requirements += [ option.get "with-mm" : : MAX_NUM_FACTORS=4 ] ; +requirements += [ option.get "unlabelled-source" : : UNLABELLED_SOURCE ] ; + +if [ option.get "with-oxlm" ] { + external-lib gomp ; + requirements += boost_serialization ; + requirements += gomp ; +} -if [ option.get "with-cmph" ] { +if [ option.get "with-cmph" : : "yes" ] { requirements += HAVE_CMPH ; } +if [ option.get "with-icu" : : "yes" ] +{ + external-lib icuuc ; + external-lib icuio ; + external-lib icui18n ; + requirements += icuuc/shared ; + requirements += icuio/shared ; + requirements += icui18n/shared ; + requirements += -fPIC ; + requirements += 64 ; +# requirements += shared ; +} + +# for probing pt +external-lib boost_serialization ; +requirements += boost_serialization/static ; + +if [ option.get "with-vw" ] { + requirements += HAVE_VW ; +} + project : default-build multi on - on + off release static ; @@ -115,18 +228,101 @@ requirements += MACOSX:iconv ; project : requirements multi:WITH_THREADS multi:boost_thread + boost_system + boost_program_options _FILE_OFFSET_BITS=64 _LARGE_FILES $(requirements) . ; + #Add directories here if you want their incidental targets too (i.e. tests). -build-projects lm util phrase-extract search moses moses/LM mert moses-cmd moses-chart-cmd mira scripts regression-testing ; +build-projects lm util phrase-extract phrase-extract/syntax-common search moses moses/LM mert moses-cmd scripts regression-testing ; +# contrib/mira + +if [ option.get "with-mm-extras" : : "yes" ] +{ + alias mm-extras : + moses/TranslationModel/UG//bitext-find + moses/TranslationModel/UG//ptable-describe-features + moses/TranslationModel/UG//count-ptable-features + moses/TranslationModel/UG//ptable-sigtest-filter + moses/TranslationModel/UG//ptable-lookup + moses/TranslationModel/UG//ptable-lookup-corpus + moses/TranslationModel/UG//check-coverage + moses/TranslationModel/UG/mm//mtt-demo1 + moses/TranslationModel/UG/mm//mtt-dump + moses/TranslationModel/UG/mm//mam2symal + moses/TranslationModel/UG/mm//mam_verify + moses/TranslationModel/UG/mm//mmlex-lookup + moses/TranslationModel/UG/mm//mtt-count-words + moses/TranslationModel/UG/mm//calc-coverage + moses/TranslationModel/UG//try-align + ; +} +else +{ + alias mm-extras ; +} + +if [ option.get "with-mm" : : "yes" ] +{ + alias mm : + moses/TranslationModel/UG/mm//mtt-build + moses/TranslationModel/UG/mm//symal2mam + moses/TranslationModel/UG/mm//mmlex-build + ; +} +else +{ + alias mm ; +} + +if [ option.get "with-rephraser" : : "yes" ] +{ + alias rephraser : + contrib/rephraser//paraphrase + ; +} +else +{ + alias rephraser ; +} + +alias programs : +lm//programs +moses-cmd//programs +OnDiskPt//CreateOnDiskPt +OnDiskPt//queryOnDiskPt +mert//programs +misc//programs +symal +phrase-extract +phrase-extract//lexical-reordering +phrase-extract//extract-ghkm +phrase-extract//pcfg-extract +phrase-extract//pcfg-score +phrase-extract//extract-mixed-syntax +phrase-extract//score-stsg +phrase-extract//filter-rule-table +phrase-extract//postprocess-egret-forests +biconcor +# contrib/mira//mira +contrib/server//mosesserver +mm +mm-extras +rephraser +contrib/c++tokenizer//tokenizer +contrib/expected-bleu-training//train-expected-bleu +contrib/expected-bleu-training//prepare-expected-bleu-training + +probingpt//programs +moses2//programs +; -alias programs : lm//programs moses-chart-cmd//moses_chart moses-cmd//programs OnDiskPt//CreateOnDiskPt OnDiskPt//queryOnDiskPt mert//programs misc//programs symal phrase-extract phrase-extract//lexical-reordering phrase-extract//extract-ghkm phrase-extract//pcfg-extract phrase-extract//pcfg-score biconcor mira//mira contrib/server//mosesserver ; install-bin-libs programs ; -install-headers headers-base : [ path.glob-tree biconcor contrib lm mert misc moses-chart-cmd moses-cmd OnDiskPt phrase-extract symal util : *.hh *.h ] : . ; +install-headers headers-base : [ path.glob-tree biconcor contrib lm mert misc moses-cmd OnDiskPt phrase-extract symal util : *.hh *.h ] : . ; install-headers headers-moses : moses//headers-to-install : moses ; alias install : prefix-bin prefix-lib headers-base headers-moses ; @@ -140,3 +336,10 @@ if [ path.exists $(TOP)/dist ] && $(prefix) != dist { echo "To disable this message, delete $(TOP)/dist ." ; echo ; } + +#local temp = [ _shell "bash source ./s.sh" ] ; +local temp = [ _shell "mkdir -p $(PREFIX)/bin" ] ; +local temp = [ _shell "rm -f $(PREFIX)/bin/moses_chart" ] ; +local temp = [ _shell "cd $(PREFIX)/bin && ln -sf moses moses_chart" ] ; +local temp = [ _shell "cd $(PREFIX)/bin && ln -sf CreateProbingPT CreateProbingPT2" ] ; + diff --git a/NOTICE b/NOTICE deleted file mode 100644 index 23d8b2ad14..0000000000 --- a/NOTICE +++ /dev/null @@ -1,5 +0,0 @@ -This code includes data from Daniel Naber's Language Tools (czech abbreviations). - -This code includes data from czech wiktionary (also czech abbreviations). - - diff --git a/OnDiskPt/Jamfile b/OnDiskPt/Jamfile index 473f14cfe4..0c25d62750 100644 --- a/OnDiskPt/Jamfile +++ b/OnDiskPt/Jamfile @@ -1,5 +1,5 @@ fakelib OnDiskPt : OnDiskWrapper.cpp SourcePhrase.cpp TargetPhrase.cpp Word.cpp Phrase.cpp PhraseNode.cpp TargetPhraseCollection.cpp Vocab.cpp OnDiskQuery.cpp ../moses//headers ; -exe CreateOnDiskPt : Main.cpp ../moses//moses OnDiskPt ; -exe queryOnDiskPt : queryOnDiskPt.cpp ../moses//moses OnDiskPt ; +exe CreateOnDiskPt : Main.cpp ..//boost_filesystem ../moses//moses OnDiskPt ; +exe queryOnDiskPt : queryOnDiskPt.cpp ..//boost_filesystem ../moses//moses OnDiskPt ; diff --git a/OnDiskPt/Main.cpp b/OnDiskPt/Main.cpp index c3cda2a752..e9b7dcbd24 100644 --- a/OnDiskPt/Main.cpp +++ b/OnDiskPt/Main.cpp @@ -25,8 +25,8 @@ #include #include #include "moses/InputFileStream.h" +#include "moses/Timer.h" #include "moses/Util.h" -#include "moses/UserMessage.h" #include "OnDiskWrapper.h" #include "SourcePhrase.h" #include "TargetPhrase.h" @@ -62,15 +62,13 @@ int main (int argc, char * const argv[]) Moses::InputFileStream inStream(filePath); OnDiskWrapper onDiskWrapper; - bool retDb = onDiskWrapper.BeginSave(destPath, numSourceFactors, numTargetFactors, numScores); - assert(retDb); + onDiskWrapper.BeginSave(destPath, numSourceFactors, numTargetFactors, numScores); PhraseNode &rootNode = onDiskWrapper.GetRootSourceNode(); size_t lineNum = 0; - char line[100000]; + string line; - //while(getline(inStream, line)) - while(inStream.getline(line, 100000)) { + while(getline(inStream, line)) { lineNum++; if (lineNum%1000 == 0) cerr << "." << flush; if (lineNum%10000 == 0) cerr << ":" << flush; @@ -108,8 +106,13 @@ bool Flush(const OnDiskPt::SourcePhrase *prevSourcePhrase, const OnDiskPt::Sourc return ret; } -OnDiskPt::PhrasePtr Tokenize(SourcePhrase &sourcePhrase, TargetPhrase &targetPhrase, char *line, OnDiskWrapper &onDiskWrapper, int numScores, vector &misc) +OnDiskPt::PhrasePtr Tokenize(SourcePhrase &sourcePhrase, TargetPhrase &targetPhrase, const std::string &lineStr, OnDiskWrapper &onDiskWrapper, int numScores, vector &misc) { + char line[lineStr.size() + 1]; + strcpy(line, lineStr.c_str()); + + stringstream sparseFeatures, property; + size_t scoreInd = 0; // MAIN LOOP @@ -119,6 +122,7 @@ OnDiskPt::PhrasePtr Tokenize(SourcePhrase &sourcePhrase, TargetPhrase &targetPhr 2 = scores 3 = align 4 = count + 7 = properties */ char *tok = strtok (line," "); OnDiskPt::PhrasePtr out(new Phrase()); @@ -128,14 +132,14 @@ OnDiskPt::PhrasePtr Tokenize(SourcePhrase &sourcePhrase, TargetPhrase &targetPhr } else { switch (stage) { case 0: { - WordPtr w = Tokenize(sourcePhrase, tok, true, true, onDiskWrapper); + WordPtr w = Tokenize(sourcePhrase, tok, true, true, onDiskWrapper, 1); if (w != NULL) out->AddWord(w); break; } case 1: { - Tokenize(targetPhrase, tok, false, true, onDiskWrapper); + Tokenize(targetPhrase, tok, false, true, onDiskWrapper, 0); break; } case 2: { @@ -149,28 +153,19 @@ OnDiskPt::PhrasePtr Tokenize(SourcePhrase &sourcePhrase, TargetPhrase &targetPhr targetPhrase.CreateAlignFromString(tok); break; } - case 4: - ++stage; + case 4: { + // store only the 3rd one (rule count) + float val = Moses::Scan(tok); + misc[0] = val; break; - /* case 5: { - // count info. Only store the 2nd one - float val = Moses::Scan(tok); - misc[0] = val; - ++stage; - break; - }*/ + } case 5: { - // count info. Only store the 2nd one - //float val = Moses::Scan(tok); - //misc[0] = val; - ++stage; + // sparse features + sparseFeatures << tok << " "; break; } case 6: { - // store only the 3rd one (rule count) - float val = Moses::Scan(tok); - misc[0] = val; - ++stage; + property << tok << " "; break; } default: @@ -184,14 +179,17 @@ OnDiskPt::PhrasePtr Tokenize(SourcePhrase &sourcePhrase, TargetPhrase &targetPhr } // while (tok != NULL) assert(scoreInd == numScores); + targetPhrase.SetSparseFeatures(Moses::Trim(sparseFeatures.str())); + targetPhrase.SetProperty(Moses::Trim(property.str())); targetPhrase.SortAlign(); return out; } // Tokenize() OnDiskPt::WordPtr Tokenize(OnDiskPt::Phrase &phrase , const std::string &token, bool addSourceNonTerm, bool addTargetNonTerm - , OnDiskPt::OnDiskWrapper &onDiskWrapper) + , OnDiskPt::OnDiskWrapper &onDiskWrapper, int retSourceTarget) { + // retSourceTarget: 0 = don't return anything. 1 = source, 2 = target bool nonTerm = false; size_t tokSize = token.size(); @@ -219,6 +217,10 @@ OnDiskPt::WordPtr Tokenize(OnDiskPt::Phrase &phrase WordPtr word(new Word()); word->CreateFromString(wordStr, onDiskWrapper.GetVocab()); phrase.AddWord(word); + + if (retSourceTarget == 1) { + out = word; + } } wordStr = token.substr(splitPos, tokSize - splitPos); @@ -226,7 +228,10 @@ OnDiskPt::WordPtr Tokenize(OnDiskPt::Phrase &phrase WordPtr word(new Word()); word->CreateFromString(wordStr, onDiskWrapper.GetVocab()); phrase.AddWord(word); - out = word; + + if (retSourceTarget == 2) { + out = word; + } } } diff --git a/OnDiskPt/Main.h b/OnDiskPt/Main.h index 5c7efa43c7..fcdb2cd9d3 100644 --- a/OnDiskPt/Main.h +++ b/OnDiskPt/Main.h @@ -27,9 +27,9 @@ typedef std::vector AlignType; OnDiskPt::WordPtr Tokenize(OnDiskPt::Phrase &phrase , const std::string &token, bool addSourceNonTerm, bool addTargetNonTerm - , OnDiskPt::OnDiskWrapper &onDiskWrapper); + , OnDiskPt::OnDiskWrapper &onDiskWrapper, int retSourceTarget); OnDiskPt::PhrasePtr Tokenize(OnDiskPt::SourcePhrase &sourcePhrase, OnDiskPt::TargetPhrase &targetPhrase - , char *line, OnDiskPt::OnDiskWrapper &onDiskWrapper + , const std::string &lineStr, OnDiskPt::OnDiskWrapper &onDiskWrapper , int numScores , std::vector &misc); diff --git a/OnDiskPt/OnDiskWrapper.cpp b/OnDiskPt/OnDiskWrapper.cpp index 8f90862bee..c132d2c4a7 100644 --- a/OnDiskPt/OnDiskWrapper.cpp +++ b/OnDiskPt/OnDiskWrapper.cpp @@ -21,16 +21,18 @@ #include #endif #include -#include "util/check.hh" #include #include "OnDiskWrapper.h" +#include "moses/Util.h" +#include "util/exception.hh" +#include "util/string_stream.hh" using namespace std; namespace OnDiskPt { -int OnDiskWrapper::VERSION_NUM = 5; +int OnDiskWrapper::VERSION_NUM = 7; OnDiskWrapper::OnDiskWrapper() { @@ -41,36 +43,45 @@ OnDiskWrapper::~OnDiskWrapper() delete m_rootSourceNode; } -bool OnDiskWrapper::BeginLoad(const std::string &filePath) +void OnDiskWrapper::BeginLoad(const std::string &filePath) { - if (!OpenForLoad(filePath)) - return false; + if (!OpenForLoad(filePath)) { + UTIL_THROW(util::FileOpenException, "Couldn't open for loading: " << filePath); + } if (!m_vocab.Load(*this)) - return false; + UTIL_THROW(util::FileOpenException, "Couldn't load vocab"); - UINT64 rootFilePos = GetMisc("RootNodeOffset"); + uint64_t rootFilePos = GetMisc("RootNodeOffset"); m_rootSourceNode = new PhraseNode(rootFilePos, *this); - - return true; } bool OnDiskWrapper::OpenForLoad(const std::string &filePath) { m_fileSource.open((filePath + "/Source.dat").c_str(), ios::in | ios::binary); - CHECK(m_fileSource.is_open()); + UTIL_THROW_IF(!m_fileSource.is_open(), + util::FileOpenException, + "Couldn't open file " << filePath << "/Source.dat"); m_fileTargetInd.open((filePath + "/TargetInd.dat").c_str(), ios::in | ios::binary); - CHECK(m_fileTargetInd.is_open()); + UTIL_THROW_IF(!m_fileTargetInd.is_open(), + util::FileOpenException, + "Couldn't open file " << filePath << "/TargetInd.dat"); m_fileTargetColl.open((filePath + "/TargetColl.dat").c_str(), ios::in | ios::binary); - CHECK(m_fileTargetColl.is_open()); + UTIL_THROW_IF(!m_fileTargetColl.is_open(), + util::FileOpenException, + "Couldn't open file " << filePath << "/TargetColl.dat"); m_fileVocab.open((filePath + "/Vocab.dat").c_str(), ios::in); - CHECK(m_fileVocab.is_open()); + UTIL_THROW_IF(!m_fileVocab.is_open(), + util::FileOpenException, + "Couldn't open file " << filePath << "/Vocab.dat"); m_fileMisc.open((filePath + "/Misc.dat").c_str(), ios::in); - CHECK(m_fileMisc.is_open()); + UTIL_THROW_IF(!m_fileMisc.is_open(), + util::FileOpenException, + "Couldn't open file " << filePath << "/Misc.dat"); // set up root node LoadMisc(); @@ -88,15 +99,17 @@ bool OnDiskWrapper::LoadMisc() while(m_fileMisc.getline(line, 100000)) { vector tokens; Moses::Tokenize(tokens, line); - CHECK(tokens.size() == 2); + UTIL_THROW_IF2(tokens.size() != 2, "Except key value. Found " << line); + + const string &key = tokens[0]; - m_miscInfo[key] = Moses::Scan(tokens[1]); + m_miscInfo[key] = Moses::Scan(tokens[1]); } return true; } -bool OnDiskWrapper::BeginSave(const std::string &filePath +void OnDiskWrapper::BeginSave(const std::string &filePath , int numSourceFactors, int numTargetFactors, int numScores) { m_numSourceFactors = numSourceFactors; @@ -111,45 +124,58 @@ bool OnDiskWrapper::BeginSave(const std::string &filePath #endif m_fileSource.open((filePath + "/Source.dat").c_str(), ios::out | ios::in | ios::binary | ios::ate | ios::trunc); - CHECK(m_fileSource.is_open()); + UTIL_THROW_IF(!m_fileSource.is_open(), + util::FileOpenException, + "Couldn't open file " << filePath << "/Source.dat"); m_fileTargetInd.open((filePath + "/TargetInd.dat").c_str(), ios::out | ios::binary | ios::ate | ios::trunc); - CHECK(m_fileTargetInd.is_open()); + UTIL_THROW_IF(!m_fileTargetInd.is_open(), + util::FileOpenException, + "Couldn't open file " << filePath << "/TargetInd.dat"); m_fileTargetColl.open((filePath + "/TargetColl.dat").c_str(), ios::out | ios::binary | ios::ate | ios::trunc); - CHECK(m_fileTargetColl.is_open()); + UTIL_THROW_IF(!m_fileTargetColl.is_open(), + util::FileOpenException, + "Couldn't open file " << filePath << "/TargetColl.dat"); m_fileVocab.open((filePath + "/Vocab.dat").c_str(), ios::out | ios::ate | ios::trunc); - CHECK(m_fileVocab.is_open()); + UTIL_THROW_IF(!m_fileVocab.is_open(), + util::FileOpenException, + "Couldn't open file " << filePath << "/Vocab.dat"); m_fileMisc.open((filePath + "/Misc.dat").c_str(), ios::out | ios::ate | ios::trunc); - CHECK(m_fileMisc.is_open()); + UTIL_THROW_IF(!m_fileMisc.is_open(), + util::FileOpenException, + "Couldn't open file " << filePath << "/Misc.dat"); // offset by 1. 0 offset is reserved char c = 0xff; m_fileSource.write(&c, 1); - CHECK(1 == m_fileSource.tellp()); + UTIL_THROW_IF2(1 != m_fileSource.tellp(), + "Couldn't write to stream m_fileSource"); m_fileTargetInd.write(&c, 1); - CHECK(1 == m_fileTargetInd.tellp()); + UTIL_THROW_IF2(1 != m_fileTargetInd.tellp(), + "Couldn't write to stream m_fileTargetInd"); m_fileTargetColl.write(&c, 1); - CHECK(1 == m_fileTargetColl.tellp()); + UTIL_THROW_IF2(1 != m_fileTargetColl.tellp(), + "Couldn't write to stream m_fileTargetColl"); // set up root node - CHECK(GetNumCounts() == 1); + UTIL_THROW_IF2(GetNumCounts() != 1, + "Not sure what this is..."); + vector counts(GetNumCounts()); counts[0] = DEFAULT_COUNT; m_rootSourceNode = new PhraseNode(); m_rootSourceNode->AddCounts(counts); - - return true; } void OnDiskWrapper::EndSave() { bool ret = m_rootSourceNode->Saved(); - CHECK(ret); + UTIL_THROW_IF2(!ret, "Root node not saved"); GetVocab().Save(*this); @@ -174,63 +200,24 @@ void OnDiskWrapper::SaveMisc() size_t OnDiskWrapper::GetSourceWordSize() const { - return sizeof(UINT64) + sizeof(char); + return sizeof(uint64_t) + sizeof(char); } size_t OnDiskWrapper::GetTargetWordSize() const { - return sizeof(UINT64) + sizeof(char); + return sizeof(uint64_t) + sizeof(char); } -UINT64 OnDiskWrapper::GetMisc(const std::string &key) const +uint64_t OnDiskWrapper::GetMisc(const std::string &key) const { - std::map::const_iterator iter; + std::map::const_iterator iter; iter = m_miscInfo.find(key); - CHECK(iter != m_miscInfo.end()); + UTIL_THROW_IF2(iter == m_miscInfo.end() + , "Couldn't find value for key " << key + ); return iter->second; } -PhraseNode &OnDiskWrapper::GetRootSourceNode() -{ - return *m_rootSourceNode; -} - -Word *OnDiskWrapper::ConvertFromMoses(Moses::FactorDirection /* direction */ - , const std::vector &factorsVec - , const Moses::Word &origWord) const -{ - bool isNonTerminal = origWord.IsNonTerminal(); - Word *newWord = new Word(isNonTerminal); - stringstream strme; - - size_t factorType = factorsVec[0]; - const Moses::Factor *factor = origWord.GetFactor(factorType); - CHECK(factor); - strme << factor->GetString(); - - for (size_t ind = 1 ; ind < factorsVec.size() ; ++ind) { - size_t factorType = factorsVec[ind]; - const Moses::Factor *factor = origWord.GetFactor(factorType); - if (factor == NULL) { - // can have less factors than factorType.size() - break; - } - CHECK(factor); - strme << "|" << factor->GetString(); - } // for (size_t factorType - - bool found; - UINT64 vocabId = m_vocab.GetVocabId(strme.str(), found); - if (!found) { - // factor not in phrase table -> phrse definately not in. exit - delete newWord; - return NULL; - } else { - newWord->SetVocabId(vocabId); - return newWord; - } -} - } diff --git a/OnDiskPt/OnDiskWrapper.h b/OnDiskPt/OnDiskWrapper.h index 8b786d3466..445357fe20 100644 --- a/OnDiskPt/OnDiskWrapper.h +++ b/OnDiskPt/OnDiskWrapper.h @@ -22,7 +22,6 @@ #include #include "Vocab.h" #include "PhraseNode.h" -#include "../moses/Word.h" namespace OnDiskPt { @@ -43,7 +42,7 @@ class OnDiskWrapper size_t m_defaultNodeSize; PhraseNode *m_rootSourceNode; - std::map m_miscInfo; + std::map m_miscInfo; void SaveMisc(); bool OpenForLoad(const std::string &filePath); @@ -55,15 +54,18 @@ class OnDiskWrapper OnDiskWrapper(); ~OnDiskWrapper(); - bool BeginLoad(const std::string &filePath); + void BeginLoad(const std::string &filePath); - bool BeginSave(const std::string &filePath + void BeginSave(const std::string &filePath , int numSourceFactors, int numTargetFactors, int numScores); void EndSave(); Vocab &GetVocab() { return m_vocab; } + const Vocab &GetVocab() const { + return m_vocab; + } size_t GetSourceWordSize() const; size_t GetTargetWordSize() const; @@ -95,13 +97,14 @@ class OnDiskWrapper return 1; } - PhraseNode &GetRootSourceNode(); - - UINT64 GetMisc(const std::string &key) const; + PhraseNode &GetRootSourceNode() { + return *m_rootSourceNode; + } + const PhraseNode &GetRootSourceNode() const { + return *m_rootSourceNode; + } - Word *ConvertFromMoses(Moses::FactorDirection direction - , const std::vector &factorsVec - , const Moses::Word &origWord) const; + uint64_t GetMisc(const std::string &key) const; }; diff --git a/OnDiskPt/Phrase.cpp b/OnDiskPt/Phrase.cpp index 32bc9b169f..c1933338b8 100644 --- a/OnDiskPt/Phrase.cpp +++ b/OnDiskPt/Phrase.cpp @@ -18,9 +18,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ #include -#include "util/check.hh" #include "moses/Util.h" #include "Phrase.h" +#include "util/exception.hh" using namespace std; @@ -35,7 +35,8 @@ void Phrase::AddWord(WordPtr word) void Phrase::AddWord(WordPtr word, size_t pos) { - CHECK(pos < m_words.size()); + UTIL_THROW_IF2(!(pos < m_words.size()), + "Trying to get word " << pos << " when phrase size is " << m_words.size()); m_words.insert(m_words.begin() + pos + 1, word); } @@ -59,7 +60,7 @@ int Phrase::Compare(const Phrase &compare) const } if (ret == 0) { - CHECK(compare.GetSize() >= GetSize()); + assert(compare.GetSize() >= GetSize()); ret = (compare.GetSize() > GetSize()) ? 1 : 0; } return ret; diff --git a/OnDiskPt/PhraseNode.cpp b/OnDiskPt/PhraseNode.cpp index c259aa0771..b77e8d8075 100644 --- a/OnDiskPt/PhraseNode.cpp +++ b/OnDiskPt/PhraseNode.cpp @@ -17,12 +17,12 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include "util/check.hh" #include "PhraseNode.h" #include "OnDiskWrapper.h" #include "TargetPhraseCollection.h" #include "SourcePhrase.h" #include "moses/Util.h" +#include "util/exception.hh" using namespace std; @@ -31,8 +31,8 @@ namespace OnDiskPt size_t PhraseNode::GetNodeSize(size_t numChildren, size_t wordSize, size_t countSize) { - size_t ret = sizeof(UINT64) * 2 // num children, value - + (wordSize + sizeof(UINT64)) * numChildren // word + ptr to next source node + size_t ret = sizeof(uint64_t) * 2 // num children, value + + (wordSize + sizeof(uint64_t)) * numChildren // word + ptr to next source node + sizeof(float) * countSize; // count info return ret; } @@ -45,7 +45,7 @@ PhraseNode::PhraseNode() { } -PhraseNode::PhraseNode(UINT64 filePos, OnDiskWrapper &onDiskWrapper) +PhraseNode::PhraseNode(uint64_t filePos, OnDiskWrapper &onDiskWrapper) :m_counts(onDiskWrapper.GetNumCounts()) { // load saved node @@ -55,28 +55,28 @@ PhraseNode::PhraseNode(UINT64 filePos, OnDiskWrapper &onDiskWrapper) std::fstream &file = onDiskWrapper.GetFileSource(); file.seekg(filePos); - CHECK(filePos == (UINT64)file.tellg()); + assert(filePos == (uint64_t)file.tellg()); - file.read((char*) &m_numChildrenLoad, sizeof(UINT64)); + file.read((char*) &m_numChildrenLoad, sizeof(uint64_t)); size_t memAlloc = GetNodeSize(m_numChildrenLoad, onDiskWrapper.GetSourceWordSize(), countSize); m_memLoad = (char*) malloc(memAlloc); // go to start of node again file.seekg(filePos); - CHECK(filePos == (UINT64)file.tellg()); + assert(filePos == (uint64_t)file.tellg()); // read everything into memory file.read(m_memLoad, memAlloc); - CHECK(filePos + memAlloc == (UINT64)file.tellg()); + assert(filePos + memAlloc == (uint64_t)file.tellg()); // get value - m_value = ((UINT64*)m_memLoad)[1]; + m_value = ((uint64_t*)m_memLoad)[1]; // get counts - float *memFloat = (float*) (m_memLoad + sizeof(UINT64) * 2); + float *memFloat = (float*) (m_memLoad + sizeof(uint64_t) * 2); - CHECK(countSize == 1); + assert(countSize == 1); m_counts[0] = memFloat[0]; m_memLoadLast = m_memLoad + memAlloc; @@ -85,7 +85,6 @@ PhraseNode::PhraseNode(UINT64 filePos, OnDiskWrapper &onDiskWrapper) PhraseNode::~PhraseNode() { free(m_memLoad); - //CHECK(m_saved); } float PhraseNode::GetCount(size_t ind) const @@ -95,7 +94,7 @@ float PhraseNode::GetCount(size_t ind) const void PhraseNode::Save(OnDiskWrapper &onDiskWrapper, size_t pos, size_t tableLimit) { - CHECK(!m_saved); + UTIL_THROW_IF2(m_saved, "Already saved"); // save this node m_targetPhraseColl.Sort(tableLimit); @@ -109,14 +108,14 @@ void PhraseNode::Save(OnDiskWrapper &onDiskWrapper, size_t pos, size_t tableLimi //memset(mem, 0xfe, memAlloc); size_t memUsed = 0; - UINT64 *memArray = (UINT64*) mem; + uint64_t *memArray = (uint64_t*) mem; memArray[0] = GetSize(); // num of children memArray[1] = m_value; // file pos of corresponding target phrases - memUsed += 2 * sizeof(UINT64); + memUsed += 2 * sizeof(uint64_t); // count info float *memFloat = (float*) (mem + memUsed); - CHECK(numCounts == 1); + UTIL_THROW_IF2(numCounts != 1, "Can only store 1 phrase count"); memFloat[0] = (m_counts.size() == 0) ? DEFAULT_COUNT : m_counts[0]; // if count = 0, put in very large num to make sure its still used. HACK memUsed += sizeof(float) * numCounts; @@ -134,23 +133,23 @@ void PhraseNode::Save(OnDiskWrapper &onDiskWrapper, size_t pos, size_t tableLimi size_t wordMemUsed = childWord.WriteToMemory(currMem); memUsed += wordMemUsed; - UINT64 *memArray = (UINT64*) (mem + memUsed); + uint64_t *memArray = (uint64_t*) (mem + memUsed); memArray[0] = childNode.GetFilePos(); - memUsed += sizeof(UINT64); + memUsed += sizeof(uint64_t); } // save this node //Moses::DebugMem(mem, memAlloc); - CHECK(memUsed == memAlloc); + assert(memUsed == memAlloc); std::fstream &file = onDiskWrapper.GetFileSource(); m_filePos = file.tellp(); file.seekp(0, ios::end); file.write(mem, memUsed); - UINT64 endPos = file.tellp(); - CHECK(m_filePos + memUsed == endPos); + uint64_t endPos = file.tellp(); + assert(m_filePos + memUsed == endPos); free(mem); @@ -207,7 +206,7 @@ const PhraseNode *PhraseNode::GetChild(const Word &wordSought, OnDiskWrapper &on x = (l + r) / 2; Word wordFound; - UINT64 childFilePos; + uint64_t childFilePos; GetChild(wordFound, childFilePos, x, onDiskWrapper); if (wordSought == wordFound) { @@ -223,43 +222,39 @@ const PhraseNode *PhraseNode::GetChild(const Word &wordSought, OnDiskWrapper &on return ret; } -void PhraseNode::GetChild(Word &wordFound, UINT64 &childFilePos, size_t ind, OnDiskWrapper &onDiskWrapper) const +void PhraseNode::GetChild(Word &wordFound, uint64_t &childFilePos, size_t ind, OnDiskWrapper &onDiskWrapper) const { size_t wordSize = onDiskWrapper.GetSourceWordSize(); - size_t childSize = wordSize + sizeof(UINT64); + size_t childSize = wordSize + sizeof(uint64_t); char *currMem = m_memLoad - + sizeof(UINT64) * 2 // size & file pos of target phrase coll + + sizeof(uint64_t) * 2 // size & file pos of target phrase coll + sizeof(float) * onDiskWrapper.GetNumCounts() // count info + childSize * ind; size_t memRead = ReadChild(wordFound, childFilePos, currMem); - CHECK(memRead == childSize); + assert(memRead == childSize); } -size_t PhraseNode::ReadChild(Word &wordFound, UINT64 &childFilePos, const char *mem) const +size_t PhraseNode::ReadChild(Word &wordFound, uint64_t &childFilePos, const char *mem) const { size_t memRead = wordFound.ReadFromMemory(mem); const char *currMem = mem + memRead; - UINT64 *memArray = (UINT64*) (currMem); + uint64_t *memArray = (uint64_t*) (currMem); childFilePos = memArray[0]; - memRead += sizeof(UINT64); + memRead += sizeof(uint64_t); return memRead; } -const TargetPhraseCollection *PhraseNode::GetTargetPhraseCollection(size_t tableLimit, OnDiskWrapper &onDiskWrapper) const +TargetPhraseCollection::shared_ptr +PhraseNode:: +GetTargetPhraseCollection(size_t tableLimit, OnDiskWrapper &onDiskWrapper) const { - TargetPhraseCollection *ret = new TargetPhraseCollection(); - - if (m_value > 0) - ret->ReadFromFile(tableLimit, m_value, onDiskWrapper); - else { - - } - + TargetPhraseCollection::shared_ptr ret(new TargetPhraseCollection); + if (m_value > 0) ret->ReadFromFile(tableLimit, m_value, onDiskWrapper); return ret; } diff --git a/OnDiskPt/PhraseNode.h b/OnDiskPt/PhraseNode.h index 6b629a401e..1e3611d744 100644 --- a/OnDiskPt/PhraseNode.h +++ b/OnDiskPt/PhraseNode.h @@ -36,7 +36,7 @@ class PhraseNode { friend std::ostream& operator<<(std::ostream&, const PhraseNode&); protected: - UINT64 m_filePos, m_value; + uint64_t m_filePos, m_value; typedef std::map ChildColl; ChildColl m_children; @@ -48,35 +48,35 @@ class PhraseNode TargetPhraseCollection m_targetPhraseColl; char *m_memLoad, *m_memLoadLast; - UINT64 m_numChildrenLoad; + uint64_t m_numChildrenLoad; void AddTargetPhrase(size_t pos, const SourcePhrase &sourcePhrase , TargetPhrase *targetPhrase, OnDiskWrapper &onDiskWrapper , size_t tableLimit, const std::vector &counts, OnDiskPt::PhrasePtr spShort); - size_t ReadChild(Word &wordFound, UINT64 &childFilePos, const char *mem) const; - void GetChild(Word &wordFound, UINT64 &childFilePos, size_t ind, OnDiskWrapper &onDiskWrapper) const; + size_t ReadChild(Word &wordFound, uint64_t &childFilePos, const char *mem) const; + void GetChild(Word &wordFound, uint64_t &childFilePos, size_t ind, OnDiskWrapper &onDiskWrapper) const; public: static size_t GetNodeSize(size_t numChildren, size_t wordSize, size_t countSize); PhraseNode(); // unsaved node - PhraseNode(UINT64 filePos, OnDiskWrapper &onDiskWrapper); // load saved node + PhraseNode(uint64_t filePos, OnDiskWrapper &onDiskWrapper); // load saved node ~PhraseNode(); - void Add(const Word &word, UINT64 nextFilePos, size_t wordSize); + void Add(const Word &word, uint64_t nextFilePos, size_t wordSize); void Save(OnDiskWrapper &onDiskWrapper, size_t pos, size_t tableLimit); void AddTargetPhrase(const SourcePhrase &sourcePhrase, TargetPhrase *targetPhrase , OnDiskWrapper &onDiskWrapper, size_t tableLimit , const std::vector &counts, OnDiskPt::PhrasePtr spShort); - UINT64 GetFilePos() const { + uint64_t GetFilePos() const { return m_filePos; } - UINT64 GetValue() const { + uint64_t GetValue() const { return m_value; } - void SetValue(UINT64 value) { + void SetValue(uint64_t value) { m_value = value; } size_t GetSize() const { @@ -92,7 +92,10 @@ class PhraseNode } const PhraseNode *GetChild(const Word &wordSought, OnDiskWrapper &onDiskWrapper) const; - const TargetPhraseCollection *GetTargetPhraseCollection(size_t tableLimit, OnDiskWrapper &onDiskWrapper) const; + + TargetPhraseCollection::shared_ptr + GetTargetPhraseCollection(size_t tableLimit, + OnDiskWrapper &onDiskWrapper) const; void AddCounts(const std::vector &counts) { m_counts = counts; diff --git a/OnDiskPt/SourcePhrase.cpp b/OnDiskPt/SourcePhrase.cpp index 595748c702..2bbdc628f6 100644 --- a/OnDiskPt/SourcePhrase.cpp +++ b/OnDiskPt/SourcePhrase.cpp @@ -17,7 +17,6 @@ License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include "util/check.hh" #include "SourcePhrase.h" namespace OnDiskPt diff --git a/OnDiskPt/TargetPhrase.cpp b/OnDiskPt/TargetPhrase.cpp index 2e3e3511b4..c232c9bc37 100644 --- a/OnDiskPt/TargetPhrase.cpp +++ b/OnDiskPt/TargetPhrase.cpp @@ -21,10 +21,9 @@ #include #include #include "moses/Util.h" -#include "moses/TargetPhrase.h" -#include "moses/TranslationModel/PhraseDictionary.h" #include "TargetPhrase.h" #include "OnDiskWrapper.h" +#include "util/exception.hh" #include @@ -58,7 +57,7 @@ void TargetPhrase::Create1AlignFromString(const std::string &align1Str) { vector alignPoints; Moses::Tokenize(alignPoints, align1Str, "-"); - CHECK(alignPoints.size() == 2); + UTIL_THROW_IF2(alignPoints.size() != 2, "Incorrectly formatted word alignment: " << align1Str); m_align.push_back(pair(alignPoints[0], alignPoints[1]) ); } @@ -76,7 +75,7 @@ void TargetPhrase::CreateAlignFromString(const std::string &alignStr) void TargetPhrase::SetScore(float score, size_t ind) { - CHECK(ind < m_scores.size()); + assert(ind < m_scores.size()); m_scores[ind] = score; } @@ -102,17 +101,17 @@ char *TargetPhrase::WriteToMemory(OnDiskWrapper &onDiskWrapper, size_t &memUsed) size_t spSize = sp->GetSize(); size_t sourceWordSize = onDiskWrapper.GetSourceWordSize(); - size_t memNeeded = sizeof(UINT64) // num of words + size_t memNeeded = sizeof(uint64_t) // num of words + targetWordSize * phraseSize // actual words. lhs as last words - + sizeof(UINT64) // num source words + + sizeof(uint64_t) // num source words + sourceWordSize * spSize; // actual source words memUsed = 0; - UINT64 *mem = (UINT64*) malloc(memNeeded); + uint64_t *mem = (uint64_t*) malloc(memNeeded); // write size mem[0] = phraseSize; - memUsed += sizeof(UINT64); + memUsed += sizeof(uint64_t); // write each word for (size_t pos = 0; pos < phraseSize; ++pos) { @@ -123,16 +122,16 @@ char *TargetPhrase::WriteToMemory(OnDiskWrapper &onDiskWrapper, size_t &memUsed) // write size of source phrase and all source words char *currPtr = (char*)mem + memUsed; - UINT64 *memTmp = (UINT64*) currPtr; + uint64_t *memTmp = (uint64_t*) currPtr; memTmp[0] = spSize; - memUsed += sizeof(UINT64); + memUsed += sizeof(uint64_t); for (size_t pos = 0; pos < spSize; ++pos) { const Word &word = sp->GetWord(pos); char *currPtr = (char*)mem + memUsed; memUsed += word.WriteToMemory((char*) currPtr); } - CHECK(memUsed == memNeeded); + assert(memUsed == memNeeded); return (char *) mem; } @@ -144,13 +143,15 @@ void TargetPhrase::Save(OnDiskWrapper &onDiskWrapper) std::fstream &file = onDiskWrapper.GetFileTargetInd(); - UINT64 startPos = file.tellp(); + uint64_t startPos = file.tellp(); file.seekp(0, ios::end); file.write(mem, memUsed); - UINT64 endPos = file.tellp(); - CHECK(startPos + memUsed == endPos); +#ifndef NDEBUG + uint64_t endPos = file.tellp(); + assert(startPos + memUsed == endPos); +#endif m_filePos = startPos; free(mem); @@ -161,10 +162,14 @@ char *TargetPhrase::WriteOtherInfoToMemory(OnDiskWrapper &onDiskWrapper, size_t // allocate mem size_t numScores = onDiskWrapper.GetNumScores() ,numAlign = GetAlign().size(); + size_t sparseFeatureSize = m_sparseFeatures.size(); + size_t propSize = m_property.size(); - size_t memNeeded = sizeof(UINT64); // file pos (phrase id) - memNeeded += sizeof(UINT64) + 2 * sizeof(UINT64) * numAlign; // align - memNeeded += sizeof(float) * numScores; // scores + size_t memNeeded = sizeof(uint64_t) // file pos (phrase id) + + sizeof(uint64_t) + 2 * sizeof(uint64_t) * numAlign // align + + sizeof(float) * numScores // scores + + sizeof(uint64_t) + sparseFeatureSize // sparse features string + + sizeof(uint64_t) + propSize; // property string char *mem = (char*) malloc(memNeeded); //memset(mem, 0, memNeeded); @@ -172,8 +177,8 @@ char *TargetPhrase::WriteOtherInfoToMemory(OnDiskWrapper &onDiskWrapper, size_t memUsed = 0; // phrase id - memcpy(mem, &m_filePos, sizeof(UINT64)); - memUsed += sizeof(UINT64); + memcpy(mem, &m_filePos, sizeof(uint64_t)); + memUsed += sizeof(uint64_t); // align size_t tmp = WriteAlignToMemory(mem + memUsed); @@ -182,17 +187,39 @@ char *TargetPhrase::WriteOtherInfoToMemory(OnDiskWrapper &onDiskWrapper, size_t // scores memUsed += WriteScoresToMemory(mem + memUsed); + // sparse features + memUsed += WriteStringToMemory(mem + memUsed, m_sparseFeatures); + + // property string + memUsed += WriteStringToMemory(mem + memUsed, m_property); + //DebugMem(mem, memNeeded); - CHECK(memNeeded == memUsed); + assert(memNeeded == memUsed); return mem; } +size_t TargetPhrase::WriteStringToMemory(char *mem, const std::string &str) const +{ + size_t memUsed = 0; + uint64_t *memTmp = (uint64_t*) mem; + + size_t strSize = str.size(); + memTmp[0] = strSize; + memUsed += sizeof(uint64_t); + + const char *charStr = str.c_str(); + memcpy(mem + memUsed, charStr, strSize); + memUsed += strSize; + + return memUsed; +} + size_t TargetPhrase::WriteAlignToMemory(char *mem) const { size_t memUsed = 0; // num of alignments - UINT64 numAlign = m_align.size(); + uint64_t numAlign = m_align.size(); memcpy(mem, &numAlign, sizeof(numAlign)); memUsed += sizeof(numAlign); @@ -222,90 +249,60 @@ size_t TargetPhrase::WriteScoresToMemory(char *mem) const return memUsed; } - -Moses::TargetPhrase *TargetPhrase::ConvertToMoses(const std::vector & inputFactors - , const std::vector &outputFactors - , const Vocab &vocab - , const Moses::PhraseDictionary &phraseDict - , const std::vector &weightT) const +uint64_t TargetPhrase::ReadOtherInfoFromFile(uint64_t filePos, std::fstream &fileTPColl) { - Moses::TargetPhrase *ret = new Moses::TargetPhrase(); - - // words - size_t phraseSize = GetSize(); - CHECK(phraseSize > 0); // last word is lhs - --phraseSize; - - for (size_t pos = 0; pos < phraseSize; ++pos) { - GetWord(pos).ConvertToMoses(outputFactors, vocab, ret->AddWord()); - } + assert(filePos == (uint64_t)fileTPColl.tellg()); - // alignments - int index = 0; - Moses::AlignmentInfo::CollType alignTerm, alignNonTerm; - std::set > alignmentInfo; - const PhrasePtr sp = GetSourcePhrase(); - for (size_t ind = 0; ind < m_align.size(); ++ind) { - const std::pair &entry = m_align[ind]; - alignmentInfo.insert(entry); - size_t sourcePos = entry.first; - size_t targetPos = entry.second; + uint64_t memUsed = 0; + fileTPColl.read((char*) &m_filePos, sizeof(uint64_t)); + memUsed += sizeof(uint64_t); + assert(m_filePos != 0); - if (GetWord(targetPos).IsNonTerminal()) { - alignNonTerm.insert(std::pair(sourcePos, targetPos)); - } else { - alignTerm.insert(std::pair(sourcePos, targetPos)); - } + memUsed += ReadAlignFromFile(fileTPColl); + assert((memUsed + filePos) == (uint64_t)fileTPColl.tellg()); - } - ret->SetAlignTerm(alignTerm); - ret->SetAlignNonTerm(alignNonTerm); + memUsed += ReadScoresFromFile(fileTPColl); + assert((memUsed + filePos) == (uint64_t)fileTPColl.tellg()); - Moses::Word *lhsTarget = new Moses::Word(true); - GetWord(GetSize() - 1).ConvertToMoses(outputFactors, vocab, *lhsTarget); - ret->SetTargetLHS(lhsTarget); + // sparse features + memUsed += ReadStringFromFile(fileTPColl, m_sparseFeatures); - // set source phrase - Moses::Phrase mosesSP(Moses::Input); - for (size_t pos = 0; pos < sp->GetSize(); ++pos) { - sp->GetWord(pos).ConvertToMoses(inputFactors, vocab, mosesSP.AddWord()); - } - ret->SetSourcePhrase(mosesSP); + // properties + memUsed += ReadStringFromFile(fileTPColl, m_property); - // scores - ret->GetScoreBreakdown().Assign(&phraseDict, m_scores); - ret->Evaluate(mosesSP); - - return ret; + return memUsed; } -UINT64 TargetPhrase::ReadOtherInfoFromFile(UINT64 filePos, std::fstream &fileTPColl) +uint64_t TargetPhrase::ReadStringFromFile(std::fstream &fileTPColl, std::string &outStr) { - CHECK(filePos == (UINT64)fileTPColl.tellg()); + uint64_t bytesRead = 0; - UINT64 memUsed = 0; - fileTPColl.read((char*) &m_filePos, sizeof(UINT64)); - memUsed += sizeof(UINT64); - CHECK(m_filePos != 0); + uint64_t strSize; + fileTPColl.read((char*) &strSize, sizeof(uint64_t)); + bytesRead += sizeof(uint64_t); - memUsed += ReadAlignFromFile(fileTPColl); - CHECK((memUsed + filePos) == (UINT64)fileTPColl.tellg()); + if (strSize) { + char *mem = (char*) malloc(strSize + 1); + mem[strSize] = '\0'; + fileTPColl.read(mem, strSize); + outStr = string(mem); + free(mem); - memUsed += ReadScoresFromFile(fileTPColl); - CHECK((memUsed + filePos) == (UINT64)fileTPColl.tellg()); + bytesRead += strSize; + } - return memUsed; + return bytesRead; } -UINT64 TargetPhrase::ReadFromFile(std::fstream &fileTP) +uint64_t TargetPhrase::ReadFromFile(std::fstream &fileTP) { - UINT64 bytesRead = 0; + uint64_t bytesRead = 0; fileTP.seekg(m_filePos); - UINT64 numWords; - fileTP.read((char*) &numWords, sizeof(UINT64)); - bytesRead += sizeof(UINT64); + uint64_t numWords; + fileTP.read((char*) &numWords, sizeof(uint64_t)); + bytesRead += sizeof(uint64_t); for (size_t ind = 0; ind < numWords; ++ind) { WordPtr word(new Word()); @@ -314,9 +311,9 @@ UINT64 TargetPhrase::ReadFromFile(std::fstream &fileTP) } // read source words - UINT64 numSourceWords; - fileTP.read((char*) &numSourceWords, sizeof(UINT64)); - bytesRead += sizeof(UINT64); + uint64_t numSourceWords; + fileTP.read((char*) &numSourceWords, sizeof(uint64_t)); + bytesRead += sizeof(uint64_t); PhrasePtr sp(new SourcePhrase()); for (size_t ind = 0; ind < numSourceWords; ++ind) { @@ -329,31 +326,31 @@ UINT64 TargetPhrase::ReadFromFile(std::fstream &fileTP) return bytesRead; } -UINT64 TargetPhrase::ReadAlignFromFile(std::fstream &fileTPColl) +uint64_t TargetPhrase::ReadAlignFromFile(std::fstream &fileTPColl) { - UINT64 bytesRead = 0; + uint64_t bytesRead = 0; - UINT64 numAlign; - fileTPColl.read((char*) &numAlign, sizeof(UINT64)); - bytesRead += sizeof(UINT64); + uint64_t numAlign; + fileTPColl.read((char*) &numAlign, sizeof(uint64_t)); + bytesRead += sizeof(uint64_t); for (size_t ind = 0; ind < numAlign; ++ind) { AlignPair alignPair; - fileTPColl.read((char*) &alignPair.first, sizeof(UINT64)); - fileTPColl.read((char*) &alignPair.second, sizeof(UINT64)); + fileTPColl.read((char*) &alignPair.first, sizeof(uint64_t)); + fileTPColl.read((char*) &alignPair.second, sizeof(uint64_t)); m_align.push_back(alignPair); - bytesRead += sizeof(UINT64) * 2; + bytesRead += sizeof(uint64_t) * 2; } return bytesRead; } -UINT64 TargetPhrase::ReadScoresFromFile(std::fstream &fileTPColl) +uint64_t TargetPhrase::ReadScoresFromFile(std::fstream &fileTPColl) { - CHECK(m_scores.size() > 0); + UTIL_THROW_IF2(m_scores.size() == 0, "Translation rules must must have some scores"); - UINT64 bytesRead = 0; + uint64_t bytesRead = 0; for (size_t ind = 0; ind < m_scores.size(); ++ind) { fileTPColl.read((char*) &m_scores[ind], sizeof(float)); diff --git a/OnDiskPt/TargetPhrase.h b/OnDiskPt/TargetPhrase.h index a73ab75e13..2197372fc4 100644 --- a/OnDiskPt/TargetPhrase.h +++ b/OnDiskPt/TargetPhrase.h @@ -36,7 +36,7 @@ class Phrase; namespace OnDiskPt { -typedef std::pair AlignPair; +typedef std::pair AlignPair; typedef std::vector AlignType; class Vocab; @@ -50,15 +50,18 @@ class TargetPhrase: public Phrase protected: AlignType m_align; PhrasePtr m_sourcePhrase; + std::string m_sparseFeatures, m_property; std::vector m_scores; - UINT64 m_filePos; + uint64_t m_filePos; size_t WriteAlignToMemory(char *mem) const; size_t WriteScoresToMemory(char *mem) const; + size_t WriteStringToMemory(char *mem, const std::string &str) const; - UINT64 ReadAlignFromFile(std::fstream &fileTPColl); - UINT64 ReadScoresFromFile(std::fstream &fileTPColl); + uint64_t ReadAlignFromFile(std::fstream &fileTPColl); + uint64_t ReadScoresFromFile(std::fstream &fileTPColl); + uint64_t ReadStringFromFile(std::fstream &fileTPColl, std::string &outStr); public: TargetPhrase() { @@ -92,23 +95,33 @@ class TargetPhrase: public Phrase char *WriteOtherInfoToMemory(OnDiskWrapper &onDiskWrapper, size_t &memUsed) const; void Save(OnDiskWrapper &onDiskWrapper); - UINT64 GetFilePos() const { + uint64_t GetFilePos() const { return m_filePos; } float GetScore(size_t ind) const { return m_scores[ind]; } - Moses::TargetPhrase *ConvertToMoses(const std::vector &inputFactors - , const std::vector &outputFactors - , const Vocab &vocab - , const Moses::PhraseDictionary &phraseDict - , const std::vector &weightT) const; - UINT64 ReadOtherInfoFromFile(UINT64 filePos, std::fstream &fileTPColl); - UINT64 ReadFromFile(std::fstream &fileTP); + uint64_t ReadOtherInfoFromFile(uint64_t filePos, std::fstream &fileTPColl); + uint64_t ReadFromFile(std::fstream &fileTP); virtual void DebugPrint(std::ostream &out, const Vocab &vocab) const; + const std::string &GetProperty() const { + return m_property; + } + + void SetProperty(const std::string &value) { + m_property = value; + } + + const std::string &GetSparseFeatures() const { + return m_sparseFeatures; + } + + void SetSparseFeatures(const std::string &value) { + m_sparseFeatures = value; + } }; } diff --git a/OnDiskPt/TargetPhraseCollection.cpp b/OnDiskPt/TargetPhraseCollection.cpp index 368faa9719..a5a953b12d 100644 --- a/OnDiskPt/TargetPhraseCollection.cpp +++ b/OnDiskPt/TargetPhraseCollection.cpp @@ -21,8 +21,6 @@ #include #include #include "moses/Util.h" -#include "moses/TargetPhraseCollection.h" -#include "moses/TranslationModel/PhraseDictionary.h" #include "TargetPhraseCollection.h" #include "Vocab.h" #include "OnDiskWrapper.h" @@ -71,12 +69,12 @@ void TargetPhraseCollection::Save(OnDiskWrapper &onDiskWrapper) { std::fstream &file = onDiskWrapper.GetFileTargetColl(); - size_t memUsed = sizeof(UINT64); + size_t memUsed = sizeof(uint64_t); char *mem = (char*) malloc(memUsed); // size of coll - UINT64 numPhrases = GetSize(); - ((UINT64*)mem)[0] = numPhrases; + uint64_t numPhrases = GetSize(); + ((uint64_t*)mem)[0] = numPhrases; // MAIN LOOP CollType::iterator iter; @@ -98,55 +96,23 @@ void TargetPhraseCollection::Save(OnDiskWrapper &onDiskWrapper) } // total number of bytes - //((UINT64*)mem)[0] = (UINT64) memUsed; + //((uint64_t*)mem)[0] = (uint64_t) memUsed; - UINT64 startPos = file.tellp(); + uint64_t startPos = file.tellp(); file.seekp(0, ios::end); file.write((char*) mem, memUsed); free(mem); - UINT64 endPos = file.tellp(); - CHECK(startPos + memUsed == endPos); - +#ifndef NDEBUG + uint64_t endPos = file.tellp(); + assert(startPos + memUsed == endPos); +#endif m_filePos = startPos; } -Moses::TargetPhraseCollection *TargetPhraseCollection::ConvertToMoses(const std::vector &inputFactors - , const std::vector &outputFactors - , const Moses::PhraseDictionary &phraseDict - , const std::vector &weightT - , const std::string & /* filePath */ - , Vocab &vocab) const -{ - Moses::TargetPhraseCollection *ret = new Moses::TargetPhraseCollection(); - - CollType::const_iterator iter; - for (iter = m_coll.begin(); iter != m_coll.end(); ++iter) { - const TargetPhrase &tp = **iter; - Moses::TargetPhrase *mosesPhrase = tp.ConvertToMoses(inputFactors, outputFactors - , vocab - , phraseDict - , weightT); - - /* - // debugging output - stringstream strme; - strme << filePath << " " << *mosesPhrase; - mosesPhrase->SetDebugOutput(strme.str()); - */ - - ret->Add(mosesPhrase); - } - - ret->Sort(true, phraseDict.GetTableLimit()); - - return ret; - -} - -void TargetPhraseCollection::ReadFromFile(size_t tableLimit, UINT64 filePos, OnDiskWrapper &onDiskWrapper) +void TargetPhraseCollection::ReadFromFile(size_t tableLimit, uint64_t filePos, OnDiskWrapper &onDiskWrapper) { fstream &fileTPColl = onDiskWrapper.GetFileTargetColl(); fstream &fileTP = onDiskWrapper.GetFileTargetInd(); @@ -154,23 +120,23 @@ void TargetPhraseCollection::ReadFromFile(size_t tableLimit, UINT64 filePos, OnD size_t numScores = onDiskWrapper.GetNumScores(); - UINT64 numPhrases; + uint64_t numPhrases; - UINT64 currFilePos = filePos; + uint64_t currFilePos = filePos; fileTPColl.seekg(filePos); - fileTPColl.read((char*) &numPhrases, sizeof(UINT64)); + fileTPColl.read((char*) &numPhrases, sizeof(uint64_t)); // table limit if (tableLimit) { - numPhrases = std::min(numPhrases, (UINT64) tableLimit); + numPhrases = std::min(numPhrases, (uint64_t) tableLimit); } - currFilePos += sizeof(UINT64); + currFilePos += sizeof(uint64_t); for (size_t ind = 0; ind < numPhrases; ++ind) { TargetPhrase *tp = new TargetPhrase(numScores); - UINT64 sizeOtherInfo = tp->ReadOtherInfoFromFile(currFilePos, fileTPColl); + uint64_t sizeOtherInfo = tp->ReadOtherInfoFromFile(currFilePos, fileTPColl); tp->ReadFromFile(fileTP); currFilePos += sizeOtherInfo; @@ -179,7 +145,7 @@ void TargetPhraseCollection::ReadFromFile(size_t tableLimit, UINT64 filePos, OnD } } -UINT64 TargetPhraseCollection::GetFilePos() const +uint64_t TargetPhraseCollection::GetFilePos() const { return m_filePos; } diff --git a/OnDiskPt/TargetPhraseCollection.h b/OnDiskPt/TargetPhraseCollection.h index d6086850f1..9b028f11eb 100644 --- a/OnDiskPt/TargetPhraseCollection.h +++ b/OnDiskPt/TargetPhraseCollection.h @@ -21,6 +21,7 @@ #include "TargetPhrase.h" #include "Vocab.h" +#include namespace Moses { @@ -46,10 +47,13 @@ class TargetPhraseCollection protected: typedef std::vector CollType; CollType m_coll; - UINT64 m_filePos; + uint64_t m_filePos; std::string m_debugStr; public: + typedef boost::shared_ptr shared_const_ptr; + typedef boost::shared_ptr shared_ptr; + static size_t s_sortScoreInd; TargetPhraseCollection(); @@ -67,15 +71,9 @@ class TargetPhraseCollection const TargetPhrase &GetTargetPhrase(size_t ind) const; - UINT64 GetFilePos() const; + uint64_t GetFilePos() const; - Moses::TargetPhraseCollection *ConvertToMoses(const std::vector &inputFactors - , const std::vector &outputFactors - , const Moses::PhraseDictionary &phraseDict - , const std::vector &weightT - , const std::string &filePath - , Vocab &vocab) const; - void ReadFromFile(size_t tableLimit, UINT64 filePos, OnDiskWrapper &onDiskWrapper); + void ReadFromFile(size_t tableLimit, uint64_t filePos, OnDiskWrapper &onDiskWrapper); const std::string GetDebugStr() const; void SetDebugStr(const std::string &str); diff --git a/OnDiskPt/Vocab.cpp b/OnDiskPt/Vocab.cpp index 03af2d8869..0a95f5180d 100644 --- a/OnDiskPt/Vocab.cpp +++ b/OnDiskPt/Vocab.cpp @@ -21,6 +21,8 @@ #include #include "OnDiskWrapper.h" #include "Vocab.h" +#include "moses/Util.h" +#include "util/exception.hh" using namespace std; @@ -35,9 +37,9 @@ bool Vocab::Load(OnDiskWrapper &onDiskWrapper) while(getline(file, line)) { vector tokens; Moses::Tokenize(tokens, line); - CHECK(tokens.size() == 2); + UTIL_THROW_IF2(tokens.size() != 2, "Vocab file corrupted"); const string &key = tokens[0]; - m_vocabColl[key] = Moses::Scan(tokens[1]); + m_vocabColl[key] = Moses::Scan(tokens[1]); } // create lookup @@ -47,7 +49,7 @@ bool Vocab::Load(OnDiskWrapper &onDiskWrapper) CollType::const_iterator iter; for (iter = m_vocabColl.begin(); iter != m_vocabColl.end(); ++iter) { - UINT32 vocabId = iter->second; + uint32_t vocabId = iter->second; const std::string &word = iter->first; m_lookup[vocabId] = word; @@ -62,13 +64,13 @@ void Vocab::Save(OnDiskWrapper &onDiskWrapper) CollType::const_iterator iterVocab; for (iterVocab = m_vocabColl.begin(); iterVocab != m_vocabColl.end(); ++iterVocab) { const string &word = iterVocab->first; - UINT32 vocabId = iterVocab->second; + uint32_t vocabId = iterVocab->second; file << word << " " << vocabId << endl; } } -UINT64 Vocab::AddVocabId(const std::string &str) +uint64_t Vocab::AddVocabId(const std::string &str) { // find string id CollType::const_iterator iter = m_vocabColl.find(str); @@ -82,7 +84,7 @@ UINT64 Vocab::AddVocabId(const std::string &str) } } -UINT64 Vocab::GetVocabId(const std::string &str, bool &found) const +uint64_t Vocab::GetVocabId(const std::string &str, bool &found) const { // find string id CollType::const_iterator iter = m_vocabColl.find(str); diff --git a/OnDiskPt/Vocab.h b/OnDiskPt/Vocab.h index 2adbf16f29..2fa7ec635a 100644 --- a/OnDiskPt/Vocab.h +++ b/OnDiskPt/Vocab.h @@ -34,19 +34,19 @@ class OnDiskWrapper; class Vocab { protected: - typedef std::map CollType; + typedef std::map CollType; CollType m_vocabColl; std::vector m_lookup; // opposite of m_vocabColl - UINT64 m_nextId; // starts @ 1 + uint64_t m_nextId; // starts @ 1 public: Vocab() :m_nextId(1) { } - UINT64 AddVocabId(const std::string &str); - UINT64 GetVocabId(const std::string &str, bool &found) const; - const std::string &GetString(UINT32 vocabId) const { + uint64_t AddVocabId(const std::string &str); + uint64_t GetVocabId(const std::string &str, bool &found) const; + const std::string &GetString(uint64_t vocabId) const { return m_lookup[vocabId]; } diff --git a/OnDiskPt/Word.cpp b/OnDiskPt/Word.cpp index 1664571c50..9ad6bea721 100644 --- a/OnDiskPt/Word.cpp +++ b/OnDiskPt/Word.cpp @@ -18,15 +18,15 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ***********************************************************************/ -#include "moses/FactorCollection.h" +#include #include "moses/Util.h" -#include "moses/Word.h" #include "Word.h" #include "util/tokenize_piece.hh" #include "util/exception.hh" using namespace std; +using namespace boost::algorithm; namespace OnDiskPt { @@ -41,7 +41,7 @@ Word::~Word() void Word::CreateFromString(const std::string &inString, Vocab &vocab) { - if (inString.substr(0, 1) == "[" && inString.substr(inString.size() - 1, 1) == "]") { + if (starts_with(inString, "[") && ends_with(inString, "]")) { // non-term m_isNonTerminal = true; string str = inString.substr(1, inString.size() - 2); @@ -55,10 +55,10 @@ void Word::CreateFromString(const std::string &inString, Vocab &vocab) size_t Word::WriteToMemory(char *mem) const { - UINT64 *vocabMem = (UINT64*) mem; + uint64_t *vocabMem = (uint64_t*) mem; vocabMem[0] = m_vocabId; - size_t size = sizeof(UINT64); + size_t size = sizeof(uint64_t); // is non-term char bNonTerm = (char) m_isNonTerminal; @@ -70,10 +70,10 @@ size_t Word::WriteToMemory(char *mem) const size_t Word::ReadFromMemory(const char *mem) { - UINT64 *vocabMem = (UINT64*) mem; + uint64_t *vocabMem = (uint64_t*) mem; m_vocabId = vocabMem[0]; - size_t memUsed = sizeof(UINT64); + size_t memUsed = sizeof(uint64_t); // is non-term char bNonTerm; @@ -86,34 +86,16 @@ size_t Word::ReadFromMemory(const char *mem) size_t Word::ReadFromFile(std::fstream &file) { - const size_t memAlloc = sizeof(UINT64) + sizeof(char); - char mem[sizeof(UINT64) + sizeof(char)]; + const size_t memAlloc = sizeof(uint64_t) + sizeof(char); + char mem[sizeof(uint64_t) + sizeof(char)]; file.read(mem, memAlloc); size_t memUsed = ReadFromMemory(mem); - CHECK(memAlloc == memUsed); + assert(memAlloc == memUsed); return memAlloc; } -void Word::ConvertToMoses( - const std::vector &outputFactorsVec, - const Vocab &vocab, - Moses::Word &overwrite) const -{ - Moses::FactorCollection &factorColl = Moses::FactorCollection::Instance(); - overwrite = Moses::Word(m_isNonTerminal); - - // TODO: this conversion should have been done at load time. - util::TokenIter tok(vocab.GetString(m_vocabId), '|'); - - for (std::vector::const_iterator t = outputFactorsVec.begin(); t != outputFactorsVec.end(); ++t, ++tok) { - UTIL_THROW_IF(!tok, util::Exception, "Too few factors in \"" << vocab.GetString(m_vocabId) << "\"; was expecting " << outputFactorsVec.size()); - overwrite.SetFactor(*t, factorColl.AddFactor(*tok)); - } - UTIL_THROW_IF(tok, util::Exception, "Too many factors in \"" << vocab.GetString(m_vocabId) << "\"; was expecting " << outputFactorsVec.size()); -} - int Word::Compare(const Word &compare) const { int ret; diff --git a/OnDiskPt/Word.h b/OnDiskPt/Word.h index 53253fa241..f5cbf39a8e 100644 --- a/OnDiskPt/Word.h +++ b/OnDiskPt/Word.h @@ -43,7 +43,7 @@ class Word private: bool m_isNonTerminal; - UINT64 m_vocabId; + uint64_t m_vocabId; public: explicit Word() { @@ -67,14 +67,13 @@ class Word size_t ReadFromMemory(const char *mem); size_t ReadFromFile(std::fstream &file); - void SetVocabId(UINT32 vocabId) { - m_vocabId = vocabId; + uint64_t GetVocabId() const { + return m_vocabId; } - void ConvertToMoses( - const std::vector &outputFactorsVec, - const Vocab &vocab, - Moses::Word &overwrite) const; + void SetVocabId(uint64_t vocabId) { + m_vocabId = vocabId; + } void DebugPrint(std::ostream &out, const Vocab &vocab) const; inline const std::string &GetString(const Vocab &vocab) const { diff --git a/OnDiskPt/queryOnDiskPt.cpp b/OnDiskPt/queryOnDiskPt.cpp index 776dd8a2c3..1eeb65d9ab 100644 --- a/OnDiskPt/queryOnDiskPt.cpp +++ b/OnDiskPt/queryOnDiskPt.cpp @@ -22,7 +22,7 @@ int main(int argc, char **argv) { int tableLimit = 20; std::string ttable = ""; - bool useAlignments = false; + // bool useAlignments = false; for(int i = 1; i < argc; i++) { if(!strcmp(argv[i], "-tlimit")) { @@ -41,8 +41,7 @@ int main(int argc, char **argv) usage(); OnDiskWrapper onDiskWrapper; - bool retDb = onDiskWrapper.BeginLoad(ttable); - CHECK(retDb); + onDiskWrapper.BeginLoad(ttable); OnDiskQuery onDiskQuery(onDiskWrapper); cerr << "Ready..." << endl; @@ -57,7 +56,7 @@ int main(int argc, char **argv) if (node) { // source phrase points to a bunch of rules - const TargetPhraseCollection *coll = node->GetTargetPhraseCollection(tableLimit, onDiskWrapper); + TargetPhraseCollection::shared_ptr coll = node->GetTargetPhraseCollection(tableLimit, onDiskWrapper); string str = coll->GetDebugStr(); cout << "Found " << coll->GetSize() << endl; diff --git a/README b/README new file mode 100644 index 0000000000..644ce6c1cb --- /dev/null +++ b/README @@ -0,0 +1,19 @@ +Instructions for building and installing Moses are online: + http://www.statmt.org/moses/?n=Development.GetStarted +If you have g++ and Boost installed, and you want the default compilation with most of things you need, then run: + ./bjam -j4 + +Questions should be directed to the mailing list (don't forget to register before sending emails): + http://mailman.mit.edu/mailman/listinfo/moses-support + https://github.com/moses-smt/mosesdecoder/compare/master...hieu2 + +Some of the code is not originally part of Moses, but is periodically copied +into the source tree from elsewhere: + + * "bjam-files" is taken from Boost. + * "util" and "lm" are taken from KenLM: https://github.com/kpu/kenlm + +===================================================== +Running on Ubuntu 22.04 (March 2025) +sudo apt install libcmph-dev libxmlrpc-c++8-dev +./bjam -j11 --with-cmph=/usr --with-xmlrpc-c=/usr -a diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 0000000000..fddd0faea1 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,100 @@ +# Starter pipeline +# Start with a minimal pipeline that you can customize to build and deploy your code. +# Add steps that build, run tests, deploy, and more: +# https://aka.ms/yaml + +trigger: +- master + +pool: + #vmImage: 'ubuntu-latest' + vmImage: 'ubuntu-16.04' + +steps: + +- script: | + echo Printing some environment information + echo HOME: $HOME + echo + echo UBUNTU VERSION: + cat /etc/lsb-release + echo + echo CPU INFO + cat /proc/cpuinfo + echo + echo MEM INFO + cat /proc/meminfo + echo + echo DISK INFO + df -h + echo + echo PWD: $PWD + echo + ls + displayName: 'Printing some environment information' + + +## Installation commands for Ubuntu +- script: | + sudo apt-get install \ + g++ \ + git \ + subversion \ + automake \ + libtool \ + zlib1g-dev \ + libicu-dev \ + libboost-all-dev \ + libssl-dev \ + libbz2-dev \ + liblzma-dev \ + python-dev \ + graphviz \ + imagemagick \ + make \ + cmake \ + libgoogle-perftools-dev \ + autoconf \ + doxygen + displayName: 'Install Ubuntu packages' + +- script: | + wget "https://sourceforge.net/projects/cmph/files/v2.0.2/cmph-2.0.2.tar.gz/download" + mv download cmph-2.0.2.tar.gz + tar xvzf cmph-2.0.2.tar.gz + cd cmph-2.0.2 + ./configure --prefix=$PWD + make + make install + cd .. + displayName: 'Build and Install cmph' + +- script: | + wget "https://sourceforge.net/projects/xmlrpc-c/files/Xmlrpc-c%20Super%20Stable/1.51.06/xmlrpc-c-1.51.06.tgz/download" + mv download xmlrpc-c-1.51.06.tgz + tar xvzf xmlrpc-c-1.51.06.tgz + cd xmlrpc-c-1.51.06 + ./configure --prefix=$PWD + make + make install + sudo ldconfig + cd .. + displayName: 'Build and Install xmlrpc-c' + +- script: | + ./bjam \ + --with-cmph=$PWD/cmph-2.0.2 \ + --with-xmlrpc-c=$PWD/xmlrpc-c-1.51.06 \ + -j2 + displayName: 'Build Moses' + +# - script: | +# ./bjam \ +# -j2 +# displayName: 'Build Moses' + +# - task: ComponentGovernanceComponentDetection@0 +# inputs: +# scanType: 'Register' +# verbosity: 'Verbose' +# alertWarningLevel: 'High' \ No newline at end of file diff --git a/biconcor/Alignment.cpp b/biconcor/Alignment.cpp index 8148025311..a18775c1f8 100644 --- a/biconcor/Alignment.cpp +++ b/biconcor/Alignment.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include namespace diff --git a/biconcor/CMakeLists.txt b/biconcor/CMakeLists.txt new file mode 100644 index 0000000000..475ed7501f --- /dev/null +++ b/biconcor/CMakeLists.txt @@ -0,0 +1,5 @@ +project(biconcor) + +FILE(GLOB biconcor_source *.cpp) + +add_executable(biconcor ${biconcor_source}) diff --git a/biconcor/Jamfile b/biconcor/Jamfile index 76f5c7aaf1..83a7380007 100644 --- a/biconcor/Jamfile +++ b/biconcor/Jamfile @@ -1,2 +1,2 @@ exe biconcor : Vocabulary.cpp SuffixArray.cpp TargetCorpus.cpp Alignment.cpp Mismatch.cpp PhrasePair.cpp PhrasePairCollection.cpp biconcor.cpp base64.cpp ; - +exe phrase-lookup : Vocabulary.cpp SuffixArray.cpp phrase-lookup.cpp ; diff --git a/biconcor/Mismatch.cpp b/biconcor/Mismatch.cpp index c3afec7819..adee3eaee7 100644 --- a/biconcor/Mismatch.cpp +++ b/biconcor/Mismatch.cpp @@ -4,7 +4,7 @@ #include #include #include -#include +#include #include "SuffixArray.h" #include "TargetCorpus.h" @@ -103,7 +103,7 @@ void Mismatch::PrintClippedHTML( ostream* out, int width ) // find first and last int target_start = -1; - int target_end; + int target_end = -1; for(int i=0; i +#include #include #include diff --git a/biconcor/SuffixArray.cpp b/biconcor/SuffixArray.cpp index f4122a2d8f..7b9ec9a6df 100644 --- a/biconcor/SuffixArray.cpp +++ b/biconcor/SuffixArray.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include namespace @@ -21,6 +21,11 @@ SuffixArray::SuffixArray() m_wordInSentence(NULL), m_sentence(NULL), m_sentenceLength(NULL), + m_document(NULL), + m_documentName(NULL), + m_documentNameLength(0), + m_documentCount(0), + m_useDocument(false), m_vcb(), m_size(0), m_sentenceCount(0) { } @@ -32,6 +37,8 @@ SuffixArray::~SuffixArray() free(m_wordInSentence); free(m_sentence); free(m_sentenceLength); + free(m_document); + free(m_documentName); } void SuffixArray::Create(const string& fileName ) @@ -46,22 +53,32 @@ void SuffixArray::Create(const string& fileName ) textFile.open(fileName.c_str()); if (!textFile) { - cerr << "no such file or directory " << fileName << endl; + cerr << "Error: no such file or directory " << fileName << endl; exit(1); } + // first pass through data: get size istream *fileP = &textFile; m_size = 0; m_sentenceCount = 0; + m_documentCount = 0; while(!fileP->eof()) { SAFE_GETLINE((*fileP), line, LINE_MAX_LENGTH, '\n'); if (fileP->eof()) break; + if (m_useDocument && ProcessDocumentLine(line,0)) continue; vector< WORD_ID > words = m_vcb.Tokenize( line ); m_size += words.size() + 1; m_sentenceCount++; } textFile.close(); cerr << m_size << " words (incl. sentence boundaries)" << endl; + if (m_useDocument) { + cerr << m_documentCount << " documents" << endl; + if (m_documentCount == 0) { + cerr << "Error: no documents found, aborting." << endl; + exit(1); + } + } // allocate memory m_array = (WORD_ID*) calloc( sizeof( WORD_ID ), m_size ); @@ -69,21 +86,31 @@ void SuffixArray::Create(const string& fileName ) m_wordInSentence = (char*) calloc( sizeof( char ), m_size ); m_sentence = (INDEX*) calloc( sizeof( INDEX ), m_size ); m_sentenceLength = (char*) calloc( sizeof( char ), m_sentenceCount ); + CheckAllocation(m_array != NULL, "m_array"); + CheckAllocation(m_index != NULL, "m_index"); + CheckAllocation(m_wordInSentence != NULL, "m_wordInSentence"); + CheckAllocation(m_sentence != NULL, "m_sentence"); + CheckAllocation(m_sentenceLength != NULL, "m_sentenceLength"); + if (m_useDocument) { + m_document = (INDEX*) calloc( sizeof( INDEX ), m_documentCount ); + m_documentName = (INDEX*) calloc( sizeof( INDEX ), m_documentCount ); + m_documentNameBuffer = (char*) calloc( sizeof( char ), m_documentNameLength ); + CheckAllocation(m_document != NULL, "m_document"); + CheckAllocation(m_documentName != NULL, "m_documentName"); + CheckAllocation(m_documentNameBuffer != NULL, "m_documentNameBuffer"); + } - // fill the array + // second pass through data: fill the arrays int wordIndex = 0; int sentenceId = 0; + m_documentNameLength = 0; // re-use as counter + m_documentCount = 0; // re-use as counter textFile.open(fileName.c_str()); - - if (!textFile) { - cerr << "no such file or directory " << fileName << endl; - exit(1); - } - fileP = &textFile; while(!fileP->eof()) { SAFE_GETLINE((*fileP), line, LINE_MAX_LENGTH, '\n'); if (fileP->eof()) break; + if (m_useDocument && ProcessDocumentLine(line,sentenceId)) continue; vector< WORD_ID > words = m_vcb.Tokenize( line ); vector< WORD_ID >::const_iterator i; @@ -105,7 +132,7 @@ void SuffixArray::Create(const string& fileName ) m_buffer = (INDEX*) calloc( sizeof( INDEX ), m_size ); if (m_buffer == NULL) { - cerr << "cannot allocate memory to m_buffer" << endl; + cerr << "Error: cannot allocate memory to m_buffer" << endl; exit(1); } @@ -114,6 +141,45 @@ void SuffixArray::Create(const string& fileName ) cerr << "done sorting" << endl; } +// very specific code to deal with common crawl document ids +bool SuffixArray::ProcessDocumentLine( const char *line, const size_t sentenceId ) +{ + size_t i; + // first 32 characters are hex-hash + for(i=0; i<32; i++) { + if ((line[i] < '0' || line[i] > '9') && (line[i] < 'a' || line[i] > 'f')) { + return false; + } + } + if (line[i++] != ' ') return false; + + // second token is float + for (; line[i] != ' ' && line[i] != 0; i++) { + if (line[i] != '.' && (line[i] < '0' || line[i] > '9')) { + return false; + } + } + i++; + + // last token is url (=name) + size_t startName = i; + for (; line[i] != ' ' && line[i] != 0; i++) {} + if (line[i] == ' ') return false; + size_t endName = i+1; // include '\0' + + // second pass: record name and sentence number + if (m_document != NULL) { + m_documentName[m_documentCount] = m_documentNameLength; + for(size_t i=startName; i0) cout << " "; + cout << phrase[i]; + } + cout << '\t'; + INDEX start = 0; + INDEX end = m_size-1; + INDEX mid = FindFirst( phrase, start, end ); + if (mid == m_size) { // no matches + cout << "0 matches" << endl; + return; + } + + INDEX firstMatch = FindLast( phrase, mid, start, -1 ); + INDEX lastMatch = FindLast( phrase, mid, end, 1 ); + + // loop through all matches + cout << (lastMatch-firstMatch+1) << " matches" << endl; + for(INDEX i=firstMatch; i<=lastMatch; i++) { + // get sentence information + INDEX pos = GetPosition( i ); + INDEX start = pos - GetWordInSentence( pos ); + char length = GetSentenceLength( GetSentence( pos ) ); + // print document name + if (m_useDocument) { + INDEX sentence = GetSentence( pos ); + INDEX document = GetDocument( sentence ); + PrintDocumentName( document ); + cout << '\t'; + } + // print sentence + for(char i=0; i0) cout << " "; + cout << GetWord( start + i ); + } + cout << endl; + } +} + +SuffixArray::INDEX SuffixArray::GetDocument( INDEX sentence ) const +{ + // binary search + INDEX min = 0; + INDEX max = m_documentCount-1; + if (sentence >= m_document[max]) { + return max; + } + while(true) { + INDEX mid = (min + max) / 2; + if (sentence >= m_document[mid] && sentence < m_document[mid+1]) { + return mid; + } + if (sentence < m_document[mid]) { + max = mid-1; + } else { + min = mid+1; + } + } +} + void SuffixArray::Save(const string& fileName ) const { FILE *pFile = fopen ( fileName.c_str() , "w" ); - if (pFile == NULL) { - cerr << "Cannot open " << fileName << endl; - exit(1); - } + if (pFile == NULL) Error("cannot open",fileName); fwrite( &m_size, sizeof(INDEX), 1, pFile ); fwrite( m_array, sizeof(WORD_ID), m_size, pFile ); // corpus @@ -288,6 +413,16 @@ void SuffixArray::Save(const string& fileName ) const fwrite( &m_sentenceCount, sizeof(INDEX), 1, pFile ); fwrite( m_sentenceLength, sizeof(char), m_sentenceCount, pFile); // sentence length + + char useDocument = m_useDocument; // not sure if that is needed + fwrite( &useDocument, sizeof(char), 1, pFile ); + if (m_useDocument) { + fwrite( &m_documentCount, sizeof(INDEX), 1, pFile ); + fwrite( m_document, sizeof(INDEX), m_documentCount, pFile ); + fwrite( m_documentName, sizeof(INDEX), m_documentCount, pFile ); + fwrite( &m_documentNameLength, sizeof(INDEX), 1, pFile ); + fwrite( m_documentNameBuffer, sizeof(char), m_documentNameLength, pFile ); + } fclose( pFile ); m_vcb.Save( fileName + ".src-vcb" ); @@ -296,56 +431,81 @@ void SuffixArray::Save(const string& fileName ) const void SuffixArray::Load(const string& fileName ) { FILE *pFile = fopen ( fileName.c_str() , "r" ); - if (pFile == NULL) { - cerr << "no such file or directory " << fileName << endl; - exit(1); - } + if (pFile == NULL) Error("no such file or directory", fileName); cerr << "loading from " << fileName << endl; - fread( &m_size, sizeof(INDEX), 1, pFile ); + fread( &m_size, sizeof(INDEX), 1, pFile ) + || Error("could not read m_size from", fileName); cerr << "words in corpus: " << m_size << endl; + m_array = (WORD_ID*) calloc( sizeof( WORD_ID ), m_size ); m_index = (INDEX*) calloc( sizeof( INDEX ), m_size ); m_wordInSentence = (char*) calloc( sizeof( char ), m_size ); m_sentence = (INDEX*) calloc( sizeof( INDEX ), m_size ); - - if (m_array == NULL) { - cerr << "Error: cannot allocate memory to m_array" << endl; - exit(1); - } - - if (m_index == NULL) { - cerr << "Error: cannot allocate memory to m_index" << endl; - exit(1); - } - - if (m_wordInSentence == NULL) { - cerr << "Error: cannot allocate memory to m_wordInSentence" << endl; - exit(1); - } - - if (m_sentence == NULL) { - cerr << "Error: cannot allocate memory to m_sentence" << endl; - exit(1); - } - - fread( m_array, sizeof(WORD_ID), m_size, pFile ); // corpus - fread( m_index, sizeof(INDEX), m_size, pFile ); // suffix array - fread( m_wordInSentence, sizeof(char), m_size, pFile); // word index - fread( m_sentence, sizeof(INDEX), m_size, pFile); // sentence index - - fread( &m_sentenceCount, sizeof(INDEX), 1, pFile ); + CheckAllocation(m_array != NULL, "m_array"); + CheckAllocation(m_index != NULL, "m_index"); + CheckAllocation(m_wordInSentence != NULL, "m_wordInSentence"); + CheckAllocation(m_sentence != NULL, "m_sentence"); + fread( m_array, sizeof(WORD_ID), m_size, pFile ) // corpus + || Error("could not read m_array from", fileName); + fread( m_index, sizeof(INDEX), m_size, pFile ) // suffix array + || Error("could not read m_index from", fileName); + fread( m_wordInSentence, sizeof(char), m_size, pFile) // word index + || Error("could not read m_wordInSentence from", fileName); + fread( m_sentence, sizeof(INDEX), m_size, pFile ) // sentence index + || Error("could not read m_sentence from", fileName); + + fread( &m_sentenceCount, sizeof(INDEX), 1, pFile ) + || Error("could not read m_sentenceCount from", fileName); cerr << "sentences in corpus: " << m_sentenceCount << endl; - m_sentenceLength = (char*) calloc( sizeof( char ), m_sentenceCount ); - if (m_sentenceLength == NULL) { - cerr << "Error: cannot allocate memory to m_sentenceLength" << endl; - exit(1); + m_sentenceLength = (char*) calloc( sizeof( char ), m_sentenceCount ); + CheckAllocation(m_sentenceLength != NULL, "m_sentenceLength"); + fread( m_sentenceLength, sizeof(char), m_sentenceCount, pFile) // sentence length + || Error("could not read m_sentenceLength from", fileName); + + if (m_useDocument) { // do not read it when you do not need it + char useDocument; + fread( &useDocument, sizeof(char), 1, pFile ) + || Error("could not read m_useDocument from", fileName); + if (!useDocument) { + cerr << "Error: stored suffix array does not have a document index\n"; + exit(1); + } + fread( &m_documentCount, sizeof(INDEX), 1, pFile ) + || Error("could not read m_documentCount from", fileName); + m_document = (INDEX*) calloc( sizeof( INDEX ), m_documentCount ); + m_documentName = (INDEX*) calloc( sizeof( INDEX ), m_documentCount ); + CheckAllocation(m_document != NULL, "m_document"); + CheckAllocation(m_documentName != NULL, "m_documentName"); + fread( m_document, sizeof(INDEX), m_documentCount, pFile ) + || Error("could not read m_document from", fileName); + fread( m_documentName, sizeof(INDEX), m_documentCount, pFile ) + || Error("could not read m_documentName from", fileName); + fread( &m_documentNameLength, sizeof(INDEX), 1, pFile ) + || Error("could not read m_documentNameLength from", fileName); + m_documentNameBuffer = (char*) calloc( sizeof( char ), m_documentNameLength ); + CheckAllocation(m_documentNameBuffer != NULL, "m_documentNameBuffer"); + fread( m_documentNameBuffer, sizeof(char), m_documentNameLength, pFile ) + || Error("could not read m_document from", fileName); } - fread( m_sentenceLength, sizeof(char), m_sentenceCount, pFile); // sentence length fclose( pFile ); m_vcb.Load( fileName + ".src-vcb" ); } + +void SuffixArray::CheckAllocation( bool check, const char *dataStructure ) const +{ + if (check) return; + cerr << "Error: could not allocate memory for " << dataStructure << endl; + exit(1); +} + +bool SuffixArray::Error( const char *message, const string &fileName) const +{ + cerr << "Error: " << message << " " << fileName << endl; + exit(1); + return true; // yeah, i know. +} diff --git a/biconcor/SuffixArray.h b/biconcor/SuffixArray.h index af7f5567ef..f20702e41f 100644 --- a/biconcor/SuffixArray.h +++ b/biconcor/SuffixArray.h @@ -15,6 +15,12 @@ class SuffixArray INDEX *m_sentence; char *m_sentenceLength; WORD_ID m_endOfSentence; + INDEX *m_document; + INDEX *m_documentName; + char *m_documentNameBuffer; + size_t m_documentNameLength; + size_t m_documentCount; + bool m_useDocument; Vocabulary m_vcb; INDEX m_size; INDEX m_sentenceCount; @@ -28,6 +34,7 @@ class SuffixArray ~SuffixArray(); void Create(const std::string& fileName ); + bool ProcessDocumentLine( const char* const, const size_t ); void Sort(INDEX start, INDEX end); int CompareIndex( INDEX a, INDEX b ) const; inline int CompareWord( WORD_ID a, WORD_ID b ) const; @@ -40,6 +47,7 @@ class SuffixArray INDEX FindLast( const std::vector< WORD > &phrase, INDEX start, INDEX end, int direction ); int Match( const std::vector< WORD > &phrase, INDEX index ); void List( INDEX start, INDEX end ); + void PrintSentenceMatches( const std::vector< WORD > &phrase ); inline INDEX GetPosition( INDEX index ) const { return m_index[ index ]; } @@ -58,6 +66,17 @@ class SuffixArray inline WORD GetWord( INDEX position ) const { return m_vcb.GetWord( m_array[position] ); } + void UseDocument() { + m_useDocument = true; + } + INDEX GetDocument( INDEX sentence ) const; + void PrintDocumentName( INDEX document ) { + for(INDEX i=m_documentName[ document ]; m_documentNameBuffer[i] != 0; i++) { + std::cout << m_documentNameBuffer[ i ]; + } + } void Save(const std::string& fileName ) const; void Load(const std::string& fileName ); + void CheckAllocation(bool, const char *dataStructure) const; + bool Error( const char* message, const std::string& fileName) const; }; diff --git a/biconcor/TargetCorpus.cpp b/biconcor/TargetCorpus.cpp index 06468007f0..da35801c83 100644 --- a/biconcor/TargetCorpus.cpp +++ b/biconcor/TargetCorpus.cpp @@ -2,7 +2,7 @@ #include #include -#include +#include #include namespace diff --git a/biconcor/Vocabulary.cpp b/biconcor/Vocabulary.cpp index 9d52ee44ed..3879b451da 100644 --- a/biconcor/Vocabulary.cpp +++ b/biconcor/Vocabulary.cpp @@ -1,101 +1,101 @@ -// $Id: Vocabulary.cpp 1565 2008-02-22 14:42:01Z bojar $ -#include "Vocabulary.h" -#include - -namespace -{ - -const int MAX_LENGTH = 10000; - -} // namespace - -using namespace std; - -// as in beamdecoder/tables.cpp -vector Vocabulary::Tokenize( const char input[] ) -{ - vector< WORD_ID > token; - bool betweenWords = true; - int start=0; - int i=0; - for(; input[i] != '\0'; i++) { - bool isSpace = (input[i] == ' ' || input[i] == '\t'); - - if (!isSpace && betweenWords) { - start = i; - betweenWords = false; - } else if (isSpace && !betweenWords) { - token.push_back( StoreIfNew ( string( input+start, i-start ) ) ); - betweenWords = true; - } - } - if (!betweenWords) - token.push_back( StoreIfNew ( string( input+start, i-start ) ) ); - return token; -} - -WORD_ID Vocabulary::StoreIfNew( const WORD& word ) -{ - map::iterator i = lookup.find( word ); - - if( i != lookup.end() ) - return i->second; - - WORD_ID id = vocab.size(); - vocab.push_back( word ); - lookup[ word ] = id; - return id; -} - -WORD_ID Vocabulary::GetWordID( const WORD &word ) const -{ - map::const_iterator i = lookup.find( word ); - if( i == lookup.end() ) - return 0; - WORD_ID w= (WORD_ID) i->second; - return w; -} - -void Vocabulary::Save(const string& fileName ) const -{ - ofstream vcbFile; - vcbFile.open( fileName.c_str(), ios::out | ios::ate | ios::trunc); - - if (!vcbFile) { - cerr << "Failed to open " << vcbFile << endl; - exit(1); - } - - vector< WORD >::const_iterator i; - for(i = vocab.begin(); i != vocab.end(); i++) { - const string &word = *i; - vcbFile << word << endl; - } - vcbFile.close(); -} - -void Vocabulary::Load(const string& fileName ) -{ - ifstream vcbFile; - char line[MAX_LENGTH]; - vcbFile.open(fileName.c_str()); - - if (!vcbFile) { - cerr << "no such file or directory: " << vcbFile << endl; - exit(1); - } - - cerr << "loading from " << fileName << endl; - istream *fileP = &vcbFile; - int count = 0; - while(!fileP->eof()) { - SAFE_GETLINE((*fileP), line, MAX_LENGTH, '\n'); - if (fileP->eof()) break; - int length = 0; - for(; line[length] != '\0'; length++); - StoreIfNew( string( line, length ) ); - count++; - } - vcbFile.close(); - cerr << count << " word read, vocabulary size " << vocab.size() << endl; -} +// $Id: Vocabulary.cpp 1565 2008-02-22 14:42:01Z bojar $ +#include "Vocabulary.h" +#include + +namespace +{ + +const int MAX_LENGTH = 10000; + +} // namespace + +using namespace std; + +// as in beamdecoder/tables.cpp +vector Vocabulary::Tokenize( const char input[] ) +{ + vector< WORD_ID > token; + bool betweenWords = true; + int start=0; + int i=0; + for(; input[i] != '\0'; i++) { + bool isSpace = (input[i] == ' ' || input[i] == '\t'); + + if (!isSpace && betweenWords) { + start = i; + betweenWords = false; + } else if (isSpace && !betweenWords) { + token.push_back( StoreIfNew ( string( input+start, i-start ) ) ); + betweenWords = true; + } + } + if (!betweenWords) + token.push_back( StoreIfNew ( string( input+start, i-start ) ) ); + return token; +} + +WORD_ID Vocabulary::StoreIfNew( const WORD& word ) +{ + map::iterator i = lookup.find( word ); + + if( i != lookup.end() ) + return i->second; + + WORD_ID id = vocab.size(); + vocab.push_back( word ); + lookup[ word ] = id; + return id; +} + +WORD_ID Vocabulary::GetWordID( const WORD &word ) const +{ + map::const_iterator i = lookup.find( word ); + if( i == lookup.end() ) + return 0; + WORD_ID w= (WORD_ID) i->second; + return w; +} + +void Vocabulary::Save(const string& fileName ) const +{ + ofstream vcbFile; + vcbFile.open( fileName.c_str(), ios::out | ios::ate | ios::trunc); + + if (!vcbFile) { + cerr << "Failed to open " << fileName << endl; + exit(1); + } + + vector< WORD >::const_iterator i; + for(i = vocab.begin(); i != vocab.end(); i++) { + const string &word = *i; + vcbFile << word << endl; + } + vcbFile.close(); +} + +void Vocabulary::Load(const string& fileName ) +{ + ifstream vcbFile; + char line[MAX_LENGTH]; + vcbFile.open(fileName.c_str()); + + if (!vcbFile) { + cerr << "no such file or directory: " << fileName << endl; + exit(1); + } + + cerr << "loading from " << fileName << endl; + istream *fileP = &vcbFile; + int count = 0; + while(!fileP->eof()) { + SAFE_GETLINE((*fileP), line, MAX_LENGTH, '\n'); + if (fileP->eof()) break; + int length = 0; + for(; line[length] != '\0'; length++); + StoreIfNew( string( line, length ) ); + count++; + } + vcbFile.close(); + cerr << count << " word read, vocabulary size " << vocab.size() << endl; +} diff --git a/biconcor/phrase-lookup.cpp b/biconcor/phrase-lookup.cpp new file mode 100644 index 0000000000..84b17c0953 --- /dev/null +++ b/biconcor/phrase-lookup.cpp @@ -0,0 +1,134 @@ +#include "SuffixArray.h" +#include "../util/tokenize.hh" +#include + +using namespace std; + +size_t lookup( string ); +vector tokenize( const char input[] ); +SuffixArray suffixArray; + +int main(int argc, char* argv[]) +{ + // handle parameters + string query; + string fileNameSuffix; + string fileNameSource; + bool loadFlag = false; + bool saveFlag = false; + bool createFlag = false; + bool queryFlag = false; + bool querySentenceFlag = false; + + int stdioFlag = false; // receive requests from STDIN, respond to STDOUT + string info = "usage: biconcor\n\t[--load model-file]\n\t[--save model-file]\n\t[--create corpus]\n\t[--query string]\n\t[--stdio]\n"; + while(1) { + static struct option long_options[] = { + {"load", required_argument, 0, 'l'}, + {"save", required_argument, 0, 's'}, + {"create", required_argument, 0, 'c'}, + {"query", required_argument, 0, 'q'}, + {"query-sentence", required_argument, 0, 'Q'}, + {"document", required_argument, 0, 'd'}, + {"stdio", no_argument, 0, 'i'}, + {"stdio-sentence", no_argument, 0, 'I'}, + {0, 0, 0, 0} + }; + int option_index = 0; + int c = getopt_long (argc, argv, "l:s:c:q:Q:iId", long_options, &option_index); + if (c == -1) break; + switch (c) { + case 'l': + fileNameSuffix = string(optarg); + loadFlag = true; + break; + case 's': + fileNameSuffix = string(optarg); + saveFlag = true; + break; + case 'c': + fileNameSource = string(optarg); + createFlag = true; + break; + case 'q': + query = string(optarg); + queryFlag = true; + break; + case 'Q': + query = string(optarg); + querySentenceFlag = true; + break; + case 'i': + stdioFlag = true; + break; + case 'I': + stdioFlag = true; + querySentenceFlag = true; + break; + case 'd': + suffixArray.UseDocument(); + break; + default: + cerr << info; + exit(1); + } + } + + // check if parameter settings are legal + if (saveFlag && !createFlag) { + cerr << "error: cannot save without creating\n" << info; + exit(1); + } + if (saveFlag && loadFlag) { + cerr << "error: cannot load and save at the same time\n" << info; + exit(1); + } + if (!loadFlag && !createFlag) { + cerr << "error: neither load or create - i have no info!\n" << info; + exit(1); + } + + // get suffix array + if (createFlag) { + cerr << "will create\n"; + cerr << "corpus is in " << fileNameSource << endl; + suffixArray.Create( fileNameSource ); + if (saveFlag) { + suffixArray.Save( fileNameSuffix ); + cerr << "will save in " << fileNameSuffix << endl; + } + } + if (loadFlag) { + cerr << "will load from " << fileNameSuffix << endl; + suffixArray.Load( fileNameSuffix ); + } + + // do something with it + if (stdioFlag) { + while(true) { + string query; + if (getline(cin, query, '\n').eof()) { + return 0; + } + if (querySentenceFlag) { + vector< string > queryString = util::tokenize( query.c_str() ); + suffixArray.PrintSentenceMatches( queryString ); + } else { + cout << lookup( query ) << endl; + } + } + } else if (queryFlag) { + cout << lookup( query ) << endl; + } else if (querySentenceFlag) { + vector< string > queryString = util::tokenize( query.c_str() ); + suffixArray.PrintSentenceMatches( queryString ); + } + return 0; +} + +size_t lookup( string query ) +{ + cerr << "query is " << query << endl; + vector< string > queryString = util::tokenize( query.c_str() ); + return suffixArray.Count( queryString ); +} diff --git a/cgmanifest.json b/cgmanifest.json new file mode 100644 index 0000000000..36cc60cff2 --- /dev/null +++ b/cgmanifest.json @@ -0,0 +1,33 @@ +{ + "Registrations":[ + { + "component": { + "type": "git", + "git": { + "repositoryUrl": "https://github.com/moses-smt/mosesdecoder", + "commitHash": "78ca5f3cc5aa671a8a5d36c56452e217e6f00828" + } + } + }, + { + "component": { + "type": "git", + "git": { + "repositoryUrl": "https://git.code.sf.net/p/cmph/git", + "commitHash": "a250982ade093f4eed0552bbdd22dd7b0432007f" + } + } + }, + { + "Component": { + "Type": "other", + "Other": { + "Name": "xml-rpc-c", + "Version": "1.51.06", + "DownloadUrl": "https://sourceforge.net/projects/xmlrpc-c/files/Xmlrpc-c%20Super%20Stable/1.51.06/xmlrpc-c-1.51.06.tgz" + } + } + }, + ] +} + diff --git a/chk.tmp b/chk.tmp new file mode 100644 index 0000000000..9daeafb986 --- /dev/null +++ b/chk.tmp @@ -0,0 +1 @@ +test diff --git a/contrib/DIMwid/DIMputs.py b/contrib/DIMwid/DIMputs.py new file mode 100644 index 0000000000..03589c3b05 --- /dev/null +++ b/contrib/DIMwid/DIMputs.py @@ -0,0 +1,290 @@ +# -*- coding: utf-8 -*- + +import collections +import re + + +class DataInput(): + def __init__(self, file_name): + self.file = open(file_name, "r") + self.sentences = None + + + def read_phrase(self): + self.sentences = [] + sentence = None + span_reg = re.compile("\|[0-9]+-[0-9]+\|") + previous = "" + for line in self.file: + sentence = Single() + for word in line.split(): + if span_reg.match(word): + sentence.spans[tuple([int(i) for i in word.strip("|").split("-")])] = previous.strip() + previous = " " + else: + previous += word + " " + sentence.set_length() + self.sentences.append(sentence) + sentence.number = len(self.sentences) + + def read_syntax(self): + self.sentences = [] + sentence = None + number = -1 + for line in self.file: + if int(line.split()[2]) != number: + if sentence is not None: + sentence.set_length() + self.sentences.append(sentence) + sentence = Single() + sentence.number = int(line.split()[2]) + number = sentence.number + sentence.spans[tuple([int(i) for i in line.split()[3].strip(":[]").split("..")])] \ + = line.strip() + + if sentence is not None: + sentence.set_length() + self.sentences.append(sentence) + # = tuple([line.split(":")[1], line.split(":")[2], line.split(":")[3]]) + + + def read_syntax_cubes(self, cell_limit): + self.sentences = [] + sentence = None + number = -1 + new_item = False + for line in self.file: + if line.startswith("Chart Cell"): + pass # we dont care for those lines + elif line.startswith("---------"): + new_item = True + elif line.startswith("Trans Opt") and new_item is True: + new_item = False + if int(line.split()[2]) != number: + if sentence is not None: + sentence.set_length() + self.sentences.append(sentence) + sentence = Multiple() + sentence.number = int(line.split()[2]) + number = sentence.number + span = tuple([int(i) for i in line.split()[3].strip(":[]").split("..")]) + if len(sentence.spans[span]) < cell_limit: + sentence.spans[span].append(line.strip()) + if sentence is not None: + sentence.set_length() + self.sentences.append(sentence) + + def read_phrase_stack_flag(self, cell_limit): + self.sentences = [] + sentence = None + number = -1 + for line in self.file: + if len(line.split()) < 6: + pass +# elif re.match("recombined=[0-9]+", line.split()[6]): +# pass + else: + if int(line.split()[0]) != number: + if sentence is not None: + sentence.set_length() + self.sentences.append(sentence) + sentence = Multiple() + sentence.number = int(line.split()[0]) + number = sentence.number +# span = tuple([int(i) for i in line.split()[8].split("=")[1].split("-")]) + span = re.search(r"covered=([0-9]+\-[0-9]+)", line).expand("\g<1>") + # print span.expand("\g<1>") + span = tuple([int(i) for i in span.split("-")]) + if len(sentence.spans[span]) < cell_limit: + sentence.spans[span].append(line.strip()) + if sentence is not None: + sentence.set_length() + self.sentences.append(sentence) + + def read_phrase_stack_verbose(self, cell_limit): + self.sentences = [] + sentence = None + number = -1 + span_input = False + for line in self.file: + if line.startswith("Translating: "): + if sentence is not None: + sentence.set_length() + self.sentences.append(sentence) + + number += 1 + sentence = Multiple() + sentence.number = number + else: + if re.match("\[[A-Z,a-z,\ ]+;\ [0-9]+-[0-9]+\]", line): + span = tuple([int(i) for i in line.split(";")[1].strip().strip("]").split("-")]) + sentence.spans[span].append(line.strip()) + span_input = True +# print line, + elif span_input is True: + if line.strip() == "": + span_input = False +# print "X" + else: + if len(sentence.spans[span]) < cell_limit: + sentence.spans[span].append(line.strip()) +# print line, + if sentence is not None: + sentence.set_length() + self.sentences.append(sentence) + + + + def read_syntax_cube_flag(self, cell_limit): + self.sentences = [] + sentence = None + number = -1 + for line in self.file: + if len(line.split()) < 6: + pass + else: + if int(line.split()[0]) != number: + if sentence is not None: + sentence.set_length() + self.sentences.append(sentence) + sentence = Multiple() # + sentence.number = int(line.split()[0]) + number = sentence.number + span = re.search(r"\[([0-9]+)\.\.([0-9]+)\]", line).expand("\g<1> \g<2>") + span = tuple([int(i) for i in span.split()]) + if len(sentence.spans[span]) < cell_limit: + sentence.spans[span].append(line.strip()) + if sentence is not None: + sentence.set_length() + self.sentences.append(sentence) + + + def read_mbot(self, cell_limit): + self.sentences = [] + sentence = None + number = -1 + hypo = False + rule = False + popping = False + target = "" + source = "" + source_parent = "" + target_parent = "" + alignment = "" + for line in self.file: + if line.startswith("Translating:"): + if sentence is not None: + sentence.set_length() + self.sentences.append(sentence) + sentence = Multiple() + sentence.number = number + 1 + number = sentence.number + elif line.startswith("POPPING"): + popping = True + elif popping is True: + popping = False + span = tuple([int(i) for i in line.split()[1].strip("[").split("]")[0].split("..")]) + hypo = True + elif hypo is True: + if line.startswith("Target Phrases"): + target = line.split(":", 1)[1].strip() + + elif line.startswith("Alignment Info"): + alignment = line.split(":", 1)[1].strip() + if alignment == "": + alignment = "(1)" + + elif line.startswith("Source Phrase"): + source = line.split(":", 1)[1].strip() + + elif line.startswith("Source Left-hand-side"): + source_parent = line.split(":", 1)[1].strip() + + elif line.startswith("Target Left-hand-side"): + target_parent = line.split(":", 1)[1].strip() + + # Input stored: now begin translation into rule-format + alignment = re.sub(r"\([0-9]+\)", "||", alignment) + align_blocks = alignment.split("||")[:-1] + target = re.sub(r"\([0-9]+\)", "||", target) + target = [x.split() for x in target.split("||")][:-1] + source = source.split() + + for i in range(len(source)): + if source[i].isupper(): + source[i] = "[" + source[i] + "]" + for k in range(len(align_blocks)): + align_pairs = [tuple([int(y) for y in x.split("-")]) for x in align_blocks[k].split()] + for j in filter(lambda x: x[0] == i, align_pairs): + source[i] = source[i] + "[" + target[k][j[1]] + "]" + + for i in range(len(target)): + for j in range(len(target[i])): + align_pairs = [tuple([int(y) for y in x.split("-")]) for x in align_blocks[i].split()] + for k in filter(lambda x: x[1] == j, align_pairs): + target[i][j] = source[k[0]].split("]")[0] + "][" + target[i][j] + "]" + + + + target = " || ".join([" ".join(x) for x in target]) + " ||" + + source = " ".join(source) + source = source + " [" + source_parent + "]" + + tp = re.sub(r"\([0-9]+\)", "", target_parent).split() + for i in tp: + target = target.replace("||", " [" + i + "] !!", 1) + target = target.replace("!!", "||") + + rule = False + search_pattern = "||| " + source + " ||| " + target + "| --- ||| " + alignment + "|" + + sentence.spans[span].append(search_pattern) +# print search_pattern, span + if len(sentence.spans[span]) < cell_limit: + sentence.spans[span].append(search_pattern) + else: + pass + if sentence is not None: + sentence.set_length() + self.sentences.append(sentence) + + + + +class Single(): + def __init__(self): + self.number = None + self.spans = {} + self.length = None + + def set_length(self): + self.length = max([x[1] for x in self.spans.keys()]) + + def __str__(self): + number = str(self.number) + length = str(self.length) + spans = "\n" + for i in self.spans.keys(): + spans += str(i) + " - " + str(self.spans[i]) + "\n" + return str((number, length, spans)) + +class Multiple(): + def __init__(self): + self.number = None + self.spans = collections.defaultdict(list) + self.length = None + + def set_length(self): + self.length = max([x[1] for x in self.spans.keys()]) + + def __str__(self): + number = str(self.number) + length = str(self.length) + spans = "\n" + for i in self.spans.keys(): + spans += str(i) + " - " + str(self.spans[i]) + "\n" + return str((number, length, spans)) + + + diff --git a/contrib/DIMwid/DIMterface.py b/contrib/DIMwid/DIMterface.py new file mode 100644 index 0000000000..eef1adcbed --- /dev/null +++ b/contrib/DIMwid/DIMterface.py @@ -0,0 +1,381 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- + +from PyQt4 import QtCore, QtGui + +import DIMputs as my_DI + + + +class MainWindow(QtGui.QWidget): + updateSignal = QtCore.pyqtSignal() + def __init__(self, parent=None): + + + self.path = "" + self.cur_rein_num = 0 + self.data = None + self.format = "" + self.cell_limit = float("inf") + + super(MainWindow, self).__init__(parent) + + # upper buttons + pathLabel = QtGui.QLabel("Path:") + self.pathLabel = QtGui.QLabel(self.path) + self.pathLabel.setFrameStyle(QtGui.QFrame.StyledPanel | + QtGui.QFrame.Sunken) + self.pathLabel.setToolTip("Current File") + self.pathButton = QtGui.QPushButton("P&ath...") + self.pathButton.setToolTip("Set the item you want to inspect") + self.connect(self.pathButton, QtCore.SIGNAL("clicked()"), self.setPath) + + + # cell limit label and text field + cell_limit_label = QtGui.QLabel("Cell Limit:") + self.cell_limit_chooser = QtGui.QSpinBox() + self.cell_limit_chooser.setMaximum(99999) + cell_limit_label.setToolTip("Limits the number of elements per cell") + self.cell_limit_chooser.setToolTip("Set to zero to show all elements") + + # format drop down menu + self.format_drop = QtGui.QToolButton(self) + self.format_drop.setPopupMode(QtGui.QToolButton.MenuButtonPopup) + self.format_drop.setMenu(QtGui.QMenu(self.format_drop)) + self.format_drop.setText("Format") + + self.format_syntax = QtGui.QPushButton("Syntax") + self.format_phrase = QtGui.QPushButton("Phrase") + self.format_syntaxCube = QtGui.QPushButton("Syntax Cube (-Tall flag)") + self.format_phraseStackFlag = QtGui.QPushButton("Phrase Stack (search-graph)") + self.format_phraseStackVerbose = QtGui.QPushButton("Phrase Stack (verbose)") + self.format_syntaxCubeFlag = QtGui.QPushButton("Syntax Cube (search-graph)") + self.format_mbot = QtGui.QPushButton("MBOT") + + + format_action_syntax = QtGui.QWidgetAction(self.format_drop) + format_action_syntax.setDefaultWidget(self.format_syntax) + + format_action_phrase = QtGui.QWidgetAction(self.format_drop) + format_action_phrase.setDefaultWidget(self.format_phrase) + + format_action_syntaxCube = QtGui.QWidgetAction(self.format_drop) + format_action_syntaxCube.setDefaultWidget(self.format_syntaxCube) + + format_action_phraseStackFlag = QtGui.QWidgetAction(self.format_drop) + format_action_phraseStackFlag.setDefaultWidget(self.format_phraseStackFlag) + + format_action_phraseStackVerbose = QtGui.QWidgetAction(self.format_drop) + format_action_phraseStackVerbose.setDefaultWidget(self.format_phraseStackVerbose) + + format_action_syntaxCubeFlag = QtGui.QWidgetAction(self.format_drop) + format_action_syntaxCubeFlag.setDefaultWidget(self.format_syntaxCubeFlag) + + format_action_mbot = QtGui.QWidgetAction(self.format_drop) + format_action_mbot.setDefaultWidget(self.format_mbot) + + self.format_drop.menu().addAction(format_action_syntax) + self.format_drop.menu().addAction(format_action_phrase) + self.format_drop.menu().addAction(format_action_syntaxCube) + self.format_drop.menu().addAction(format_action_phraseStackFlag) + self.format_drop.menu().addAction(format_action_phraseStackVerbose) + self.format_drop.menu().addAction(format_action_syntaxCubeFlag) + self.format_drop.menu().addAction(format_action_mbot) + + + self.format_syntax.clicked.connect(self.set_format_syntax) + self.format_phrase.clicked.connect(self.set_format_phrase) + self.format_syntaxCube.clicked.connect(self.set_format_syntaxCube) + self.format_phraseStackFlag.clicked.connect(self.set_format_phraseStackFlag) + self.format_phraseStackVerbose.clicked.connect(self.set_format_phraseStackVerbose) + self.format_syntaxCubeFlag.clicked.connect(self.set_format_syntaxCubeFlag) + self.format_mbot.clicked.connect(self.set_format_mbot) + + + + # table + self.table_widget = HoverTable(self) + self.w = [] # future popup window + # self.table_widget = QtGui.QTableWidget(self) + + # lower buttons + self.buttonBox = QtGui.QDialogButtonBox() + self.sentence_spinbox = QtGui.QSpinBox(parent=self.buttonBox) + self.sentence_spinbox.setMaximum(999999) + + self.goto_button = self.buttonBox.addButton( + "&GoTo", QtGui.QDialogButtonBox.ActionRole) + self.next_button = self.buttonBox.addButton( + "&Next", QtGui.QDialogButtonBox.ActionRole) + self.prev_button = self.buttonBox.addButton( + "&Prev", QtGui.QDialogButtonBox.ActionRole) + self.next_button.clicked.connect(self.next_parse) + self.prev_button.clicked.connect(self.prev_parse) + self.goto_button.clicked.connect(self.cur_parse) + self.quit_button = self.buttonBox.addButton( + "&Quit", QtGui.QDialogButtonBox.ActionRole) + self.quit_button.clicked.connect( + QtCore.QCoreApplication.instance().quit) + + + + # Disable navigation buttons until data is loaded: see setPath for reactivation + self.goto_button.setDisabled(True) + self.next_button.setDisabled(True) + self.prev_button.setDisabled(True) + + + + + + # Layouting + + layout = QtGui.QVBoxLayout() + + topLayout = QtGui.QHBoxLayout() + topLayout.addWidget(self.format_drop) + topLayout.addWidget(cell_limit_label) + topLayout.addWidget(self.cell_limit_chooser) + self.cell_limit_chooser.valueChanged.connect(self.setCellLimit) + topLayout.addWidget(pathLabel) + topLayout.addWidget(self.pathLabel, 1) + topLayout.addWidget(self.pathButton) + + bottomLayout = QtGui.QHBoxLayout() + bottomLayout.addWidget(self.buttonBox) + + layout.addLayout(topLayout) + layout.addWidget(self.table_widget) + layout.addLayout(bottomLayout) + + self.sentence_spinbox.valueChanged.connect(self.set_cur_rein_num) + + self.setLayout(layout) + self.updateSignal.connect(self.update_table) + + QtCore.QObject.connect( + self.table_widget, + QtCore.SIGNAL("cellDoubleClicked(int, int)"), + self.popup) + + + def closeEvent(self, *args, **kwargs): + # reimplementation of the close-event for closing down everything + # when the main window is closed + QtCore.QCoreApplication.quit() + return QtGui.QWidget.closeEvent(self, *args, **kwargs) + + + def setCellLimit(self, value): + if value == 0: + value = float("inf") + self.cell_limit = value + + + def setPath(self): + path = QtGui.QFileDialog.getOpenFileName(self, + "Select File", self.pathLabel.text()) + if path: + self.goto_button.setDisabled(False) + self.prev_button.setDisabled(False) + self.next_button.setDisabled(False) + self.pathLabel.setText(QtCore.QDir.toNativeSeparators(path)) + self.path = unicode(path) + self.data = my_DI.DataInput(self.path) + try: + if self.format == "syntax": + self.data.read_syntax() + elif self.format == "phrase": + self.data.read_phrase() + elif self.format == "syntaxCube": + self.data.read_syntax_cubes(self.cell_limit) + elif self.format == "phraseStackFlag": + self.data.read_phrase_stack_flag(self.cell_limit) + elif self.format == "phraseStackVerbose": + self.data.read_phrase_stack_verbose(self.cell_limit) + elif self.format == "syntaxCubeFlag": + self.data.read_syntax_cube_flag(self.cell_limit) + elif self.format == "mbot": + self.data.read_mbot(self.cell_limit) + self.populate(0) + self.sentence_spinbox.setValue(0) + except (ValueError, IndexError) as exc: + self.error_dialog = QtGui.QDialog() + self.error_dialog.setModal(True) + layout = QtGui.QVBoxLayout() + text = QtGui.QLabel( + """Something went wrong when choosing your input format/file + \n""") + button = QtGui.QPushButton("Ok") + button.clicked.connect(self.error_dialog.close) + layout.addWidget(text) + layout.addWidget(button) + self.error_dialog.setLayout(layout) + self.error_dialog.show() + + + + def next_parse(self): + self.cur_rein_num += 1 + if self.cur_rein_num < 0: + self.cur_rein_num = len(self.data.sentences) + self.cur_rein_num + if self.cur_rein_num >= len(self.data.sentences): + self.cur_rein_num = 0 + self.sentence_spinbox.setValue(self.cur_rein_num) + self.populate(self.cur_rein_num) + + def prev_parse(self): + self.cur_rein_num -= 1 + if self.cur_rein_num < 0: + self.cur_rein_num = len(self.data.sentences) + self.cur_rein_num + if self.cur_rein_num >= len(self.data.sentences): + self.cur_rein_num = 0 + self.sentence_spinbox.setValue(self.cur_rein_num) + self.populate(self.cur_rein_num) + + def cur_parse(self): + if self.cur_rein_num >= len(self.data.sentences): + self.cur_rein_num = 0 + self.sentence_spinbox.setValue(self.cur_rein_num) + self.populate(self.cur_rein_num) + + + def set_cur_rein_num(self, value): + self.cur_rein_num = value # self.sentence_spinbox.value() + + def populate(self, cur_rein_num): + cur_sent = self.data.sentences[cur_rein_num] + nrows, ncols = cur_sent.length + 1, cur_sent.length + 1 + nrows, ncols = ncols, nrows # switcher + self.table_widget.setSortingEnabled(False) + self.table_widget.setRowCount(nrows) + self.table_widget.setColumnCount(ncols) + # for starting the numbering of the table at zero as the spans + self.table_widget.setHorizontalHeaderLabels([str(x) for x in range(ncols)]) + self.table_widget.setVerticalHeaderLabels([str(x) for x in range(nrows)]) + for i in range(nrows): + for j in range(ncols): + try: + # item = TableItem("%s:%s \n %s" + # % (i+1, j+1, cur_sent.spans[(i,j)])) + item = str(i) + ".." + str(j) + " \n" + if isinstance(cur_sent.spans[(i, j)], basestring): + item += cur_sent.spans[(i, j)] + "\n" + else: + for rule in cur_sent.spans[(i, j)]: + item += str(rule) + "\n" + if cur_sent.spans[(i, j)] == []: + if j - i < 0: + item = "" + else: + item = "-" + item = TableItem(item.decode("utf-8")) + + + except KeyError: + if j - i < 0: + item = QtGui.QTableWidgetItem("") + else: + item = QtGui.QTableWidgetItem("-") + self.table_widget.setItem(i, j, item) + self.table_widget.setColumnWidth(j, 40) +# self.connect( +# self.table_widget, QtCore.SIGNAL("itemDoubleClicked(QTableWidgetItem)"), +# self.popup) + + self.updateSignal.emit() + self.table_widget.setSortingEnabled(True) + + def update_table(self): + self.table_widget.sortItems(0, QtCore.Qt.DescendingOrder) + + + + + def set_format_syntax(self): + self.format = "syntax" + self.format_drop.setText("Syntax") + self.format_drop.menu().hide() + + def set_format_phrase(self): + self.format = "phrase" + self.format_drop.setText("Phrase") + self.format_drop.menu().hide() + + def set_format_syntaxCube(self): + self.format = "syntaxCube" + self.format_drop.setText("Syntax Cube (-Tall flag)") + self.format_drop.menu().hide() + + def set_format_phraseStackFlag(self): + self.format = "phraseStackFlag" + self.format_drop.setText("Phrase Stack (search-graph)") + self.format_drop.menu().hide() + + def set_format_phraseStackVerbose(self): + self.format = "phraseStackVerbose" + self.format_drop.setText("Phrase Stack (verbose)") + self.format_drop.menu().hide() + + def set_format_syntaxCubeFlag(self): + self.format = "syntaxCubeFlag" + self.format_drop.setText("Syntax Cube (search-graph)") + self.format_drop.menu().hide() + + def set_format_mbot(self): + self.format = "mbot" + self.format_drop.setText("MBOT") + self.format_drop.menu().hide() + + +# @QtCore.pyqtSlot(QtGui.QTableWidgetItem, result=QtCore.QObject) +# def popup(self, item): +# @pyqtSlot(int, int, result=QtCore.QObject) +# @pyqtSignature("popup(int int)") + def popup(self, r, c): +# """ C++: QObject popup(int, int) """ +# self.w = PopUpCell(item.text) + self.w.append(PopUpCell(self.table_widget.item(r, c).text())) + # self.w.setGeometry(QRect(100, 100, 400, 200)) + self.w[-1].show() + + +class HoverTable(QtGui.QTableWidget): + + def __init__(self, parent=None): + super(HoverTable, self).__init__(parent) + self.setMouseTracking(True) + self.horizontalHeader().setClickable(False) +# self.verticalHeader().setDefaultSectionSize(self.verticalHeader.fontMetrics().height()+2); + + + +class PopUpCell(QtGui.QWidget): + def __init__(self, cell_text): + QtGui.QWidget.__init__(self) + layout = QtGui.QHBoxLayout() + text_list = map(lambda x: x, cell_text.split("\n")) + wind_cont = QtGui.QTextEdit() # "
".join(text_list[1:])) + wind_cont.setReadOnly(True) + wind_cont.setWindowTitle(text_list[0]) + wind_cont.setPlainText(cell_text) # "\n".join(text_list)) + layout.addWidget(wind_cont) + self.setWindowTitle(text_list[0]) + self.setLayout(layout) + self.resize(960, 320) + + + + + +class TableItem(QtGui.QTableWidgetItem): + + def __init__(self, cell_text, type=1000): + super(TableItem, self).__init__(cell_text) + if len(cell_text.split("\n")) > 20: + self.setToolTip("\n".join(cell_text.split("\n")[:19])) + else: + self.setToolTip(cell_text) + self.cell_text = cell_text + + diff --git a/contrib/DIMwid/DIMwid.py b/contrib/DIMwid/DIMwid.py new file mode 100644 index 0000000000..ec256df444 --- /dev/null +++ b/contrib/DIMwid/DIMwid.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python +# -*- coding: utf-8 -*- +import sys +from PyQt4 import QtCore, QtGui + +import DIMterface as my_gui + + + +if __name__ == "__main__": + app = QtGui.QApplication(sys.argv) + wnd = my_gui.MainWindow() + wnd.resize(640, 480) + wnd.setWindowTitle("DIMwid") + wnd.show() + sys.exit(app.exec_()) diff --git a/contrib/DIMwid/LICENSE b/contrib/DIMwid/LICENSE new file mode 100644 index 0000000000..a966be879a --- /dev/null +++ b/contrib/DIMwid/LICENSE @@ -0,0 +1,20 @@ +The MIT License (MIT) + +Copyright (c) 2013 RobinQrtz + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/contrib/DIMwid/README.md b/contrib/DIMwid/README.md new file mode 100644 index 0000000000..ad580f14cc --- /dev/null +++ b/contrib/DIMwid/README.md @@ -0,0 +1,67 @@ +DIMwid + ====== + +DIMwid (Decoder Inspection for Moses using widgets) is a tool +presenting Moses' different chart/stack outputs in a readable tabular +view. + + +Installation +============ + +In order to run DIMwid you need to install PyQt, Qt 4.8 and Python +2.7. Other versions have not yet been tested. Linux/Unix users simply +install these packages using their package-manager or built them from +source. Windows can skip the installation of Qt since PyQt itself +does cover everything, except Python. + +Usage +===== + +Users are recommended to read the accompanying paper "DIMwid -- +Decoder Inspection for Moses (using Widgets)" appearing in PBML XY. + +DIMwid is able to read multiple decoder outputs of the Moses +translation system. These include the standard trace outputs for both +phrase- and syntax-based decoding, the search-graphs for both, the +"level 3 verbose" output for phrase-based and a special trace output +(available as a Moses fork at : +https://github.com/RobinQrtz/mosesdecoder) for all possible +translations for syntax-based decoding. + +After producing the outputs from Moses, start DIMwid by running +DIMwid.py and first select your format and after that your file. If +you have chosen the wrong file or format an error message will +appear. Otherwise you will see the first sentence. Cells can be +inspected by either double-clicking, opening a new window with the +full content, or hovering over the cell, showing a tooltip with the +first 20 lines of the cell's content. + +If needed, the user can restrict the number of rules per cell, using +the "Cell Limit" spinbox. + +Navigating through the sentences of the input file can be done by +either using the "Next" and "Prev" buttons, or choosing a certain +sentence number using the lower left spinbox and clicking the "GoTo" +button. + +Moses +===== + +Information about Moses can be found here: http://statmt.org/moses/ + +The used flags for the output are: + * -t for phrase-based trace + * -T for syntax-based trace + * -v 3 for phrase-based verbose level 3 + * -output-search-graph for both search graphs + * -Tall for the Moses fork's new feature + + +Trouble +======= + +If you are running into trouble using DIMwid or have suggestions for +improvements or new features email me at + +robin DOT qrtz AT gmail DOT com \ No newline at end of file diff --git a/contrib/arrow-pipelines/README b/contrib/arrow-pipelines/README index bfc96ff3ec..86f2128748 100644 --- a/contrib/arrow-pipelines/README +++ b/contrib/arrow-pipelines/README @@ -27,6 +27,7 @@ To use the PCL compiler and run-time set the following environment variables (as $ export PATH=$PATH:`pwd`/python/pcl/src/pclc:`pwd`/python/pcl/src/pcl-run $ export PYTHONPATH=$PYTHONPATH:`pwd`/python/pcl/libs/pypeline/src +$ export PCL_IMPORT_PATH=`pwd`/python/pcl/src/runtime:`pwd`/pcl Three environment variables need to be set before the pipeline can be run, they are: @@ -51,7 +52,7 @@ $ pcl-run.py training_pipeline Once complete the output of the pipeline can be found in the directories: - - test_data/tokenisation - - test_data/model - - test_data/lm - - test_data/mert + - training/tokenisation + - training/model + - training/lm + - training/mert diff --git a/contrib/arrow-pipelines/bash/training_pipeline.sh b/contrib/arrow-pipelines/bash/training_pipeline.sh new file mode 100755 index 0000000000..435236dec3 --- /dev/null +++ b/contrib/arrow-pipelines/bash/training_pipeline.sh @@ -0,0 +1,226 @@ +#!/bin/bash + +MOSES_HOME=/opt/moses +GIZA_HOME=${MOSES_HOME}/giza++-v1.0.7 +IRSTLM=${MOSES_HOME}/irstlm-5.70.04 + +function tokenise() { + local LANG="$1" + local FILENAME="$2" + local WORKING_DIR="$3" + local BASENAME="`basename ${FILENAME}`" + + if [ ! -f ${WORKING_DIR} ]; then + mkdir -p ${WORKING_DIR} + fi + + NEW_BASENAME=`echo ${BASENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) { printf a[i]; if (i ${TOKENISED_FILENAME} +} + +function cleanup() { + local SRC_FILENAME="$1" + local TGT_FILENAME="$2" + local SEGMENT_LENGTH="$3" + SRC_CLEANUP_FILENAME=`echo ${SRC_FILENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) { printf a[i]; if (i> ${SRC_CLEANUP_FILENAME} + echo "${TGT_LINE}" >> ${TGT_CLEANUP_FILENAME} + fi + done +} + +function data_split() { + local SRC_FILENAME="$1" + local TGT_FILENAME="$2" + declare -i DEV_SIZE="$3" + declare -i EVAL_SIZE="$4" + + SRC_TRAIN_FILENAME=`echo ${SRC_FILENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) { printf a[i]; if (i> ${SRC_DEVEL_FILENAME} + echo "${TGT_LINE}" >> ${TGT_DEVEL_FILENAME} + else + echo "${SRC_LINE}" >> ${SRC_EVAL_FILENAME} + echo "${TGT_LINE}" >> ${TGT_EVAL_FILENAME} + fi + else + echo "${SRC_LINE}" >> ${SRC_TRAIN_FILENAME} + echo "${TGT_LINE}" >> ${TGT_TRAIN_FILENAME} + fi + LINE_CNT=$(($LINE_CNT + 1)) + done +} + +function translation_model_train() { + declare -l TT_SRC_LANG="$1" + declare -l TT_TGT_LANG="$2" + local SRC_FILENAME="`realpath $3`" + local TGT_FILENAME="`realpath $4`" + local ALIGNMENT_METHOD="$5" + local REORDERING_METHOD="$6" + local WORKING_DIR="$7" + + declare -r SRC_CORPORA_NAME=`echo ${SRC_FILENAME} | gawk '{split($0, a, "."); for(i = 1; i < length(a); i++) { printf a[i]; if (i < length(a) - 1) { printf "."; } } }'` + declare -r TGT_CORPORA_NAME=`echo ${TGT_FILENAME} | gawk '{split($0, a, "."); for(i = 1; i < length(a); i++) { printf a[i]; if (i < length(a) - 1) { printf "."; } } }'` + + if [ "${SRC_CORPORA_NAME}" != "${TGT_CORPORA_NAME}" ]; then + echo "Arrrgh" + exit 1 + fi + + if [ -f ${WORKING_DIR} ]; then + rm -Rf ${WORKING_DIR} >& /dev/null + fi + mkdir -p ${WORKING_DIR} + WORKING_DIR=`realpath ${WORKING_DIR}` + + declare -r DUMMY_FILE="${WORKING_DIR}/dummy.lm" + echo "dummy lm file" > ${DUMMY_FILE} + + declare -r LOG_FILE="${WORKING_DIR}/log" + + ${MOSES_HOME}/scripts/training/train-model.perl -root-dir ${WORKING_DIR} -corpus ${SRC_CORPORA_NAME} -f ${TT_SRC_LANG} -e ${TT_TGT_LANG} -alignment ${ALIGNMENT_METHOD} -reordering ${REORDERING_METHOD} -lm 0:5:${DUMMY_FILE}:0 -external-bin-dir ${GIZA_HOME} 2> ${LOG_FILE} + + MOSES_INI_FILE="${WORKING_DIR}/model/moses.ini" +} + +function language_model_train() { + local FILENAME="$1" + local SMOOTHING_METHOD="$2" + local WORKING_DIR="$3" + + if [ ! -f ${WORKING_DIR} ]; then + mkdir -p ${WORKING_DIR} + fi + + declare -r BASENAME=`basename ${FILENAME}` + declare -r START_END_OUTPUT_FILENAME=${WORKING_DIR}/`echo ${BASENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) {if(i == 3) { printf "sb."; } else { printf a[i]; if (i < length(a) - 1) { printf "."; } } } }'` + declare -r LM_FILENAME=${WORKING_DIR}/`echo ${BASENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) {if(i == 3) { printf "lm."; } else { printf a[i]; if (i < length(a) - 1) { printf "."; } } } }'` + COMPILED_LM_FILENAME=${WORKING_DIR}/`echo ${BASENAME} | gawk '{split($0, a, "."); for(i = 1; i <= length(a); i++) {if(i == 3) { printf "arpa."; } else { printf a[i]; if (i < length(a) - 1) { printf "."; } } } }'` + + export IRSTLM + + ${IRSTLM}/bin/add-start-end.sh < ${FILENAME} > ${START_END_OUTPUT_FILENAME} + + declare -r TMP_DIR=`mktemp -dp /tmp` + ${IRSTLM}/bin/build-lm.sh -i ${START_END_OUTPUT_FILENAME} -t ${TMP_DIR} -p -s ${SMOOTHING_METHOD} -o ${LM_FILENAME} + if [ -f ${TMP_DIR} ]; then + rm -Rf ${TMP_DIR} >& /dev/null + fi + + ${IRSTLM}/bin/compile-lm --text yes ${LM_FILENAME}.gz ${COMPILED_LM_FILENAME} +} + +function mert() { + local MOSES_INI_FILENAME="`realpath $1`" + local COMPILED_LM_FILENAME="`realpath $2`" + local EVAL_FILENAME="$3" + declare -lr _SRC_LANG="$4" + declare -lr _TGT_LANG="$5" + declare -ri MODEL_ORDER="$6" + declare -ri MODEL_TYPE="$7" + local WORKING_DIR="$8" + declare -ri MAX_NO_ITERS="$9" + + local INFILENAME=`realpath ${EVAL_FILENAME}` + INFILENAME=`echo ${INFILENAME} | gawk '{split($0, a, "."); for(i = 1; i < length(a); i++) { printf a[i]; if (i < length(a) - 1) { printf "."; } } }'` + + if [ ! -f ${MOSES_INI_FILENAME} ]; then + echo "${MOSES_INI_FILENAME} does not exist." + exit 1 + fi + + if [ -f ${WORKING_DIR} ]; then + rm -Rf ${WORKING_DIR} >& /dev/null + fi + mkdir -p ${WORKING_DIR} + + WORKING_DIR=`realpath ${WORKING_DIR}` + MERT_INI_FILENAME="${WORKING_DIR}/trained-moses.ini" + local SED_PROG="/\[lmodel-file\]/,/^[[:space:]]*\$/c\[lmodel-file\]\n${MODEL_TYPE} 0 ${MODEL_ORDER} ${COMPILED_LM_FILENAME}\n" + eval cat ${MOSES_INI_FILENAME} | sed "${SED_PROG}" > ${MERT_INI_FILENAME} + + ${MOSES_HOME}/scripts/training/mert-moses.pl --maximum-iterations ${MAX_NO_ITERS} --mertdir ${MOSES_HOME}/bin --working-dir ${WORKING_DIR} ${INFILENAME}.${_SRC_LANG} ${INFILENAME}.${_TGT_LANG} ${MOSES_HOME}/bin/moses ${MERT_INI_FILENAME} 2> ${WORKING_DIR}/log +} + + +if [ $# -lt 4 ]; then + echo "`basename $0` usage:" + echo " `basename $0` src_file tgt_file src_lang tgt_lang" + echo + exit 1 +fi + +declare -r SRC_LANG="$3" +declare -r TGT_LANG="$4" + +# Tokenise +tokenise "${SRC_LANG}" "$1" "training/tokeniser" +declare -r SRC_TOKENISED_FILENAME="${TOKENISED_FILENAME}" + +tokenise "${TGT_LANG}" "$2" "training/tokeniser" +declare -r TGT_TOKENISED_FILENAME="${TOKENISED_FILENAME}" + +echo ${SRC_TOKENISED_FILENAME} +echo ${TGT_TOKENISED_FILENAME} + +# Cleanup +cleanup "${SRC_TOKENISED_FILENAME}" "${TGT_TOKENISED_FILENAME}" 20 + +echo ${SRC_CLEANUP_FILENAME} +echo ${TGT_CLEANUP_FILENAME} + +# Data split: src, tgt, dev size, eval size +data_split "${SRC_CLEANUP_FILENAME}" "${TGT_CLEANUP_FILENAME}" 1000 500 + +echo ${SRC_TRAIN_FILENAME} +echo ${TGT_TRAIN_FILENAME} +echo ${SRC_DEVEL_FILENAME} +echo ${TGT_DEVEL_FILENAME} +echo ${SRC_EVAL_FILENAME} +echo ${TGT_EVAL_FILENAME} + +# Train the translation model +translation_model_train "${SRC_LANG}" "${TGT_LANG}" "${SRC_DEVEL_FILENAME}" "${TGT_DEVEL_FILENAME}" "grow-diag-final-and" "msd-bidirectional-fe" "training/model" + +declare -r MOSES_TT_INI_FILENAME="${MOSES_INI_FILE}" +echo ${MOSES_TT_INI_FILENAME} + +# Language model training +language_model_train "${TGT_TOKENISED_FILENAME}" "improved-kneser-ney" "training/lm" + +echo ${COMPILED_LM_FILENAME} + +# MERT +mert "${MOSES_TT_INI_FILENAME}" "${COMPILED_LM_FILENAME}" "${SRC_EVAL_FILENAME}" "${SRC_LANG}" "${TGT_LANG}" 3 9 "training/mert" 1 + +echo ${MERT_INI_FILENAME} diff --git a/contrib/arrow-pipelines/pcl/components/Makefile b/contrib/arrow-pipelines/pcl/components/Makefile index ce3035b8bb..c0aa0f886b 100644 --- a/contrib/arrow-pipelines/pcl/components/Makefile +++ b/contrib/arrow-pipelines/pcl/components/Makefile @@ -1,9 +1,10 @@ CC = pclc.py -CFLAGS=-i +CFLAGS = -i SOURCES = src_trg_tokeniser.pcl translation_model_training.pcl OBJS = $(SOURCES:.pcl=.py) +SUBDIRS = wrappers -all: build +all: subdirs build build: $(OBJS) @@ -11,4 +12,13 @@ build: $(OBJS) $(CC) $(CFLAGS) $< clean: + for dir in $(SUBDIRS); do \ + $(MAKE) -C $$dir clean; \ + done rm -f *.py *.pyc *.log *~ + +subdirs: + for dir in $(SUBDIRS); do \ + $(MAKE) -C $$dir ; \ + done + diff --git a/contrib/arrow-pipelines/pcl/components/src_trg_tokeniser.pcl b/contrib/arrow-pipelines/pcl/components/src_trg_tokeniser.pcl index 9a0cd4c2e6..462b43d2a4 100644 --- a/contrib/arrow-pipelines/pcl/components/src_trg_tokeniser.pcl +++ b/contrib/arrow-pipelines/pcl/components/src_trg_tokeniser.pcl @@ -25,16 +25,16 @@ component src_trg_tokeniser tokeniser.moses.installation declare src_tokeniser := new tokeniser with - tokeniser.src.language -> language, - tokeniser.src.tokenisation_dir -> tokenisation_dir, - tokeniser.moses.installation -> moses_installation_dir + tokeniser.src.language -> corpus.language, + tokeniser.src.tokenisation_dir -> working.directory.root, + tokeniser.moses.installation -> moses.installation trg_tokeniser := new tokeniser with - tokeniser.trg.language -> language, - tokeniser.trg.tokenisation_dir -> tokenisation_dir, - tokeniser.moses.installation -> moses_installation_dir + tokeniser.trg.language -> corpus.language, + tokeniser.trg.tokenisation_dir -> working.directory.root, + tokeniser.moses.installation -> moses.installation as - wire (src_filename -> filename), - (trg_filename -> filename) >>> + wire (src_filename -> corpus.filename), + (trg_filename -> corpus.filename) >>> (src_tokeniser *** trg_tokeniser) >>> - wire (tokenised_filename -> tokenised_src_filename), - (tokenised_filename -> tokenised_trg_filename) + wire (corpus.tokenised.filename -> tokenised_src_filename), + (corpus.tokenised.filename -> tokenised_trg_filename) diff --git a/contrib/arrow-pipelines/pcl/components/wrappers/Makefile b/contrib/arrow-pipelines/pcl/components/wrappers/Makefile new file mode 100644 index 0000000000..16c8744b6e --- /dev/null +++ b/contrib/arrow-pipelines/pcl/components/wrappers/Makefile @@ -0,0 +1,14 @@ +SUBDIRS = tokenizer + +all: subdirs + +clean: + for dir in $(SUBDIRS); do \ + $(MAKE) -C $$dir clean; \ + done + +subdirs: + for dir in $(SUBDIRS); do \ + $(MAKE) -C $$dir ; \ + done + diff --git a/contrib/arrow-pipelines/pcl/components/wrappers/mert/mert.py b/contrib/arrow-pipelines/pcl/components/wrappers/mert/mert.py index 4564da9407..b30bbf5958 100644 --- a/contrib/arrow-pipelines/pcl/components/wrappers/mert/mert.py +++ b/contrib/arrow-pipelines/pcl/components/wrappers/mert/mert.py @@ -15,7 +15,8 @@ def get_outputs(): def get_configuration(): return ['source_language', 'target_language', - 'moses_installation_dir', 'mert_working_directory'] + 'moses_installation_dir', 'mert_working_directory', + 'mert_max_no_iterations'] def configure(args): result = {} @@ -23,6 +24,7 @@ def configure(args): result['trg_lang'] = args['target_language'] result['moses_installation_dir'] = args['moses_installation_dir'] result['mert_working_dir'] = args['mert_working_directory'] + result['max_no_iterations'] = args['mert_max_no_iterations'] return result def initialise(config): @@ -32,6 +34,7 @@ def process(a, s): lm_file = os.path.abspath(a['trg_language_model_filename']) lm_order = int(a['trg_language_model_order']) lm_type = int(a['trg_language_model_type']) + max_no_iters = int(config['max_no_iterations']) orig_moses_ini = os.path.abspath(a['moses_ini_filename']) if not os.path.exists(orig_moses_ini): @@ -59,7 +62,7 @@ def process(a, s): os.system(cmd) #the command - cmd = '%(mert_perl)s --mertdir %(bin_dir)s --working-dir %(workdir)s %(src_file)s %(ref_file)s %(moses_bin)s %(moses_ini)s 2> %(logfile)s' + cmd = '%(mert_perl)s --maximum-iterations %(max_no_iters)d --mertdir %(bin_dir)s --working-dir %(workdir)s %(src_file)s %(ref_file)s %(moses_bin)s %(moses_ini)s 2> %(logfile)s' cmd = cmd % locals() pipe = subprocess.Popen(cmd, stdin = subprocess.PIPE, stdout = subprocess.PIPE, shell=True) diff --git a/contrib/arrow-pipelines/pcl/components/wrappers/tokenizer/Makefile b/contrib/arrow-pipelines/pcl/components/wrappers/tokenizer/Makefile new file mode 100644 index 0000000000..50762bf8a8 --- /dev/null +++ b/contrib/arrow-pipelines/pcl/components/wrappers/tokenizer/Makefile @@ -0,0 +1,15 @@ +CC = pclc.py +CFLAGS = -i +SOURCES = tokenizer.pcl +OBJS = $(SOURCES:.pcl=.py) + +all: build + +build: $(OBJS) + +%.py: %.pcl + $(CC) $(CFLAGS) $< + +clean: + rm -f *.py *.pyc *.log *~ + diff --git a/contrib/arrow-pipelines/pcl/components/wrappers/tokenizer/tokenizer.cfg b/contrib/arrow-pipelines/pcl/components/wrappers/tokenizer/tokenizer.cfg index 62d0c3a630..a377aef4e0 100644 --- a/contrib/arrow-pipelines/pcl/components/wrappers/tokenizer/tokenizer.cfg +++ b/contrib/arrow-pipelines/pcl/components/wrappers/tokenizer/tokenizer.cfg @@ -1,7 +1,7 @@ [Configuration] -language = en -tokenisation_dir = tokenised -moses_installation_dir = /opt/moses +corpus.language = en +working.directory.root = tokenised +moses.installation = /opt/moses [Inputs] -filename = test_data/test.en +corpus.filename = test_data/test.en diff --git a/contrib/arrow-pipelines/pcl/components/wrappers/tokenizer/tokenizer.pcl b/contrib/arrow-pipelines/pcl/components/wrappers/tokenizer/tokenizer.pcl new file mode 100644 index 0000000000..04b9dd9fa7 --- /dev/null +++ b/contrib/arrow-pipelines/pcl/components/wrappers/tokenizer/tokenizer.pcl @@ -0,0 +1,38 @@ +import pcl.io.file as file +import pcl.os.path as path +import pcl.system.process as process +import pcl.util.list as list +import pcl.util.string as string + +component tokenizer + input corpus.filename + output corpus.tokenised.filename + configuration corpus.language, working.directory.root, moses.installation + do + language <- string.lower(@corpus.language) + + corpus.file.basename <- path.basename(corpus.filename) + corpus.file.basename.bits <- string.split(corpus.file.basename, ".") + list.insert(corpus.file.basename.bits, -1, "tok") + result.basename <- string.join(corpus.file.basename.bits, ".") + result.pathname <- path.join(@working.directory.root, result.basename) + + working.exists <- path.exists(@working.directory.root) + if working.exists == False then + path.makedirs(@working.directory.root) + return () + else + return () + endif + + tokeniser.cmd <- path.join(@moses.installation, "scripts", + "tokenizer", "tokenizer.perl") + tokeniser.cmd.line <- list.cons(tokeniser.cmd, "-l", language, "-q") + + corpus.file <- file.openFile(corpus.filename, "r") + result.file <- file.openFile(result.pathname, "w") + process.callAndCheck(tokeniser.cmd.line, corpus.file, result.file) + file.closeFile(result.file) + file.closeFile(corpus.file) + + return corpus.tokenised.filename <- result.pathname diff --git a/contrib/arrow-pipelines/pcl/components/wrappers/tokenizer/tokenizer.py b/contrib/arrow-pipelines/pcl/components/wrappers/tokenizer/tokenizer.py deleted file mode 100644 index 5e8e970b1e..0000000000 --- a/contrib/arrow-pipelines/pcl/components/wrappers/tokenizer/tokenizer.py +++ /dev/null @@ -1,60 +0,0 @@ -import sys, os, subprocess - - -class BatchTokenizer(object): - def __init__(self, language, working_dir, moses_installation_dir): - # Ensure the perl tokenizer is exists - self.__tokeniser = os.path.join(moses_installation_dir, - 'scripts', - 'tokenizer', - 'tokenizer.perl') - if not os.path.exists(self.__tokeniser): - raise Exception("Perl tokenizer does not exist at [%s]" % self.__tokeniser) - - self.__working_dir = working_dir - if not os.path.exists(self.__working_dir): - os.makedirs(self.__working_dir) - - self.__language = language - - def tokenise(self, filename): - basefilename = os.path.basename(filename) - bits = basefilename.split(".") - bits.insert(-1, "tok") - basefilename = ".".join(bits) - outfilename = os.path.join(self.__working_dir, basefilename) - cmd = '%s -q -l %s < %s > %s' % (self.__tokeniser, self.__language, filename, outfilename) - pipe = subprocess.Popen(cmd, stdin = subprocess.PIPE, stdout = subprocess.PIPE, shell=True) - pipe.wait() - - return outfilename - -def get_name(): - return 'tokeniser' - -def get_inputs(): - return ['filename'] - -def get_outputs(): - return ['tokenised_filename'] - -def get_configuration(): - return ['language', - 'tokenisation_dir', - 'moses_installation_dir'] - -def configure(args): - return {'language' : args['language'], - 'tokenisation_dir' : args['tokenisation_dir'], - 'moses_installation_dir' : args['moses_installation_dir']} - -def initialise(config): - tokenizer = BatchTokenizer(config['language'], - config['tokenisation_dir'], - config['moses_installation_dir']) - - def process(a, s): - tokenised_filename = tokenizer.tokenise(a['filename']) - return {'tokenised_filename' : tokenised_filename} - - return process diff --git a/contrib/arrow-pipelines/pcl/training_pipeline.cfg b/contrib/arrow-pipelines/pcl/training_pipeline.cfg index 4ebdd76501..9e1570cbc8 100644 --- a/contrib/arrow-pipelines/pcl/training_pipeline.cfg +++ b/contrib/arrow-pipelines/pcl/training_pipeline.cfg @@ -7,14 +7,15 @@ corpus_evaluation_size = 500 alignment_method = grow-diag-final-and reordering_method = msd-bidirectional-fe smoothing_method = improved-kneser-ney -tokenisation_directory = test_data/tokenisation -translation_model_directory = test_data/model -language_model_directory = test_data/lm -mert_directory = test_data/mert +tokenisation_directory = training/tokenisation +translation_model_directory = training/model +language_model_directory = training/lm +mert_directory = training/mert +mert_max_no_iterations = 10 moses_installation_directory = $(MOSES_HOME) giza_installation_directory = $(GIZA_HOME) irstlm_installation_directory = $(IRSTLM) [Inputs] -src_filename = test_data/cleantrain.en -trg_filename = test_data/cleantrain.lt +src_filename = ../test_data/cleantrain.en +trg_filename = ../test_data/cleantrain.lt diff --git a/contrib/arrow-pipelines/pcl/training_pipeline.pcl b/contrib/arrow-pipelines/pcl/training_pipeline.pcl index 49fb634092..f8361b3535 100644 --- a/contrib/arrow-pipelines/pcl/training_pipeline.pcl +++ b/contrib/arrow-pipelines/pcl/training_pipeline.pcl @@ -46,6 +46,7 @@ component training_pipeline translation_model_directory, language_model_directory, mert_directory, + mert_max_no_iterations, moses_installation_directory, giza_installation_directory, irstlm_installation_directory @@ -75,7 +76,8 @@ component training_pipeline source_language -> source_language, target_language -> target_language, moses_installation_directory -> moses_installation_dir, - mert_directory -> mert_working_directory + mert_directory -> mert_working_directory, + mert_max_no_iterations -> mert_max_no_iterations as # Split and transform the input to the tokeniser component # Inputs: src_filename, trg_filename diff --git a/contrib/arrow-pipelines/python/pcl b/contrib/arrow-pipelines/python/pcl index 1315185203..e33ae59b40 160000 --- a/contrib/arrow-pipelines/python/pcl +++ b/contrib/arrow-pipelines/python/pcl @@ -1 +1 @@ -Subproject commit 1315185203a90b6f80acf2e47b4ea85b420b0d4c +Subproject commit e33ae59b40a6e17fe60e436b3795f0bc559fa8b8 diff --git a/contrib/arrow-pipelines/pcl/test_data/cleantrain.en b/contrib/arrow-pipelines/test_data/cleantrain.en similarity index 100% rename from contrib/arrow-pipelines/pcl/test_data/cleantrain.en rename to contrib/arrow-pipelines/test_data/cleantrain.en diff --git a/contrib/arrow-pipelines/pcl/test_data/cleantrain.lt b/contrib/arrow-pipelines/test_data/cleantrain.lt similarity index 100% rename from contrib/arrow-pipelines/pcl/test_data/cleantrain.lt rename to contrib/arrow-pipelines/test_data/cleantrain.lt diff --git a/contrib/c++tokenizer/Jamfile b/contrib/c++tokenizer/Jamfile new file mode 100644 index 0000000000..dd53bc8d11 --- /dev/null +++ b/contrib/c++tokenizer/Jamfile @@ -0,0 +1,13 @@ + +with-re2 = [ option.get "with-re2" ] ; +if $(with-re2) { + lib re2 : : $(with-re2)/lib ; + external-lib glib-2.0 ; + glib-cflags = [ _shell "pkg-config --cflags glib-2.0" ] ; + includes += $(with-re2)/include ; + exe tokenizer : tokenizer.cpp tokenizer_main.cpp Parameters.cpp re2 glib-2.0 : -std=c++0x $(glib-cflags) $(includes) ; +} +else { + alias tokenizer ; +} + diff --git a/contrib/c++tokenizer/Parameters.cpp b/contrib/c++tokenizer/Parameters.cpp new file mode 100644 index 0000000000..9a3e93c2be --- /dev/null +++ b/contrib/c++tokenizer/Parameters.cpp @@ -0,0 +1,39 @@ +#include "Parameters.h" + +#ifdef TOKENIZER_NAMESPACE +namespace TOKENIZER_NAMESPACE { +#endif + +Parameters::Parameters() +: nthreads(0) +, chunksize(2000) +, cfg_path(0) +, verbose_p(false) +, detag_p(false) +, alltag_p(false) +, entities_p(false) +, escape_p(false) +, aggro_p(false) +, supersub_p(false) +, url_p(true) +, downcase_p(false) +, normalize_p(false) +, penn_p(false) +, words_p(false) +, denumber_p(false) +, narrow_latin_p(false) +, narrow_kana_p(false) +, refined_p(false) +, unescape_p(false) +, drop_bad_p(false) +, split_p(false) +, notokenization_p(false) +, para_marks_p(false) +, split_breaks_p(false) +{ +} + +#ifdef TOKENIZER_NAMESPACE +} +#endif + diff --git a/contrib/c++tokenizer/Parameters.h b/contrib/c++tokenizer/Parameters.h new file mode 100644 index 0000000000..e44e596780 --- /dev/null +++ b/contrib/c++tokenizer/Parameters.h @@ -0,0 +1,51 @@ +#pragma once + +#include +#include + +#ifdef TOKENIZER_NAMESPACE +namespace TOKENIZER_NAMESPACE { +#endif + +struct Parameters +{ + std::string lang_iso; + std::vector args; + std::string out_path; + int nthreads; + int chunksize; + const char *cfg_path; + bool verbose_p; + bool detag_p; + bool alltag_p; + bool entities_p; + bool escape_p; + bool aggro_p; + bool supersub_p; + bool url_p; + bool downcase_p; + bool normalize_p; + bool penn_p; + bool words_p; + bool denumber_p; + bool narrow_latin_p; + bool narrow_kana_p; + bool refined_p; + bool unescape_p; + bool drop_bad_p; + bool split_p; + bool notokenization_p; + bool para_marks_p; + bool split_breaks_p; + + Parameters(); + + Parameters(const Parameters& _); +}; + + +#ifdef TOKENIZER_NAMESPACE +} +#endif + + diff --git a/contrib/c++tokenizer/tokenizer.cpp b/contrib/c++tokenizer/tokenizer.cpp new file mode 100644 index 0000000000..6d3dd70460 --- /dev/null +++ b/contrib/c++tokenizer/tokenizer.cpp @@ -0,0 +1,2246 @@ +#include "tokenizer.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace { // anonymous namespace + +// frequently used regexp's are pre-compiled thus: + +RE2 genl_tags_x("<[/!\\p{L}]+[^>]*>"); +RE2 mult_spc_x(" +"); // multiple spaces +RE2 tag_line_x("^<.+>$"); // lines beginning and ending with open/close angle-bracket pairs +RE2 white_line_x("^\\s*$"); // lines entirely composed of whitespace +RE2 slash_x("([\\p{L}\\p{N}])(/)([\\p{L}\\p{N}])"); // and slash-conjoined " " +RE2 final_x("([^.])([.])([\\]\\)}>\"']*) ?$"); // sentence-final punctuation sequence (non qm em) +RE2 qx_x("([?!])"); // one qm/em mark +RE2 braces_x("([\\]\\[\\(\\){}<>])"); // any open or close of a pair +RE2 endq_x("([^'])' "); // post-token single-quote or doubled single-quote +RE2 letter_x("\\p{L}"); // a letter +RE2 lower_x("^\\p{Ll}"); // a lower-case letter +RE2 sinteger_x("^\\p{N}"); // not a digit mark +RE2 numprefixed_x("[-+/.@\\\\#\\%&\\p{Sc}\\p{N}]*[\\p{N}]+-[-'`\"\\p{L}]*\\p{L}"); +RE2 quasinumeric_x("[-.;:@\\\\#\%&\\p{Sc}\\p{So}\\p{N}]*[\\p{N}]+"); +RE2 numscript_x("([\\p{N}\\p{L}])([\\p{No}]+)(\\p{Ll})"); + +RE2 x1_v_d("([ ([{<])\""); // a valid non-letter preceeding a double-quote +RE2 x1_v_gg("([ ([{<])``"); // a valid non-letter preceeding directional doubled open single-quote +RE2 x1_v_g("([ ([{<])`([^`])"); // a valid non-letter preceeding directional unitary single-quote +RE2 x1_v_q("([ ([{<])'"); // a valid non-letter preceeding undirected embedded quotes +RE2 ndndcomma_x("([^\\p{N}]),([^\\p{N}])"); // non-digit,non-digit +RE2 pdndcomma_x("([\\p{N}]),([^\\p{N}])"); // digit,non-digit +RE2 ndpdcomma_x("([^\\p{N}]),([\\p{N}])"); // non-digit,digit +RE2 symbol_x("([;:@\\#\\$%&\\p{Sc}\\p{So}])"); // usable punctuation mark not a quote or a brace +RE2 contract_x("'([sSmMdD]) "); // english single letter contraction forms, as embedded +RE2 right_x("[({¿¡]+"); // symbols which conjoin to the right +RE2 left_x("[,.?!:;\\%\\p{Sc}})]+"); // symbols conjoin to the left +RE2 curr_en_x("^[Nn]?[\'][\\p{L}]"); // english contraction suffixes conjoin to the left +RE2 pre_en_x(".*[\\p{L}\\p{N}]+$"); // valid english contraction prefixes +RE2 curr_fr_x(".*[\\p{L}\\p{N}]+[\']"); // french/italian contraction prefixes conjoin to the right +RE2 post_fr_x("^[\\p{L}\\p{N}]*"); // valid french/italian contraction suffixes +// anything rarely used will just be given as a string and compiled on demand by RE2 + +const char * +SPC_BYTE = " "; +//const char * +//URL_VALID_SYM_CHARS = "-._~:/?#[]@!$&'()*+,;="; + +inline bool +class_follows_p(gunichar *s, gunichar *e, GUnicodeType gclass) { + while (s < e) { + GUnicodeType tclass = g_unichar_type(*s); + if (tclass == gclass) + return true; + switch (tclass) { + case G_UNICODE_SPACING_MARK: + case G_UNICODE_LINE_SEPARATOR: + case G_UNICODE_PARAGRAPH_SEPARATOR: + case G_UNICODE_SPACE_SEPARATOR: + ++s; + continue; + break; + default: + return false; + } + } + return false; +} + + +const char *ESCAPE_MOSES[] = { + "|", // | 0 + "[", // [ 1 + "]", // ] 2 + "&", // & 3 (26) + "<", // < 4 (3c) + ">", // > 5 (3e) + "'", // ' 6 (27) + """, // " 7 (22) +}; + +const std::set +ESCAPE_SET = { + std::string(ESCAPE_MOSES[0]), + std::string(ESCAPE_MOSES[1]), + std::string(ESCAPE_MOSES[2]), + std::string(ESCAPE_MOSES[3]), + std::string(ESCAPE_MOSES[4]), + std::string(ESCAPE_MOSES[5]), + std::string(ESCAPE_MOSES[6]), + std::string(ESCAPE_MOSES[7]), +}; + +const std::map +ENTITY_MAP = { + { std::wstring(L"""), L'"' }, + { std::wstring(L"&"), L'&' }, + { std::wstring(L"'"), L'\'' }, + { std::wstring(L"<"), L'<' }, + { std::wstring(L">"), L'>' }, + { std::wstring(L" "), L'\u00A0' }, + { std::wstring(L"¡"), L'\u00A1' }, + { std::wstring(L"¢"), L'\u00A2' }, + { std::wstring(L"£"), L'\u00A3' }, + { std::wstring(L"¤"), L'\u00A4' }, + { std::wstring(L"¥"), L'\u00A5' }, + { std::wstring(L"¦"), L'\u00A6' }, + { std::wstring(L"§"), L'\u00A7' }, + { std::wstring(L"¨"), L'\u00A8' }, + { std::wstring(L"©"), L'\u00A9' }, + { std::wstring(L"ª"), L'\u00AA' }, + { std::wstring(L"«"), L'\u00AB' }, + { std::wstring(L"¬"), L'\u00AC' }, + { std::wstring(L"­"), L'\u00AD' }, + { std::wstring(L"®"), L'\u00AE' }, + { std::wstring(L"¯"), L'\u00AF' }, + { std::wstring(L"°"), L'\u00B0' }, + { std::wstring(L"±"), L'\u00B1' }, + { std::wstring(L"²"), L'\u00B2' }, + { std::wstring(L"³"), L'\u00B3' }, + { std::wstring(L"´"), L'\u00B4' }, + { std::wstring(L"µ"), L'\u00B5' }, + { std::wstring(L"¶"), L'\u00B6' }, + { std::wstring(L"·"), L'\u00B7' }, + { std::wstring(L"¸"), L'\u00B8' }, + { std::wstring(L"¹"), L'\u00B9' }, + { std::wstring(L"º"), L'\u00BA' }, + { std::wstring(L"»"), L'\u00BB' }, + { std::wstring(L"¼"), L'\u00BC' }, + { std::wstring(L"½"), L'\u00BD' }, + { std::wstring(L"¾"), L'\u00BE' }, + { std::wstring(L"¿"), L'\u00BF' }, + { std::wstring(L"À"), L'\u00C0' }, + { std::wstring(L"Á"), L'\u00C1' }, + { std::wstring(L"Â"), L'\u00C2' }, + { std::wstring(L"Ã"), L'\u00C3' }, + { std::wstring(L"Ä"), L'\u00C4' }, + { std::wstring(L"Å"), L'\u00C5' }, + { std::wstring(L"Æ"), L'\u00C6' }, + { std::wstring(L"Ç"), L'\u00C7' }, + { std::wstring(L"È"), L'\u00C8' }, + { std::wstring(L"É"), L'\u00C9' }, + { std::wstring(L"Ê"), L'\u00CA' }, + { std::wstring(L"Ë"), L'\u00CB' }, + { std::wstring(L"Ì"), L'\u00CC' }, + { std::wstring(L"Í"), L'\u00CD' }, + { std::wstring(L"Î"), L'\u00CE' }, + { std::wstring(L"Ï"), L'\u00CF' }, + { std::wstring(L"Ð"), L'\u00D0' }, + { std::wstring(L"Ñ"), L'\u00D1' }, + { std::wstring(L"Ò"), L'\u00D2' }, + { std::wstring(L"Ó"), L'\u00D3' }, + { std::wstring(L"Ô"), L'\u00D4' }, + { std::wstring(L"Õ"), L'\u00D5' }, + { std::wstring(L"Ö"), L'\u00D6' }, + { std::wstring(L"×"), L'\u00D7' }, + { std::wstring(L"Ø"), L'\u00D8' }, + { std::wstring(L"Ù"), L'\u00D9' }, + { std::wstring(L"Ú"), L'\u00DA' }, + { std::wstring(L"Û"), L'\u00DB' }, + { std::wstring(L"Ü"), L'\u00DC' }, + { std::wstring(L"Ý"), L'\u00DD' }, + { std::wstring(L"Þ"), L'\u00DE' }, + { std::wstring(L"ß"), L'\u00DF' }, + { std::wstring(L"à"), L'\u00E0' }, + { std::wstring(L"á"), L'\u00E1' }, + { std::wstring(L"â"), L'\u00E2' }, + { std::wstring(L"ã"), L'\u00E3' }, + { std::wstring(L"ä"), L'\u00E4' }, + { std::wstring(L"å"), L'\u00E5' }, + { std::wstring(L"æ"), L'\u00E6' }, + { std::wstring(L"ç"), L'\u00E7' }, + { std::wstring(L"è"), L'\u00E8' }, + { std::wstring(L"é"), L'\u00E9' }, + { std::wstring(L"ê"), L'\u00EA' }, + { std::wstring(L"ë"), L'\u00EB' }, + { std::wstring(L"ì"), L'\u00EC' }, + { std::wstring(L"í"), L'\u00ED' }, + { std::wstring(L"î"), L'\u00EE' }, + { std::wstring(L"ï"), L'\u00EF' }, + { std::wstring(L"ð"), L'\u00F0' }, + { std::wstring(L"ñ"), L'\u00F1' }, + { std::wstring(L"ò"), L'\u00F2' }, + { std::wstring(L"ó"), L'\u00F3' }, + { std::wstring(L"ô"), L'\u00F4' }, + { std::wstring(L"õ"), L'\u00F5' }, + { std::wstring(L"ö"), L'\u00F6' }, + { std::wstring(L"÷"), L'\u00F7' }, + { std::wstring(L"ø"), L'\u00F8' }, + { std::wstring(L"ù"), L'\u00F9' }, + { std::wstring(L"ú"), L'\u00FA' }, + { std::wstring(L"û"), L'\u00FB' }, + { std::wstring(L"ü"), L'\u00FC' }, + { std::wstring(L"ý"), L'\u00FD' }, + { std::wstring(L"þ"), L'\u00FE' }, + { std::wstring(L"ÿ"), L'\u00FF' }, + { std::wstring(L"Œ"), L'\u0152' }, + { std::wstring(L"œ"), L'\u0153' }, + { std::wstring(L"Š"), L'\u0160' }, + { std::wstring(L"š"), L'\u0161' }, + { std::wstring(L"Ÿ"), L'\u0178' }, + { std::wstring(L"ƒ"), L'\u0192' }, + { std::wstring(L"ˆ"), L'\u02C6' }, + { std::wstring(L"˜"), L'\u02DC' }, + { std::wstring(L"Α"), L'\u0391' }, + { std::wstring(L"Β"), L'\u0392' }, + { std::wstring(L"Γ"), L'\u0393' }, + { std::wstring(L"Δ"), L'\u0394' }, + { std::wstring(L"Ε"), L'\u0395' }, + { std::wstring(L"Ζ"), L'\u0396' }, + { std::wstring(L"Η"), L'\u0397' }, + { std::wstring(L"Θ"), L'\u0398' }, + { std::wstring(L"Ι"), L'\u0399' }, + { std::wstring(L"Κ"), L'\u039A' }, + { std::wstring(L"Λ"), L'\u039B' }, + { std::wstring(L"Μ"), L'\u039C' }, + { std::wstring(L"Ν"), L'\u039D' }, + { std::wstring(L"Ξ"), L'\u039E' }, + { std::wstring(L"Ο"), L'\u039F' }, + { std::wstring(L"Π"), L'\u03A0' }, + { std::wstring(L"Ρ"), L'\u03A1' }, + { std::wstring(L"Σ"), L'\u03A3' }, + { std::wstring(L"Τ"), L'\u03A4' }, + { std::wstring(L"Υ"), L'\u03A5' }, + { std::wstring(L"Φ"), L'\u03A6' }, + { std::wstring(L"Χ"), L'\u03A7' }, + { std::wstring(L"Ψ"), L'\u03A8' }, + { std::wstring(L"Ω"), L'\u03A9' }, + { std::wstring(L"α"), L'\u03B1' }, + { std::wstring(L"β"), L'\u03B2' }, + { std::wstring(L"γ"), L'\u03B3' }, + { std::wstring(L"δ"), L'\u03B4' }, + { std::wstring(L"ε"), L'\u03B5' }, + { std::wstring(L"ζ"), L'\u03B6' }, + { std::wstring(L"η"), L'\u03B7' }, + { std::wstring(L"θ"), L'\u03B8' }, + { std::wstring(L"ι"), L'\u03B9' }, + { std::wstring(L"κ"), L'\u03BA' }, + { std::wstring(L"λ"), L'\u03BB' }, + { std::wstring(L"μ"), L'\u03BC' }, + { std::wstring(L"ν"), L'\u03BD' }, + { std::wstring(L"ξ"), L'\u03BE' }, + { std::wstring(L"ο"), L'\u03BF' }, + { std::wstring(L"π"), L'\u03C0' }, + { std::wstring(L"ρ"), L'\u03C1' }, + { std::wstring(L"ς"), L'\u03C2' }, + { std::wstring(L"σ"), L'\u03C3' }, + { std::wstring(L"τ"), L'\u03C4' }, + { std::wstring(L"υ"), L'\u03C5' }, + { std::wstring(L"φ"), L'\u03C6' }, + { std::wstring(L"χ"), L'\u03C7' }, + { std::wstring(L"ψ"), L'\u03C8' }, + { std::wstring(L"ω"), L'\u03C9' }, + { std::wstring(L"ϑ"), L'\u03D1' }, + { std::wstring(L"ϒ"), L'\u03D2' }, + { std::wstring(L"ϖ"), L'\u03D6' }, + { std::wstring(L" "), L'\u2002' }, + { std::wstring(L" "), L'\u2003' }, + { std::wstring(L" "), L'\u2009' }, + { std::wstring(L"‌"), L'\u200C' }, + { std::wstring(L"‍"), L'\u200D' }, + { std::wstring(L"‎"), L'\u200E' }, + { std::wstring(L"‏"), L'\u200F' }, + { std::wstring(L"–"), L'\u2013' }, + { std::wstring(L"—"), L'\u2014' }, + { std::wstring(L"‘"), L'\u2018' }, + { std::wstring(L"’"), L'\u2019' }, + { std::wstring(L"‚"), L'\u201A' }, + { std::wstring(L"“"), L'\u201C' }, + { std::wstring(L"”"), L'\u201D' }, + { std::wstring(L"„"), L'\u201E' }, + { std::wstring(L"†"), L'\u2020' }, + { std::wstring(L"‡"), L'\u2021' }, + { std::wstring(L"•"), L'\u2022' }, + { std::wstring(L"…"), L'\u2026' }, + { std::wstring(L"‰"), L'\u2030' }, + { std::wstring(L"′"), L'\u2032' }, + { std::wstring(L"″"), L'\u2033' }, + { std::wstring(L"‹"), L'\u2039' }, + { std::wstring(L"›"), L'\u203A' }, + { std::wstring(L"‾"), L'\u203E' }, + { std::wstring(L"⁄"), L'\u2044' }, + { std::wstring(L"€"), L'\u20AC' }, + { std::wstring(L"ℑ"), L'\u2111' }, + { std::wstring(L"℘"), L'\u2118' }, + { std::wstring(L"ℜ"), L'\u211C' }, + { std::wstring(L"™"), L'\u2122' }, + { std::wstring(L"ℵ"), L'\u2135' }, + { std::wstring(L"←"), L'\u2190' }, + { std::wstring(L"↑"), L'\u2191' }, + { std::wstring(L"→"), L'\u2192' }, + { std::wstring(L"↓"), L'\u2193' }, + { std::wstring(L"↔"), L'\u2194' }, + { std::wstring(L"↵"), L'\u21B5' }, + { std::wstring(L"⇐"), L'\u21D0' }, + { std::wstring(L"⇑"), L'\u21D1' }, + { std::wstring(L"⇒"), L'\u21D2' }, + { std::wstring(L"⇓"), L'\u21D3' }, + { std::wstring(L"⇔"), L'\u21D4' }, + { std::wstring(L"∀"), L'\u2200' }, + { std::wstring(L"∂"), L'\u2202' }, + { std::wstring(L"∃"), L'\u2203' }, + { std::wstring(L"∅"), L'\u2205' }, + { std::wstring(L"∇"), L'\u2207' }, + { std::wstring(L"∈"), L'\u2208' }, + { std::wstring(L"∉"), L'\u2209' }, + { std::wstring(L"∋"), L'\u220B' }, + { std::wstring(L"∏"), L'\u220F' }, + { std::wstring(L"∑"), L'\u2211' }, + { std::wstring(L"−"), L'\u2212' }, + { std::wstring(L"∗"), L'\u2217' }, + { std::wstring(L"√"), L'\u221A' }, + { std::wstring(L"∝"), L'\u221D' }, + { std::wstring(L"∞"), L'\u221E' }, + { std::wstring(L"∠"), L'\u2220' }, + { std::wstring(L"∧"), L'\u2227' }, + { std::wstring(L"∨"), L'\u2228' }, + { std::wstring(L"∩"), L'\u2229' }, + { std::wstring(L"∪"), L'\u222A' }, + { std::wstring(L"∫"), L'\u222B' }, + { std::wstring(L"∴"), L'\u2234' }, + { std::wstring(L"∼"), L'\u223C' }, + { std::wstring(L"≅"), L'\u2245' }, + { std::wstring(L"≈"), L'\u2248' }, + { std::wstring(L"≠"), L'\u2260' }, + { std::wstring(L"≡"), L'\u2261' }, + { std::wstring(L"≤"), L'\u2264' }, + { std::wstring(L"≥"), L'\u2265' }, + { std::wstring(L"⊂"), L'\u2282' }, + { std::wstring(L"⊃"), L'\u2283' }, + { std::wstring(L"⊄"), L'\u2284' }, + { std::wstring(L"⊆"), L'\u2286' }, + { std::wstring(L"⊇"), L'\u2287' }, + { std::wstring(L"⊕"), L'\u2295' }, + { std::wstring(L"⊗"), L'\u2297' }, + { std::wstring(L"⊥"), L'\u22A5' }, + { std::wstring(L"⋅"), L'\u22C5' }, + { std::wstring(L"⌈"), L'\u2308' }, + { std::wstring(L"⌉"), L'\u2309' }, + { std::wstring(L"⌊"), L'\u230A' }, + { std::wstring(L"⌋"), L'\u230B' }, + { std::wstring(L"⟨"), L'\u2329' }, + { std::wstring(L"⟩"), L'\u232A' }, + { std::wstring(L"◊"), L'\u25CA' }, + { std::wstring(L"♠"), L'\u2660' }, + { std::wstring(L"♣"), L'\u2663' }, + { std::wstring(L"♥"), L'\u2665' }, + { std::wstring(L"♦"), L'\u2666' } +}; + +inline gunichar +get_entity(gunichar *ptr, size_t len) { + // try hex, decimal entity first + gunichar ech(0); + if (ptr[1] == gunichar(L'#') && len > 3) { + std::wstringstream wss; + int wch = 0; + try { + wss << std::hex << std::wstring((wchar_t *)(ptr+2),len-3); + wss >> wch; + ech = gunichar(wch); + } catch (...) { + ech = 0; + } + } else if (g_unichar_type(ptr[1]) == G_UNICODE_DECIMAL_NUMBER) { + std::wstringstream wss; + int wch = 0; + try { + wss << std::dec << std::wstring((wchar_t *)(ptr+1),len-2); + wss >> wch; + ech = gunichar(wch); + } catch (...) { + ech = 0; + } + } + if (ech) + return ech; + + std::map::const_iterator it = + ENTITY_MAP.find(std::wstring((wchar_t *)(ptr),len)); + return it != ENTITY_MAP.end() ? it->second : gunichar(0); +} + + +inline gunichar +get_entity(char *ptr, size_t len) { + glong ulen = 0; + gunichar *gtmp = g_utf8_to_ucs4_fast((const gchar *)ptr, len, &ulen); + gunichar gch = get_entity(gtmp,ulen); + g_free(gtmp); + return gch; +} + + +inline std::string +trim(const std::string& in) +{ + std::size_t start = 0; + std::size_t limit = in.size(); + while (start < limit && in.at(start) < '!') ++start; + while (start < limit && in.at(limit-1) < '!') --limit; + if (start == limit) return std::string(""); + if (start > 0 || limit < in.size()) + return in.substr(start,limit-start); + return std::string(in); +} + + +inline std::vector +split(const std::string& in) +{ + std::vector outv; + std::istringstream iss(in); + std::copy(std::istream_iterator(iss), + std::istream_iterator(), + std::back_inserter(outv)); + return outv; +} + +}; // end anonymous namespace + + +#ifdef TOKENIZER_NAMESPACE +namespace TOKENIZER_NAMESPACE { +#endif + + +void +Tokenizer::set_config_dir(const std::string& dir) { + if (dir.empty()) { + cfg_dir = "."; + } else { + cfg_dir.assign(dir); + } +} + + +Tokenizer::Tokenizer(const Parameters& _) + : nthreads(_.nthreads ? _.nthreads : 1) + , chunksize(_.chunksize) + , lang_iso(_.lang_iso) + , english_p(_.lang_iso.compare("en")==0) + , latin_p((!english_p) && (_.lang_iso.compare("fr")==0 || _.lang_iso.compare("it")==0)) + , skip_xml_p(_.detag_p) + , skip_alltags_p(_.alltag_p) + , entities_p(_.entities_p) + , escape_p(_.escape_p) + , unescape_p(_.unescape_p) + , aggressive_hyphen_p(_.aggro_p) + , supersub_p(_.supersub_p) + , url_p(_.url_p) + , downcase_p(_.downcase_p) + , normalize_p(_.normalize_p) + , penn_p(_.penn_p) + , narrow_latin_p(_.narrow_latin_p) + , narrow_kana_p(_.narrow_kana_p) + , refined_p(_.refined_p) + , drop_bad_p(_.drop_bad_p) + , splits_p(_.split_p) + , verbose_p(_.verbose_p) + , para_marks_p(_.para_marks_p) + , split_breaks_p(_.split_breaks_p) +{ + if (_.cfg_path) + set_config_dir(_.cfg_path); +} + + +// +// dtor deletes dynamically allocated per-language RE2 compiled expressions +// +Tokenizer::~Tokenizer() +{ + for (auto& ptr : prot_pat_vec) { + if (ptr == &numprefixed_x || ptr == &quasinumeric_x) + continue; + delete ptr; + } +} + + +// +// stuffs numeric-only prefixes into nbpre_num_set, +// others into nbpre_gen_set +// +std::pair +Tokenizer::load_prefixes(std::ifstream& ifs) +{ + RE2 numonly("(.*)[\\s]+(\\#NUMERIC_ONLY\\#)"); + std::string line; + int nnon = 0; + int nnum = 0; + + while (std::getline(ifs,line)) { + if (!line.empty() && line[0] != '#') { + std::string prefix; + if (RE2::PartialMatch(line,numonly,&prefix)) { + nbpre_num_set.insert(prefix); + gunichar * x=g_utf8_to_ucs4_fast((const gchar *)prefix.c_str(),prefix.size(),0); + nbpre_num_ucs4.insert(std::wstring((wchar_t *)x)); + g_free(x); + nnum++; + } else { + nbpre_gen_set.insert(line); + gunichar * x=g_utf8_to_ucs4_fast((const gchar *)line.c_str(),line.size(),0); + nbpre_gen_ucs4.insert(std::wstring((wchar_t *)x)); + g_free(x); + nnon++; + } + } + } + return std::make_pair(nnon,nnum); +} + + +// +// load files (make sure to call set_config_dir before, if ever +// for nonbreaking prefixes and protected patterns +// +void +Tokenizer::init(const char *cfg_dir_optional) { + if (cfg_dir_optional) + set_config_dir(std::string(cfg_dir_optional)); + + std::string dir_path(cfg_dir); + dir_path.append("/nonbreaking_prefixes"); + if (::access(dir_path.c_str(),X_OK)) { + dir_path = cfg_dir; + } + + std::string nbpre_path(dir_path); + nbpre_path.append("/nonbreaking_prefix.").append(lang_iso); + + // default to generic version + if (::access(nbpre_path.c_str(),R_OK)) + nbpre_path = nbpre_path.substr(0,nbpre_path.size()-lang_iso.size()-1); + + if (::access(nbpre_path.c_str(),R_OK) == 0) { + std::ifstream cfg(nbpre_path.c_str()); + try { + std::pair counts = load_prefixes(cfg); + if (verbose_p) { + std::cerr << "loaded " << counts.first << " non-numeric, " + << counts.second << " numeric prefixes from " + << nbpre_path << std::endl; + } + } catch (...) { + std::ostringstream ess; + ess << "I/O error reading " << nbpre_path << " in " << __FILE__ << " at " << __LINE__; + throw std::runtime_error(ess.str()); + } + } else if (verbose_p) { + std::cerr << "no prefix file found: " << nbpre_path << std::endl; + } + + if (nbpre_gen_set.empty() && nbpre_num_set.empty()) { + std::ostringstream ess; + ess << "Error at " << __FILE__ << ":" << __LINE__ << " : " + << "No known abbreviations for language " << lang_iso; + throw std::runtime_error(ess.str()); + } + + std::string protpat_path(cfg_dir); + protpat_path.append("/protected_pattern.").append(lang_iso); + // default to generic version + if (::access(protpat_path.c_str(),R_OK)) + protpat_path = protpat_path.substr(0,protpat_path.size()-lang_iso.size()-1); + + prot_pat_vec.push_back(&numprefixed_x); + prot_pat_vec.push_back(&quasinumeric_x); + + if (::access(protpat_path.c_str(),R_OK) == 0) { + std::ifstream cfg(protpat_path.c_str()); + char linebuf[1028]; + int npat = 0; + try { + linebuf[0]='('; + while (cfg.good()) { + cfg.getline(linebuf+1,1024); + if (linebuf[1] && linebuf[1] != '#') { + strcat(linebuf,")"); + prot_pat_vec.push_back(new RE2(linebuf)); + npat++; + } + } + } catch (...) { + std::ostringstream ess; + ess << "I/O error reading " << protpat_path << " in " << __FILE__ << " at " << __LINE__; + throw std::runtime_error(ess.str()); + } + if (verbose_p) { + std::cerr << "loaded " << npat << " protected patterns from " + << protpat_path << std::endl; + } + } else if (verbose_p) { + std::cerr << "no protected file found: " << protpat_path << std::endl; + } +} + + +void +Tokenizer::reset() { +} + + +// +// apply ctor-selected tokenization to a string, in-place, no newlines allowed, +// assumes protections are applied already, some invariants are in place, +// e.g. that successive chars <= ' ' have been normalized to a single ' ' +// +void +Tokenizer::protected_tokenize(std::string& text) { + std::vector words; + re2::StringPiece textpc(text); + int pos = 0; + if (textpc[pos] == ' ') + ++pos; + size_t next = text.find(' ',pos); + while (next != std::string::npos) { + if (next - pos) + words.push_back(textpc.substr(pos,next-pos)); + pos = next + 1; + while (pos < textpc.size() && textpc[pos] == ' ') + ++pos; + next = textpc.find(' ',pos); + } + if (pos < textpc.size() && textpc[pos] != ' ') + words.push_back(textpc.substr(pos,textpc.size()-pos)); + + // regurgitate words with look-ahead handling for tokens with final mumble + std::string outs; + std::size_t nwords(words.size()); + for (size_t ii = 0; ii < nwords; ++ii) { + bool more_p = ii < nwords - 1; + size_t len = words[ii].size(); + bool sentence_break_p = len > 1 && words[ii][len-1] == '.'; + + // suppress break if it is an non-breaking prefix + if (sentence_break_p) { + re2::StringPiece pfx(words[ii].substr(0,len-1)); + std::string pfxs(pfx.as_string()); + if (nbpre_gen_set.find(pfxs) != nbpre_gen_set.end()) { + // general non-breaking prefix + sentence_break_p = false; + } else if (more_p && nbpre_num_set.find(pfxs) != nbpre_num_set.end() && RE2::PartialMatch(words[ii+1],sinteger_x)) { + // non-breaking before numeric + sentence_break_p = false; + } else if (pfxs.find('.') != std::string::npos && RE2::PartialMatch(pfx,letter_x)) { + // terminal isolated letter does not break + sentence_break_p = false; + } else if (more_p && RE2::PartialMatch(words[ii+1],lower_x)) { + // lower-case look-ahead does not break + sentence_break_p = false; + } + } + + outs.append(words[ii].data(),len); + if (sentence_break_p) + outs.append(" ."); + if (more_p) + outs.append(SPC_BYTE,1); + } + text.assign(outs.begin(),outs.end()); +} + + +bool +Tokenizer::unescape(std::string& word) { + std::ostringstream oss; + std::size_t was = 0; // last processed + std::size_t pos = 0; // last unprocessed + std::size_t len = 0; // processed length + bool hit = false; + for (std::size_t endp=0; + (pos = word.find('&',was)) != std::string::npos && (endp = word.find(';',pos)) != std::string::npos; + was = endp == std::string::npos ? pos : 1+endp) { + len = endp - pos + 1; + glong ulen(0); + gunichar *gtmp = g_utf8_to_ucs4_fast((const gchar *)word.c_str()+pos, len, &ulen); + gunichar gbuf[2] = { 0 }; + if ((gbuf[0] = get_entity(gtmp,ulen)) != gunichar(0)) { + gchar *gstr = g_ucs4_to_utf8(gbuf,ulen,0,0,0); + if (escape_p && ESCAPE_SET.find(std::string(gstr)) != ESCAPE_SET.end()) { + // do not unescape moses escapes when escape flag is turned on + oss << word.substr(was,1+endp-was); + } else { + if (was < pos) + oss << word.substr(was,pos-was); + oss << gstr; + was += ulen; + hit = true; + } + g_free(gstr); + } else { + oss << word.substr(was,1+endp-was); + } + g_free(gtmp); + } + if (was < word.size()) + oss << word.substr(was); + if (hit) + word = oss.str(); + return hit; +} + + +bool +Tokenizer::escape(std::string& text) { + bool mod_p = false; + std::string outs; + + const char *pp = text.c_str(); // from pp to pt is uncopied + const char *ep = pp + text.size(); + const char *pt = pp; + + while (pt < ep) { + if (*pt & 0x80) { + const char *mk = (const char *)g_utf8_find_next_char((const gchar *)pt,(const gchar *)ep); + if (!mk) { + if (mod_p) + outs.append(pp,pt-pp+1); + } else { + if (mod_p) + outs.append(pp,mk-pp); + pt = --mk; + } + pp = ++pt; + continue; + } + + const char *sequence_p = 0; + if (*pt < '?') { + if (*pt == '&') { + // check for a pre-existing escape + const char *sc = strchr(pt,';'); + if (!sc || sc-pt < 2 || sc-pt > 9) { + sequence_p = ESCAPE_MOSES[3]; + } + } else if (*pt == '\'') { + sequence_p = ESCAPE_MOSES[6]; + } else if (*pt == '"') { + sequence_p = ESCAPE_MOSES[7]; + } + } else if (*pt > ']') { + if (*pt =='|') { // 7c + sequence_p = ESCAPE_MOSES[0]; + } + } else if (*pt > 'Z') { + if (*pt == '<') { // 3e + sequence_p = ESCAPE_MOSES[4]; + } else if (*pt == '>') { // 3c + sequence_p = ESCAPE_MOSES[5]; + } else if (*pt == '[') { // 5b + sequence_p = ESCAPE_MOSES[1]; + } else if (*pt == ']') { // 5d + sequence_p = ESCAPE_MOSES[2]; + } + } + + if (sequence_p) { + if (pt > pp) + outs.append(pp,pt-pp); + outs.append(sequence_p); + mod_p = true; + pp = ++pt; + } else { + ++pt; + } + } + + if (mod_p) { + if (pp < pt) { + outs.append(pp,pt-pp); + } + text.assign(outs.begin(),outs.end()); + } + + return mod_p; +} + + +std::string +Tokenizer::penn_tokenize(const std::string& buf) +{ + static const char *comma_refs = "\\1 , \\2"; + static const char *isolate_ref = " \\1 "; + static const char *special_refs = "\\1 @\\2@ \\3"; + + std::string text(buf); + std::string outs; + if (skip_alltags_p) + RE2::GlobalReplace(&text,genl_tags_x,SPC_BYTE); + + // directed quote patches + size_t len = text.size(); + if (len > 2 && text.substr(0,2) == "``") + text.replace(0,2,"`` ",3); + else if (text[0] == '"') + text.replace(0,1,"`` ",3); + else if (text[0] == '`' || text[0] == '\'') + text.replace(0,1,"` ",2); + static char one_gg[] = "\\1 ``"; + RE2::GlobalReplace(&text,x1_v_d,one_gg); + RE2::GlobalReplace(&text,x1_v_gg,one_gg); + RE2::GlobalReplace(&text,x1_v_g,"\\1 ` \\2"); + RE2::GlobalReplace(&text,x1_v_q,"\\1 ` "); + + // protect ellipsis + for (size_t pos = text.find("..."); pos != std::string::npos; pos = text.find("...",pos+11)) + text.replace(pos,3,"MANYELIPSIS",11); + + // numeric commas + RE2::GlobalReplace(&text,ndndcomma_x,comma_refs); + RE2::GlobalReplace(&text,pdndcomma_x,comma_refs); + RE2::GlobalReplace(&text,ndpdcomma_x,comma_refs); + + // isolable symbols + RE2::GlobalReplace(&text,symbol_x,isolate_ref); + + // isolable slash + RE2::GlobalReplace(&text,slash_x,special_refs); + + // isolate final period + RE2::GlobalReplace(&text,final_x,"\\1 \\2\\3"); + + // isolate q.m., e.m. + RE2::GlobalReplace(&text,qx_x,isolate_ref); + + // isolate braces + RE2::GlobalReplace(&text,braces_x,isolate_ref); + + // convert open/close punctuation + RE2::GlobalReplace(&text,"\\(","-LRB-"); + RE2::GlobalReplace(&text,"\\[","-LSB-"); + RE2::GlobalReplace(&text,"\\{","-LCB-"); + RE2::GlobalReplace(&text,"\\)","-RRB-"); + RE2::GlobalReplace(&text,"\\]","-RSB-"); + RE2::GlobalReplace(&text,"\\}","-RCB-"); + + // isolate double-dash hyphen + RE2::GlobalReplace(&text,"--"," -- "); + + // insure leading and trailing space on line, to simplify exprs + // also make sure final . has one space on each side + len = text.size(); + while (len > 1 && text[len-1] == ' ') --len; + if (len < text.size()) + text.assign(text.substr(0,len)); + if (len > 2 && text[len-1] == '.') { + if (text[len-2] != ' ') { + text.assign(text.substr(0,len-1)); + text.append(" . "); + } else { + text.assign(text.substr(0,len-1)); + text.append(". "); + } + } else { + text.append(SPC_BYTE,1); + } + std::string ntext(SPC_BYTE); + ntext.append(text); + + // convert double quote to paired single-quotes + RE2::GlobalReplace(&ntext,"\""," '' "); + + // deal with contractions in penn style + RE2::GlobalReplace(&ntext,endq_x,"\\1 ' "); + RE2::GlobalReplace(&ntext,contract_x," '\\1 "); + RE2::GlobalReplace(&ntext,"'ll "," 'll "); + RE2::GlobalReplace(&ntext,"'re "," 're "); + RE2::GlobalReplace(&ntext,"'ve "," 've "); + RE2::GlobalReplace(&ntext,"n't "," n't "); + RE2::GlobalReplace(&ntext,"'LL "," 'LL "); + RE2::GlobalReplace(&ntext,"'RE "," 'RE "); + RE2::GlobalReplace(&ntext,"'VE "," 'VE "); + RE2::GlobalReplace(&ntext,"N'T "," N'T "); + RE2::GlobalReplace(&ntext," ([Cc])annot "," \\1an not "); + RE2::GlobalReplace(&ntext," ([Dd])'ye "," \\1' ye "); + RE2::GlobalReplace(&ntext," ([Gg])imme "," \\1im me "); + RE2::GlobalReplace(&ntext," ([Gg])onna "," \\1on na "); + RE2::GlobalReplace(&ntext," ([Gg])otta "," \\1ot ta "); + RE2::GlobalReplace(&ntext," ([Ll])emme "," \\1em me "); + RE2::GlobalReplace(&ntext," ([Mm])ore'n "," \\1ore 'n "); + RE2::GlobalReplace(&ntext," '([Tt])is "," '\\1 is 'n "); + RE2::GlobalReplace(&ntext," '([Tt])was "," '\\1 was 'n "); + RE2::GlobalReplace(&ntext," '([Tt])were "," '\\1 were 'n "); + RE2::GlobalReplace(&ntext," ([Ww])anna "," \\1an na "); + + protected_tokenize(ntext); + + // restore ellipsis + RE2::GlobalReplace(&ntext,"MANYELIPSIS","..."); + + // collapse spaces + RE2::GlobalReplace(&ntext,mult_spc_x,SPC_BYTE); + + // escape moses meta-characters + if (escape_p) + escape(ntext); + + // strip out wrapping spaces from line in result string + outs.assign(ntext.substr(1,ntext.size()-2)); + return outs; +} + + +std::string +Tokenizer::quik_tokenize(const std::string& buf) +{ + std::string text(buf); + size_t pos; + int num = 0; + + // this is the main moses-compatible tokenizer + + // push all the prefixes matching protected patterns + std::vector prot_stack; + std::string match; + + for (auto& pat : prot_pat_vec) { + pos = 0; + while (RE2::PartialMatch(text.substr(pos),*pat,&match)) { + pos = text.find(match,pos); + if (pos == std::string::npos) + break; + size_t len = match.size(); + if (text[pos-1] == ' ' || text[pos-1] == '\'' || text[pos-1] == '`'|| text[pos-1] == '"') { + char subst[32]; + int nsubst = snprintf(subst,sizeof(subst)," THISISPROTECTED%.3d ",num++); + text.replace(pos,len,subst,nsubst); + prot_stack.push_back(match); + pos += nsubst; + } else { + pos += len; + } + } + } + + const char *pt(text.c_str()); + const char *ep(pt + text.size()); + while (pt < ep && *pt >= 0 && *pt <= ' ') + ++pt; + glong ulen(0); + gunichar *usrc(g_utf8_to_ucs4_fast((const gchar *)pt,ep - pt, &ulen)); // g_free + gunichar *ucs4(usrc); + gunichar *lim4(ucs4 + ulen); + + gunichar *nxt4 = ucs4; + gunichar *ubuf(g_new0(gunichar,ulen*6+1)); // g_free + gunichar *uptr(ubuf); + + gunichar prev_uch(0); + gunichar next_uch(*ucs4); + gunichar curr_uch(0); + + GUnicodeType curr_type(G_UNICODE_UNASSIGNED); + GUnicodeType next_type((ucs4 && *ucs4) ? g_unichar_type(*ucs4) : G_UNICODE_UNASSIGNED); + GUnicodeType prev_type(G_UNICODE_UNASSIGNED); + + bool post_break_p = false; + bool in_num_p = next_uch <= gunichar(L'9') && next_uch >= gunichar(L'0'); + bool in_url_p = false; + int since_start = 0; + int alpha_prefix = 0; + int bad_length = 0; + + while (ucs4 < lim4) { + prev_uch = curr_uch; + prev_type = curr_type; + curr_uch = next_uch; + curr_type = next_type; + + if (++nxt4 >= lim4) { + next_uch = 0; + next_type = G_UNICODE_UNASSIGNED; + } else { + next_uch = *nxt4; + next_type = g_unichar_type(next_uch); + } + + if (url_p) { + if (!in_url_p && *ucs4 < 0x80L) { // url chars must be in the basic plane + if (!since_start) { + if (std::isalpha(char(*ucs4))) + alpha_prefix++; + } else if (alpha_prefix == since_start + && char(*ucs4) == ':' + && next_type != G_UNICODE_SPACE_SEPARATOR) { + in_url_p = true; + } + } + } + + bool pre_break_p = false; + const wchar_t *substitute_p = 0; + + if (post_break_p) { + *uptr++ = gunichar(L' '); + since_start = bad_length = 0; + in_url_p = in_num_p = post_break_p = false; + } + + retry: + + switch (curr_type) { + case G_UNICODE_MODIFIER_LETTER: + case G_UNICODE_OTHER_LETTER: + case G_UNICODE_TITLECASE_LETTER: + if (in_url_p || in_num_p) + pre_break_p = true; + // fallthough + case G_UNICODE_UPPERCASE_LETTER: + case G_UNICODE_LOWERCASE_LETTER: + if (downcase_p && curr_type == G_UNICODE_UPPERCASE_LETTER) + curr_uch = g_unichar_tolower(*ucs4); + break; + case G_UNICODE_SPACING_MARK: + pre_break_p = true; + in_num_p = false; + curr_uch = 0; + break; + case G_UNICODE_DECIMAL_NUMBER: + case G_UNICODE_LETTER_NUMBER: + case G_UNICODE_OTHER_NUMBER: + if (!in_num_p && !in_url_p) { + switch (prev_type) { + case G_UNICODE_DASH_PUNCTUATION: + case G_UNICODE_FORMAT: + case G_UNICODE_OTHER_PUNCTUATION: + case G_UNICODE_UPPERCASE_LETTER: + case G_UNICODE_LOWERCASE_LETTER: + case G_UNICODE_DECIMAL_NUMBER: + break; + default: + pre_break_p = true; + } + } + in_num_p = true; + break; + case G_UNICODE_CONNECT_PUNCTUATION: + if (curr_uch != gunichar(L'_')) { + if (in_url_p) { + in_url_p = false; + post_break_p = pre_break_p = true; + } + } + if (in_num_p) { + post_break_p = pre_break_p = true; + } else { + switch (next_type) { + case G_UNICODE_LOWERCASE_LETTER: + case G_UNICODE_MODIFIER_LETTER: + case G_UNICODE_OTHER_LETTER: + case G_UNICODE_TITLECASE_LETTER: + break; + default: + post_break_p = pre_break_p = true; + } + switch (prev_type) { + case G_UNICODE_LOWERCASE_LETTER: + case G_UNICODE_MODIFIER_LETTER: + case G_UNICODE_OTHER_LETTER: + case G_UNICODE_TITLECASE_LETTER: + break; + default: + post_break_p = pre_break_p = true; + } + } + break; + case G_UNICODE_FORMAT: + in_url_p = in_num_p = false; + break; + case G_UNICODE_DASH_PUNCTUATION: + if (aggressive_hyphen_p && !in_url_p && curr_uch != next_uch && prev_uch != curr_uch && (!(prev_uch == L' ' || !prev_uch) && !(next_uch == L' ' || !next_uch))) { + substitute_p = L"@-@"; + post_break_p = pre_break_p = true; + } else if ( ( curr_uch > gunichar(L'\u002D') && curr_uch < gunichar(L'\u2010') ) || + ( curr_uch > gunichar(L'\u2011') + && curr_uch != gunichar(L'\u30A0') + && curr_uch < gunichar(L'\uFE63') ) ) { + // dash, not a hyphen + post_break_p = pre_break_p = true; + } else if (next_type == G_UNICODE_SPACE_SEPARATOR) { + } else { + if (prev_type == curr_type) { + if (next_type != curr_type) { + post_break_p = !in_url_p; + } + } else if (next_type == curr_type) { + pre_break_p = !in_url_p; + } else if ((prev_type == G_UNICODE_UPPERCASE_LETTER || + prev_type == G_UNICODE_LOWERCASE_LETTER) && + next_type == G_UNICODE_DECIMAL_NUMBER) { + in_num_p = false; + } else if (in_num_p || since_start == 0) { + switch (next_type) { + case G_UNICODE_UPPERCASE_LETTER: + case G_UNICODE_LOWERCASE_LETTER: + case G_UNICODE_MODIFIER_LETTER: + case G_UNICODE_OTHER_LETTER: + case G_UNICODE_TITLECASE_LETTER: + case G_UNICODE_SPACE_SEPARATOR: + in_num_p = false; + break; + case G_UNICODE_DECIMAL_NUMBER: + case G_UNICODE_LETTER_NUMBER: + case G_UNICODE_OTHER_NUMBER: + case G_UNICODE_OTHER_PUNCTUATION: + break; + default: + post_break_p = true; + pre_break_p = prev_uch != curr_uch; + } + } else if (in_url_p) { + pre_break_p = curr_uch != gunichar(L'-'); + } else { + switch (prev_type) { + case G_UNICODE_UPPERCASE_LETTER: + case G_UNICODE_LOWERCASE_LETTER: + case G_UNICODE_MODIFIER_LETTER: + case G_UNICODE_OTHER_LETTER: + case G_UNICODE_TITLECASE_LETTER: + case G_UNICODE_DECIMAL_NUMBER: + case G_UNICODE_LETTER_NUMBER: + case G_UNICODE_OTHER_NUMBER: + case G_UNICODE_OTHER_PUNCTUATION: + switch (next_type) { + case G_UNICODE_UPPERCASE_LETTER: + case G_UNICODE_LOWERCASE_LETTER: + case G_UNICODE_MODIFIER_LETTER: + case G_UNICODE_OTHER_LETTER: + case G_UNICODE_TITLECASE_LETTER: + case G_UNICODE_DECIMAL_NUMBER: + case G_UNICODE_LETTER_NUMBER: + case G_UNICODE_OTHER_NUMBER: + break; + case G_UNICODE_OTHER_PUNCTUATION: + if (prev_type != next_type) + break; + default: + post_break_p = pre_break_p = prev_uch != curr_uch; + } + break; + default: + post_break_p = pre_break_p = prev_uch != curr_uch; + break; + } + } + } + break; + case G_UNICODE_OTHER_PUNCTUATION: + switch (curr_uch) { + case gunichar(L':'): + case gunichar(L'/'): + if (refined_p && !in_url_p + && prev_type == G_UNICODE_DECIMAL_NUMBER + && next_type == G_UNICODE_DECIMAL_NUMBER) { + break; + } + // fall-through + case gunichar(L'!'): + case gunichar(L'#'): + case gunichar(L';'): + case gunichar(L'?'): + case gunichar(L'@'): + post_break_p = pre_break_p = !in_url_p || next_type != G_UNICODE_SPACE_SEPARATOR; + break; + case gunichar(L'+'): + post_break_p = pre_break_p = !in_num_p && since_start > 0; + in_num_p = in_num_p || since_start == 0; + break; + case gunichar(L'&'): + if (unescape_p) { + if (next_type == G_UNICODE_LOWERCASE_LETTER || next_type == G_UNICODE_UPPERCASE_LETTER + || next_type == G_UNICODE_DECIMAL_NUMBER || next_uch == gunichar(L'#')) { + gunichar *eptr = nxt4; + GUnicodeType eptr_type(G_UNICODE_UNASSIGNED); + for (++eptr; eptr < lim4 && *eptr != gunichar(L';'); ++eptr) { + eptr_type = g_unichar_type(*eptr); + if (eptr_type != G_UNICODE_LOWERCASE_LETTER + && eptr_type != G_UNICODE_UPPERCASE_LETTER + && eptr_type != G_UNICODE_DECIMAL_NUMBER) + break; + } + gunichar ech(0); + if (*eptr == gunichar(L';') && (ech = get_entity(ucs4,eptr-ucs4+1))) { + curr_uch = ech; + curr_type = g_unichar_type(ech); + ucs4 = eptr; + nxt4 = ++eptr; + next_uch = *nxt4; + next_type = nxt4 < lim4 ? g_unichar_type(next_uch) : G_UNICODE_UNASSIGNED; + goto retry; + } + } + } + if (entities_p && !in_url_p) { + gunichar *cur4 = nxt4; + if (*cur4 == gunichar('#')) ++cur4; + while (g_unichar_isalnum(*cur4)) ++cur4; + if (cur4 > nxt4 && *cur4 == gunichar(';')) { + if (since_start) { + *uptr++ = gunichar(L' '); + since_start = 0; + } + ++cur4; + memcpy(uptr,ucs4,cur4-ucs4); + uptr += cur4-ucs4; + ucs4 = cur4; + *uptr++ = gunichar(L' '); + pre_break_p = post_break_p = false; + curr_uch = *ucs4; + curr_type = ucs4 < lim4 ? g_unichar_type(curr_uch) : G_UNICODE_UNASSIGNED; + nxt4 = ++cur4; + next_uch = *nxt4; + next_type = nxt4 < lim4 ? g_unichar_type(next_uch) : G_UNICODE_UNASSIGNED; + goto retry; + } + + } + post_break_p = pre_break_p = !in_url_p || next_type != G_UNICODE_SPACE_SEPARATOR; + if (escape_p) + substitute_p = L"&"; + break; + case gunichar(L'\''): + if (english_p) { + if (!in_url_p) { + bool next_letter_p = next_type == G_UNICODE_LOWERCASE_LETTER + || next_type == G_UNICODE_UPPERCASE_LETTER; + pre_break_p = true; + if (next_letter_p && refined_p) { + // break sha n't instead of shan 't: + if (prev_uch == gunichar(L'n') || prev_uch == gunichar(L'N')) { + *(uptr - 1) = gunichar(L' '); + *(uptr++) = prev_uch; + pre_break_p = false; + } + } + post_break_p = since_start == 0 + || (!next_letter_p && next_type != G_UNICODE_DECIMAL_NUMBER); + } + } else if (latin_p) { + post_break_p = !in_url_p; + pre_break_p = !in_url_p && prev_type != G_UNICODE_LOWERCASE_LETTER && prev_type != G_UNICODE_UPPERCASE_LETTER; + } else { + post_break_p = pre_break_p = !in_url_p; + } + if (escape_p) + substitute_p = L"'"; + break; + case gunichar(L'"'): + post_break_p = pre_break_p = true; + if (escape_p) + substitute_p = L"""; + break; + case gunichar(L','): + pre_break_p = !in_num_p || next_type != G_UNICODE_DECIMAL_NUMBER; + post_break_p = !in_num_p && next_type != G_UNICODE_DECIMAL_NUMBER; + break; + case gunichar(L'%'): + if (refined_p) { + pre_break_p = !in_num_p; + post_break_p = !in_num_p && next_type != G_UNICODE_DECIMAL_NUMBER; + } else { + post_break_p = pre_break_p = true; + } + break; + case gunichar(L'.'): + if (prev_uch != '.') { + if (!in_num_p) { + switch (next_type) { + case G_UNICODE_DECIMAL_NUMBER: + case G_UNICODE_LOWERCASE_LETTER: + case G_UNICODE_UPPERCASE_LETTER: + break; + default: + if (since_start > 0) { + switch (prev_type) { + case G_UNICODE_LOWERCASE_LETTER: + case G_UNICODE_UPPERCASE_LETTER: { + std::wstring k((wchar_t *)(uptr-since_start),since_start); + if (nbpre_gen_ucs4.find(k) != nbpre_gen_ucs4.end()) { + // general non-breaking prefix + } else if (nbpre_num_ucs4.find(k) != nbpre_num_ucs4.end() && class_follows_p(nxt4,lim4,G_UNICODE_DECIMAL_NUMBER)) { + // non-breaking before numeric + } else if (k.find(curr_uch) != std::wstring::npos) { + if (since_start > 1) { + GUnicodeType tclass = g_unichar_type(*(uptr-2)); + switch (tclass) { + case G_UNICODE_UPPERCASE_LETTER: + case G_UNICODE_LOWERCASE_LETTER: + pre_break_p = true; + break; + default: + break; + } + } + // terminal isolated letter does not break + } else if (class_follows_p(nxt4,lim4,G_UNICODE_LOWERCASE_LETTER) || + g_unichar_type(*nxt4) == G_UNICODE_DASH_PUNCTUATION) { + // lower-case look-ahead does not break + } else { + pre_break_p = true; + } + break; + } + default: + pre_break_p = true; + break; + } + } + break; + } + } else { + switch (next_type) { + case G_UNICODE_DECIMAL_NUMBER: + case G_UNICODE_LOWERCASE_LETTER: + case G_UNICODE_UPPERCASE_LETTER: + break; + default: + pre_break_p = true; + } + } + } else if (next_uch != '.') { + post_break_p = true; + } + break; + default: + post_break_p = pre_break_p = true; + break; + } + break; + case G_UNICODE_CLOSE_PUNCTUATION: + case G_UNICODE_FINAL_PUNCTUATION: + case G_UNICODE_INITIAL_PUNCTUATION: + case G_UNICODE_OPEN_PUNCTUATION: + switch (curr_uch) { + case gunichar(L'('): + case gunichar(L')'): + break; + case gunichar(L'['): + if (escape_p) + substitute_p = L"["; + break; + case gunichar(L']'): + if (escape_p) + substitute_p = L"]"; + break; + default: + in_url_p = false; + } + post_break_p = pre_break_p = !in_url_p; + break; + case G_UNICODE_CURRENCY_SYMBOL: + if (refined_p) { + post_break_p = in_num_p; // was in number, so break it + pre_break_p = !in_num_p; + in_num_p = in_num_p || next_type == G_UNICODE_DECIMAL_NUMBER || next_uch == gunichar(L'.') || next_uch == gunichar(L','); + } else { + post_break_p = pre_break_p = true; + in_num_p = false; + } + if (curr_uch != gunichar(L'$')) + in_url_p = false; + break; + case G_UNICODE_MODIFIER_SYMBOL: + case G_UNICODE_MATH_SYMBOL: + switch (curr_uch) { + case gunichar(L'`'): + if (english_p) { + if (!in_url_p) { + pre_break_p = true; + post_break_p = since_start == 0 || + (next_type != G_UNICODE_LOWERCASE_LETTER && next_type != G_UNICODE_UPPERCASE_LETTER && next_type != G_UNICODE_DECIMAL_NUMBER); + } + } else if (latin_p) { + post_break_p = !in_url_p; + pre_break_p = !in_url_p && prev_type != G_UNICODE_LOWERCASE_LETTER && prev_type != G_UNICODE_UPPERCASE_LETTER; + } else { + post_break_p = pre_break_p = !in_url_p; + } + if (escape_p) + substitute_p = L"'"; + else + curr_uch = gunichar(L'\''); + break; + case gunichar(L'|'): + if (escape_p) + substitute_p = L"|"; + post_break_p = pre_break_p = true; + break; + case gunichar(L'<'): + if (escape_p) + substitute_p = L"<"; + post_break_p = pre_break_p = true; + break; + case gunichar(L'>'): + if (escape_p) + substitute_p = L">"; + post_break_p = pre_break_p = true; + break; + case gunichar(L'%'): + post_break_p = in_num_p; + pre_break_p = !in_num_p && !in_url_p; + in_num_p = false; + break; + case gunichar(L'='): + case gunichar(L'~'): + in_num_p = false; + post_break_p = pre_break_p = !in_url_p; + break; + case gunichar(L'+'): + post_break_p = pre_break_p = !in_url_p; + if (in_url_p) { + in_num_p = false; + } else if (refined_p) { + // handle floating point as e.g. 1.2e+3.4 + bool next_digit_p = next_type == G_UNICODE_DECIMAL_NUMBER || + next_uch == gunichar(L'.'); + pre_break_p = !in_num_p; + in_num_p = next_digit_p && prev_type != G_UNICODE_DECIMAL_NUMBER; + post_break_p = !in_num_p; + } else { + in_num_p = in_num_p || since_start == 0; + } + break; + default: + post_break_p = pre_break_p = true; + break; + } + break; + case G_UNICODE_OTHER_SYMBOL: + post_break_p = pre_break_p = true; + break; + case G_UNICODE_CONTROL: + if (drop_bad_p) { + curr_uch = gunichar(L' '); + } else if (curr_uch < gunichar(L' ')) { + curr_uch = gunichar(L' '); + } else if (curr_uch == gunichar(L'\u0092') && + (next_type == G_UNICODE_LOWERCASE_LETTER || next_type == G_UNICODE_UPPERCASE_LETTER)) { + // observed corpus corruption case + if (english_p) { + pre_break_p = true; + post_break_p = since_start == 0 || + (next_type != G_UNICODE_LOWERCASE_LETTER && next_type != G_UNICODE_UPPERCASE_LETTER && next_type != G_UNICODE_DECIMAL_NUMBER); + } else if (latin_p) { + post_break_p = true; + pre_break_p = prev_type != G_UNICODE_LOWERCASE_LETTER && prev_type != G_UNICODE_UPPERCASE_LETTER; + } else { + post_break_p = pre_break_p = true; + } + if (escape_p) + substitute_p = L"'"; + else + curr_uch = gunichar(L'\''); + } else { + post_break_p = pre_break_p = true; + } + in_url_p = in_num_p = false; + break; + case G_UNICODE_LINE_SEPARATOR: + case G_UNICODE_SPACE_SEPARATOR: + curr_uch = gunichar(L' '); + in_url_p = in_num_p = false; + break; + case G_UNICODE_ENCLOSING_MARK: + in_url_p = false; + break; + case G_UNICODE_NON_SPACING_MARK: + case G_UNICODE_PRIVATE_USE: + case G_UNICODE_SURROGATE: + in_url_p = in_num_p = false; + break; + case G_UNICODE_UNASSIGNED: + default: + // malformed bytes are dropped (invalid utf8 unicode) + if (drop_bad_p) { + curr_uch = 0; + } else { + pre_break_p = since_start > 0 && bad_length == 0; + curr_type = G_UNICODE_UNASSIGNED; + } + in_url_p = in_num_p = false; + break; + } + + if (pre_break_p || curr_uch == gunichar(L' ') || (bad_length && curr_type != G_UNICODE_UNASSIGNED)) { + if (since_start) { + // non-empty token emitted previously, so pre-break must emit token separator + *uptr++ = gunichar(L' '); + since_start = bad_length = 0; + } + if (curr_uch == gunichar(L' ')) + // suppress emission below, fall-through to substitute logic + curr_uch = 0; + } + + if (substitute_p) { + for (gunichar *sptr = (gunichar *)substitute_p; *sptr; ++sptr) { + *uptr++ = *sptr; + since_start++; + } + in_url_p = in_num_p = false; + } else if (curr_uch) { + *uptr++ = curr_uch; + since_start++; + if (curr_type == G_UNICODE_UNASSIGNED) + bad_length++; + } + + ucs4 = nxt4; + } + + glong nbytes = 0; + gchar *utf8 = g_ucs4_to_utf8(ubuf,uptr-ubuf,0,&nbytes,0); // g_free + if (utf8[nbytes-1] == ' ') + --nbytes; + text.assign((const char *)utf8,(const char *)(utf8 + nbytes)); + g_free(utf8); + g_free(usrc); + g_free(ubuf); + + // terminate token at superscript or subscript sequence when followed by lower-case + if (supersub_p) + RE2::GlobalReplace(&text,numscript_x,"\\1\\2 \\3"); + + // restore prefix-protected strings + num = 0; + for (auto& prot : prot_stack) { + char subst[32]; + snprintf(subst,sizeof(subst),"THISISPROTECTED%.3d",num++); + size_t loc = text.find(subst); + while (loc != std::string::npos) { + text.replace(loc,18,prot.data(),prot.size()); + loc = text.find(subst,loc+18); + } + } + + // escape moses meta-characters + if (escape_p) + escape(text); + + return text; +} + + +std::size_t +Tokenizer::tokenize(std::istream& is, std::ostream& os) +{ + std::size_t line_no = 0; + std::size_t perchunk = chunksize ? chunksize : 2000; + std::vector< std::vector< std::string > > lines(nthreads); + std::vector< std::vector< std::string > > results(nthreads); + std::vector< boost::thread > workers(nthreads); + bool done_p = !(is.good() && os.good()); + + + for (std::size_t tranche = 0; !done_p; ++tranche) { + + // for loop starting threads for chunks of input + for (std::size_t ithread = 0; ithread < nthreads; ++ithread) { + + lines[ithread].resize(perchunk); + std::size_t line_pos = 0; + + for ( ; line_pos < perchunk; ++line_pos) { + + std::string istr; + std::getline(is,istr); + + if (skip_alltags_p) { + RE2::GlobalReplace(&istr,genl_tags_x,SPC_BYTE); + istr = trim(istr); + } + line_no++; + + if (istr.empty()) { + if (is.eof()) { + done_p = true; + lines[ithread].resize(line_pos); + results[ithread].resize(line_pos); + break; + } + lines[ithread][line_pos].clear(); + } else if (skip_xml_p && + (RE2::FullMatch(istr,tag_line_x) || RE2::FullMatch(istr,white_line_x))) { + lines[ithread][line_pos].clear(); + } else { + lines[ithread][line_pos] = + std::string(SPC_BYTE).append(istr).append(SPC_BYTE); + } + } + + if (line_pos) { + workers[ithread] = + boost::thread(VectorTokenizerCallable(this,lines[ithread],results[ithread])); + } + } // end for loop starting threads + + for (std::size_t ithread = 0; ithread < nthreads; ++ithread) { + if (!workers[ithread].joinable()) + continue; + + workers[ithread].join(); + + std::size_t nres = results[ithread].size(); + std::size_t nlin = lines[ithread].size(); + + if (nlin != nres) { + std::ostringstream emsg; + emsg << "Tranche " << tranche + << " worker " << ithread << "/" << nthreads + << " |lines|==" << nlin << " != |results|==" << nres; + throw std::runtime_error(emsg.str()); + } + + for (std::size_t ires = 0; ires < nres; ++ires) + os << results[ithread][ires] << std::endl; + + } // end loop over joined results + + if (verbose_p) { + std::cerr << line_no << ' '; + std::cerr.flush(); + } + + } // end loop over chunks + + return line_no; +} + + +std::string +Tokenizer::detokenize(const std::string& buf) +{ + std::vector words = split(trim(buf)); + + std::size_t squotes = 0; + std::size_t dquotes = 0; + std::string prepends(""); + + std::ostringstream oss; + + std::size_t nwords = words.size(); + std::size_t iword = 0; + + if (unescape_p) + for (auto &word: words) + unescape(word); + + for (auto &word: words) { + if (RE2::FullMatch(word,right_x)) { + if (iword) + oss << SPC_BYTE; + oss << word; + prepends.clear(); + } else if (RE2::FullMatch(word,left_x)) { + oss << word; + prepends = SPC_BYTE; + } else if (english_p && iword + && RE2::FullMatch(word,curr_en_x) + && RE2::FullMatch(words[iword-1],pre_en_x)) { + oss << word; + prepends = SPC_BYTE; + } else if (latin_p && iword < nwords - 2 + && RE2::FullMatch(word,curr_fr_x) + && RE2::FullMatch(words[iword+1],post_fr_x)) { + oss << prepends << word; + prepends.clear(); + } else if (word.size() == 1) { + if ((word.at(0) == '\'' && ((squotes % 2) == 0 )) || + (word.at(0) == '"' && ((dquotes % 2) == 0))) { + if (english_p && iword + && word.at(0) == '\'' + && std::tolower(words[iword-1].at(words[iword-1].size()-1)) == 's') { + oss << word; + prepends = SPC_BYTE; + } else { + oss << prepends << word; + prepends.clear(); + if (word.at(0) == '\'') + squotes++; + else + dquotes++; + } + } else { + if (std::isalnum(word.at(0))) + oss << prepends; + oss << word; + prepends = SPC_BYTE; + if (word.at(0) == '\'') + squotes++; + else if (word.at(0) == '"') + dquotes++; + } + } else { + oss << prepends << word; + prepends = SPC_BYTE; + } + iword++; + } + + + std::string text(oss.str()); + RE2::GlobalReplace(&text," +",SPC_BYTE); + RE2::GlobalReplace(&text,"\n ","\n"); + RE2::GlobalReplace(&text," \n","\n"); + return trim(text); +} + + +std::size_t +Tokenizer::detokenize(std::istream& is, std::ostream& os) +{ + size_t line_no = 0; + while (is.good() && os.good()) { + std::string istr; + std::getline(is,istr); + line_no ++; + if (istr.empty()) + continue; + if (skip_xml_p && (RE2::FullMatch(istr,tag_line_x) || RE2::FullMatch(istr,white_line_x))) { + os << istr << std::endl; + } else { + os << detokenize(istr) << std::endl; + } + } + return line_no; +} + + +std::vector +Tokenizer::splitter(const std::string &istr, bool *continuation_ptr) { + std::vector parts; + glong ncp = 0; + glong ocp = 0; + glong icp = 0; + gunichar *ucs4 = g_utf8_to_ucs4_fast((gchar *)istr.c_str(),istr.size(),&ncp); + if (ncp == 0) { + g_free(ucs4); + return parts; + } + gunichar *uout = (gunichar *)g_malloc0(2*ncp*sizeof(gunichar)); + + const wchar_t GENL_HYPH = L'\u2010'; + const wchar_t IDEO_STOP = L'\u3002'; + const wchar_t KANA_MDOT = L'\u30FB'; + const wchar_t WAVE_DASH = L'\u301C'; + //const wchar_t WAVY_DASH = L'\u3030'; + const wchar_t KANA_DHYP = L'\u30A0'; + const wchar_t SMAL_HYPH = L'\uFE63'; + const wchar_t WIDE_EXCL = L'\uFF01'; + const wchar_t WIDE_PCTS = L'\uFF05'; + //const wchar_t WIDE_HYPH = L'\uFF0D'; + const wchar_t WIDE_STOP = L'\uFF0E'; + const wchar_t WIDE_QUES = L'\uFF1F'; + const wchar_t INVERT_QM = L'\u00BF'; + const wchar_t INVERT_EX = L'\u00A1'; + + wchar_t currwc = 0; + + std::size_t init_word = 0; + std::size_t fini_word = 0; + std::size_t finilen = 0; + std::size_t dotslen = 0; + + const std::size_t SEQ_LIM = 6; + + charclass_t prev_class = empty; + charclass_t curr_class = empty; + std::vector seq(SEQ_LIM, empty); + std::vector pos(SEQ_LIM, 0); + std::size_t seqpos = 0; + + GUnicodeType curr_type = G_UNICODE_UNASSIGNED; + //bool prev_word_p = false; + bool curr_word_p = false; + + std::vector breaks; + std::set suppress; + + for (; icp <= ncp; ++icp) { + currwc = wchar_t(ucs4[icp]); + curr_type = g_unichar_type(currwc); + prev_class = curr_class; + //prev_word_p = curr_word_p; + + switch (curr_type) { + case G_UNICODE_DECIMAL_NUMBER: + case G_UNICODE_OTHER_NUMBER: + curr_class = numba; + curr_word_p = true; + break; + case G_UNICODE_LOWERCASE_LETTER: + case G_UNICODE_MODIFIER_LETTER: + case G_UNICODE_OTHER_LETTER: + curr_class = letta; + curr_word_p = true; + break; + case G_UNICODE_UPPERCASE_LETTER: + case G_UNICODE_TITLECASE_LETTER: + curr_class = upper; + curr_word_p = true; + break; + case G_UNICODE_OPEN_PUNCTUATION: + case G_UNICODE_INITIAL_PUNCTUATION: + curr_class = pinit; + curr_word_p = false; + break; + case G_UNICODE_DASH_PUNCTUATION: + curr_class = hyphn; + if (currwc <= GENL_HYPH) { + curr_word_p = true; + } else if (currwc >= SMAL_HYPH) { + curr_word_p = true; + } else { + curr_word_p = (currwc >= WAVE_DASH) && (currwc <= KANA_DHYP); + } + break; + case G_UNICODE_CLOSE_PUNCTUATION: + case G_UNICODE_FINAL_PUNCTUATION: + curr_class = pfini; + curr_word_p = false; + break; + case G_UNICODE_OTHER_PUNCTUATION: + if (currwc == L'\'' || currwc == L'"') { + curr_class = quote; + curr_word_p = false; + } else if (currwc == L'.' || currwc == IDEO_STOP || currwc == WIDE_STOP || currwc == KANA_MDOT) { + curr_class = stops; + curr_word_p = true; + } else if (currwc == L'?' || currwc == '!' || currwc == WIDE_EXCL || currwc == WIDE_QUES) { + curr_class = marks; + curr_word_p = false; + } else if (currwc == INVERT_QM || currwc == INVERT_EX) { + curr_class = pinit; + curr_word_p = false; + } else if ( currwc == L'%' || currwc == WIDE_PCTS) { + curr_class = pfpct; + curr_word_p = true; + } else { + curr_class = empty; + curr_word_p = false; + } + break; + default: + if (!g_unichar_isgraph(currwc)) { + curr_class = blank; + } else { + curr_class = empty; + } + curr_word_p = false; + break; + } + + // # condition for prefix test + // $words[$i] =~ /([\p{IsAlnum}\.\-]*)([\'\"\)\]\%\p{IsPf}]*)(\.+)$/ + // $words[$i+1] =~ /^([ ]*[\'\"\(\[\¿\¡\p{IsPi}]*[ ]*[\p{IsUpper}0-9])/ + + bool check_abbr_p = false; + if (curr_class == stops) { + if (prev_class != stops) { + dotslen = 1; + } else { + dotslen++; + } + } else if (curr_word_p) { + if (!fini_word) { + init_word = ocp; + } + fini_word = ocp+1; + dotslen = finilen = 0; + } else if (curr_class >= quote && curr_class <= pfpct && curr_class != pinit) { + finilen++; + dotslen = 0; + init_word = fini_word = 0; + } else if (dotslen) { + if (fini_word > init_word) { + if (prev_class!=stops || seqpos<1 || (ocp-pos[seqpos-1])= SEQ_LIM) { + seqpos = 0; + } + + if (curr_class == stops || curr_class == marks) { + if (!seqpos) { + seq[seqpos] = curr_class; + pos[seqpos] = ocp; + seqpos++; + uout[ocp++] = gunichar(currwc); + continue; + } else if (seqpos>1 && (seq[seqpos-1]==blank || seq[seqpos-1]==quote || seq[seqpos-1]==pfini)) { + // handle "[?!.] ..." which is common in some corpora + if (seq[seqpos-2] == curr_class || seq[seqpos-2] == marks) { + seqpos--; + uout[ocp++] = gunichar(currwc); + continue; + } + seqpos = 0; + } else if (seq[seqpos-1] != curr_class) { + seqpos = 0; + } else if (curr_class == marks) { + seqpos = 0; + } else { + uout[ocp++] = gunichar(currwc); + continue; + } + } + + if (!seqpos) { + if (curr_class != blank) { + uout[ocp++] = gunichar(currwc); + } else if (curr_class != prev_class) { + uout[ocp++] = L' '; + } + continue; + } + + if (curr_class == blank) { + if (prev_class != blank) { + seq[seqpos] = blank; + pos[seqpos] = ocp; + seqpos++; + uout[ocp++] = L' '; + } + if (icp < ncp) + continue; + } + + if (curr_class >= quote && curr_class <= pfini) { + if (prev_class < quote || prev_class > pfini) { + seq[seqpos] = curr_class; + pos[seqpos] = ocp; + seqpos++; + } else if (curr_class == quote && prev_class != curr_class) { + curr_class = prev_class; + } else if (prev_class == quote) { + seq[seqpos] = prev_class = curr_class; + } + uout[ocp++] = gunichar(currwc); + continue; + } + + // $text =~ s/([?!]) +([\'\"\(\[\¿\¡\p{IsPi}]*[\p{IsUpper}])/$1\n$2/g; + // #multi-dots followed by sentence starters 2 + // $text =~ s/(\.[\.]+) +([\'\"\(\[\¿\¡\p{IsPi}]*[\p{IsUpper}])/$1\n$2/g; + // # add breaks for sentences that end with some sort of punctuation inside a quote or parenthetical and are followed by a possible sentence starter punctuation and upper case 4 + // $text =~ s/([?!\.][\ ]*[\'\"\)\]\p{IsPf}]+) +([\'\"\(\[\¿\¡\p{IsPi}]*[\ ]*[\p{IsUpper}])/$1\n$2/g; + // # add breaks for sentences that end with some sort of punctuation are followed by a sentence starter punctuation and upper case 8 + // $text =~ s/([?!\.]) +([\'\"\(\[\¿\¡\p{IsPi}]+[\ ]*[\p{IsUpper}])/$1\n$2/g; + + std::size_t iblank = 0; + if (curr_class == upper || icp == ncp) { + if (seqpos && (seq[0] == stops || seq[0] == marks)) { + switch (seqpos) { + case 2: + if (seq[1] == blank) + iblank = 1; + break; + case 3: + switch (seq[1]) { + case blank: + if (seq[2] == quote || seq[2] == pinit) + iblank = 1; + break; + case quote: + case pfini: + if (seq[2] == blank) + iblank = 2; + break; + default: + break; + } + break; + case 4: + switch (seq[1]) { + case blank: + iblank = 1; + switch (seq[2]) { + case quote: + switch (seq[3]) { + case quote: + case pinit: + break; + case blank: + iblank = 3; + break; + default: + iblank = 0; // invalid + break; + } + break; + case pinit: + if (seq[3] != blank) + iblank = 0; // invalid + break; + case pfini: + if (seq[3] == blank) + iblank = 3; + break; + default: + iblank = 0; // invalid + break; + } + break; + case quote: + case pfini: + iblank = (seq[2] == blank && (seq[3] == quote || seq[3] == pinit)) ? 2 : 0; + break; + default: + iblank = 0; // invalid + break; + } + break; + case 5: + iblank = (seq[1] == blank) ? 2 : 1; + if (seq[iblank] == quote || seq[iblank] == pfini) + iblank++; + if (seq[iblank] != blank) { + iblank = 0; // invalid + } else { + if (seq[iblank+1] != quote && seq[iblank+1] != pinit) { + iblank = 0; // invalid + } else if (iblank+2 < seqpos) { + if (seq[iblank+2] != blank) + iblank = 0; // invalid + } + } + break; + } + } + if (iblank && suppress.find(pos[iblank]) == suppress.end()) { + breaks.push_back(pos[iblank]); + suppress.insert(pos[iblank]); + } + } + + uout[ocp++] = gunichar(currwc); + seqpos = 0; + } + + std::vector::iterator it = breaks.begin(); + glong iop = 0; + while (iop < ocp) { + glong endpos = it == breaks.end() ? ocp : *it++; + glong nextpos = endpos + 1; + while (endpos > iop) { + std::size_t chkpos = endpos-1; + if (uout[chkpos] == L'\n' || uout[chkpos] == L' ') { + endpos = chkpos; + continue; + } + if (g_unichar_isgraph(uout[chkpos])) + break; + endpos = chkpos; + } + if (endpos > iop) { + gchar *pre = g_ucs4_to_utf8(uout+iop,endpos-iop,0,0,0); + parts.push_back(std::string(pre)); + g_free(pre); + } + if (continuation_ptr) + *continuation_ptr = endpos > iop; + iop = nextpos; + } + + g_free(uout); + g_free(ucs4); + + return parts; +} + + +std::pair +Tokenizer::splitter(std::istream& is, std::ostream& os) +{ + std::pair counts = { 0, 0 }; + bool continuation_p = false; + bool pending_gap = false; + bool paragraph_p = false; + + while (is.good() && os.good()) { + std::string istr; + + std::getline(is,istr); + counts.first++; + + if (istr.empty() && (is.eof() ||!para_marks_p)) + continue; + + if (skip_xml_p && (RE2::FullMatch(istr,tag_line_x) || RE2::FullMatch(istr,white_line_x))) + continue; + + std::vector sentences(splitter(istr,&continuation_p)); + if (sentences.empty()) { + if (!paragraph_p) { + if (pending_gap) + os << std::endl; + pending_gap = false; + if (para_marks_p) + os << "

" << std::endl; + paragraph_p = true; + } + continue; + } + + paragraph_p = false; + std::size_t nsents = sentences.size(); + counts.second += nsents; + + if (pending_gap) { + os << " "; + pending_gap = false; + } + + for (std::size_t ii = 0; ii < nsents-1; ++ii) + os << sentences[ii] << std::endl; + + os << sentences[nsents-1]; + + if (continuation_p) + pending_gap = !split_breaks_p; + if (!pending_gap) + os << std::endl; + } + + if (pending_gap) + os << std::endl; + + return counts; +} + + +#ifdef TOKENIZER_NAMESPACE +}; // namespace +#endif + diff --git a/contrib/c++tokenizer/tokenizer.h b/contrib/c++tokenizer/tokenizer.h new file mode 100644 index 0000000000..978f201972 --- /dev/null +++ b/contrib/c++tokenizer/tokenizer.h @@ -0,0 +1,205 @@ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include "Parameters.h" + +#ifdef TOKENIZER_NAMESPACE +namespace TOKENIZER_NAMESPACE { +#endif + +// +// @about +// Tokenizer implements the process of Koehn's tokenizer.perl via RE2 +// +class Tokenizer { + +private: + + typedef enum { + empty = 0, + blank, + upper, // upper case + letta, // extended word class (includes number, hyphen) + numba, + hyphn, + stops, // blank to stops are "extended word class" variants + quote, // init & fini = {',"} + pinit, // init (includes INVERT_*) + pfini, // fini + pfpct, // fini + pct + marks, + limit + } charclass_t; + + std::size_t nthreads; + std::size_t chunksize; + std::string cfg_dir; + + // non-breaking prefixes (numeric) utf8 + std::set nbpre_num_set; + // non-breaking prefixes (other) utf8 + std::set nbpre_gen_set; + + // non-breaking prefixes (numeric) ucs4 + std::set nbpre_num_ucs4; + // non-breaking prefixes (other) ucs4 + std::set nbpre_gen_ucs4; + + // compiled protected patterns + std::vector prot_pat_vec; + +protected: + + // language + std::string lang_iso; + bool english_p; // is lang_iso "en" + bool latin_p; // is lang_iso "fr" or "it" + bool skip_xml_p; + bool skip_alltags_p; + bool entities_p; + bool escape_p; + bool unescape_p; + bool aggressive_hyphen_p; + bool supersub_p; + bool url_p; + bool downcase_p; + bool normalize_p; + bool penn_p; + bool narrow_latin_p; + bool narrow_kana_p; + bool refined_p; + bool drop_bad_p; + bool splits_p; + bool verbose_p; + bool para_marks_p; + bool split_breaks_p; + + // return counts of general and numeric prefixes loaded + std::pair load_prefixes(std::ifstream& ifs); // used by init(), parameterized by lang_iso + + // in-place 1 line tokenizer, replaces input string, depends on wrapper to set-up invariants + void protected_tokenize(std::string& inplace); + + // used for boost::thread + struct VectorTokenizerCallable { + Tokenizer *tokenizer; + std::vector& in; + std::vector& out; + + VectorTokenizerCallable(Tokenizer *_tokenizer, + std::vector& _in, + std::vector& _out) + : tokenizer(_tokenizer) + , in(_in) + , out(_out) { + }; + + void operator()() { + out.resize(in.size()); + for (std::size_t ii = 0; ii < in.size(); ++ii) + if (in[ii].empty()) + out[ii] = in[ii]; + else if (tokenizer->penn_p) + out[ii] = tokenizer->penn_tokenize(in[ii]); + else + out[ii] = tokenizer->quik_tokenize(in[ii]); + }; + }; + +public: + + Tokenizer(); // UNIMPL + + // no throw + Tokenizer(const Parameters& _params); + + // frees dynamically compiled expressions + ~Tokenizer(); + + // required before other methods, may throw + void init(const char *cfg_dir_path = 0); + + void set_config_dir(const std::string& _cfg_dir); + + // required after processing a contiguous sequence of lines when sentence splitting is on + void reset(); + + // simultaneous sentence splitting not yet implemented + bool splitting() const { return splits_p; } + + // escapes chars the set &|"'<> after tokenization (moses special characters) + bool escape(std::string& inplace); + + // used in detokenizer, converts entities into characters + // if escape_p is set, does not unescape moses special tokens, thus + // escape_p and unescape_p can be used together usefully + bool unescape(std::string& inplace); + + // streaming select-tokenizer reads from is, writes to os, preserving line breaks (unless splitting) + std::size_t tokenize(std::istream& is, std::ostream& os); + + // quik-tokenize padded line buffer to return string + std::string quik_tokenize(const std::string& buf); + + // penn-tokenize padded line buffer to return string // untested + std::string penn_tokenize(const std::string& buf); + + // select-tokenize padded line buffer to return string + std::string tokenize(const std::string& buf) { + return penn_p ? penn_tokenize(buf) : quik_tokenize(buf); + } + + // tokenize with output argument + void tokenize(const std::string& buf, std::string& outs) { + outs = tokenize(buf); + } + + // tokenize to a vector + std::vector tokens(const std::string& in) { + std::istringstream tokss(penn_p ? penn_tokenize(in) : tokenize(in)); + std::vector outv; + std::copy(std::istream_iterator(tokss), + std::istream_iterator(), + std::back_inserter(outv)); + return outv; + } + + // streaming detokenizer reads from is, writes to os, preserving breaks + std::size_t detokenize(std::istream& is, std::ostream &os); + + // detokenize padded line buffer to return string + std::string detokenize(const std::string& buf); + + void detokenize(const std::string& buf, std::string& outs) { + outs = detokenize(buf); + } + + // detokenize from a vector + std::string detokenize(const std::vector& inv) { + std::ostringstream oss; + std::copy(inv.begin(), inv.end(), std::ostream_iterator(oss," ")); + return detokenize(oss.str()); + } + + // split a string on sentence boundaries (approximately) + std::vector splitter(const std::string &istr,bool *continuation_p = 0); + + // split sentences from input stream and write one per line on output stream + std::pair splitter(std::istream& is, std::ostream& os); + +}; // end class Tokenizer + +#ifdef TOKENIZER_NAMESPACE +}; +#endif diff --git a/contrib/c++tokenizer/tokenizer_main.cpp b/contrib/c++tokenizer/tokenizer_main.cpp new file mode 100644 index 0000000000..358a68cc3d --- /dev/null +++ b/contrib/c++tokenizer/tokenizer_main.cpp @@ -0,0 +1,352 @@ +#include "tokenizer.h" +#include "Parameters.h" +#include +#include +#include +#include + +#ifdef TOKENIZER_NAMESPACE +using namespace TOKENIZER_NAMESPACE ; +#endif + + +void +usage(const char *path) +{ + std::cerr << "Usage: " << path << "[-{v|x|p|a|e|s|u|n|N]* [LL] [-{c|o} PATH]* INFILE*" << std::endl; + std::cerr << " -a -- aggressive hyphenization" << std::endl; + std::cerr << " -b -- drop bad bytes" << std::endl; + std::cerr << " -B -- splitter will split on linebreak" << std::endl; + std::cerr << " -c DIR -- config (pattern) file directory" << std::endl; + std::cerr << " -d -- downcase" << std::endl; + std::cerr << " -D -- detokenize" << std::endl; + std::cerr << " -e -- do not escape entities during tokenization" << std::endl; + std::cerr << " -E -- preserve entities during tokenization" << std::endl; + std::cerr << " -k -- narrow kana" << std::endl; + std::cerr << " -n -- narrow latin" << std::endl; + std::cerr << " -N -- normalize" << std::endl; + std::cerr << " -o OUT -- output file path" << std::endl; + std::cerr << " -p -- penn treebank style" << std::endl; + std::cerr << " -r -- refined contraction and quantity conjoining" << std::endl; + std::cerr << " -s -- super- and sub-script conjoining" << std::endl; + std::cerr << " -S -- buffer and sentence-split lines" << std::endl; + std::cerr << " -T -- do not tokenize, just split, no

marks" << std::endl; + std::cerr << " -t N[,C] -- use N threads (1), chunksize C lines" << std::endl; + std::cerr << " -u -- disable url handling" << std::endl; + std::cerr << " -U -- unescape entities before tokenization, after detokenization" << std::endl; + std::cerr << " -v -- verbose" << std::endl; + std::cerr << " -w -- word filter" << std::endl; + std::cerr << " -x -- skip xml tag lines" << std::endl; + std::cerr << " -y -- skip all xml tags" << std::endl; + std::cerr << " -X -- split only, with

marks" << std::endl; + std::cerr << "Default is -c ., stdin, stdout." << std::endl; + std::cerr << "LL in en,fr,it affect contraction. LL selects nonbreaking prefix file" << std::endl; + std::cerr << "nonbreaking_prefix.LL is sought in getenv('TOKENIZER_SHARED_DIR')." << std::endl; + return; +} + + +std::string token_word(const std::string& in) { + int pos = -1; + int digits_prefixed = 0; + int nalpha = 0; + int len = in.size(); + std::vector cv; + int last_quirk = -1; + while (++pos < len) { + char ch = in.at(pos); + if (std::isdigit(ch)) { + if (digits_prefixed > 0) { + last_quirk = pos; + break; + } + digits_prefixed--; + cv.push_back(std::tolower(ch)); + } else if (std::isalpha(ch)) { + if (digits_prefixed < 0) + digits_prefixed = -digits_prefixed; + cv.push_back(std::tolower(ch)); + nalpha++; + } else { + if (digits_prefixed < 0) + digits_prefixed = -digits_prefixed; + last_quirk = pos; + if ((ch == '-' || ch == '\'') && pos != 0) { + cv.push_back(ch); + } else { + break; + } + } + } + if (last_quirk == pos || (digits_prefixed > 0 && nalpha == 0)) + cv.clear(); // invalid word + return std::string(cv.begin(),cv.end()); +} + + +int +copy_words(Tokenizer& tize, std::istream& ifs, std::ostream& ofs) { + int nlines = 0; + std::string line; + while (ifs.good() && std::getline(ifs,line)) { + if (line.empty()) + continue; + std::vector tokens(tize.tokens(line)); + int count = 0; + bool was_break = false; + + for (auto& token: tokens) { + if (token.empty()) { + if (count || was_break) { + ofs << std::endl; + count = 0; + nlines++; + was_break = true; + continue; + } + } + was_break = false; + + std::string word(token_word(token)); + if (word.empty()) { + continue; + } + + if (count++) { + ofs << ' '; + } + ofs << word; + } + + if (count) { + ofs << std::endl; + nlines++; + } + } + return nlines; +} + + +int main(int ac, char **av) +{ + int rc = 0; + Parameters params; + + const char *prog = av[0]; + bool next_cfg_p = false; + bool next_output_p = false; + bool next_threads_p = false; + bool detokenize_p = std::strstr(av[0],"detokenize") != 0; + if (!detokenize_p) + params.split_p = std::strstr(av[0],"splitter") != 0; + + while (++av,--ac) { + if (**av == '-') { + switch (av[0][1]) { + case 'a': + params.aggro_p = true; + break; + case 'b': + params.drop_bad_p = true; + break; + case 'B': + params.split_breaks_p = true; + break; + case 'c': + next_cfg_p = true; + break; + case 'd': + params.downcase_p = true; + break; + case 'D': + detokenize_p = !detokenize_p; + break; + case 'e': + params.escape_p = !params.escape_p; + break; + case 'E': + params.entities_p = true; + break; + case 'h': + usage(prog); + exit(0); + case 'k': + params.narrow_kana_p = true; + break; + case 'n': + params.narrow_latin_p = true; + break; + case 'N': + params.normalize_p = true; + break; + case 'o': + next_output_p = true; + break; + case 'p': + params.penn_p = true; + break; + case 'r': + params.refined_p = true; + break; + case 's': + params.supersub_p = true; + break; + case 'S': + params.split_p = !params.split_p; + break; + case 'T': + params.notokenization_p = true; + params.para_marks_p = false; + break; + case 't': + next_threads_p = true; + break; + case 'U': + params.unescape_p = true; + break; + case 'u': + params.url_p = false; + break; + case 'v': + params.verbose_p = true; + break; + case 'w': + params.words_p = true; + break; + case 'x': + params.detag_p = true; + break; + case 'X': + params.notokenization_p = true; + params.para_marks_p = true; + break; + case 'y': + params.alltag_p = true; + break; + case 'l': + // ignored + break; + default: + std::cerr << "Unknown option: " << *av << std::endl; + ::exit(1); + } + } else if (params.lang_iso.empty() && strlen(*av) == 2 && !isdigit(**av)) { + params.lang_iso = *av; + } else if (next_output_p) { + next_output_p = false; + params.out_path = *av; + } else if (next_cfg_p) { + next_cfg_p = false; + params.cfg_path = *av; + } else if (next_threads_p) { + next_threads_p = false; + char *comma = strchr(*av,','); + if (comma) { + *comma++ = 0; + params.chunksize = std::strtoul(comma,0,0); + } + params.nthreads = std::strtoul(*av,0,0); + } else { + params.args.push_back(std::string(*av)); + } + } + + if (!params.cfg_path) { + params.cfg_path = getenv("TOKENIZER_SHARED_DIR"); + } + if (!params.cfg_path) { + if (!::access("../share/.",X_OK)) { + if (!::access("../share/moses/.",X_OK)) { + params.cfg_path = "../share/moses"; + } else { + params.cfg_path = "../share"; + } + } else if (!::access("./scripts/share/.",X_OK)) { + params.cfg_path = "./scripts/share"; + } else if (!::access("./nonbreaking_prefix.en",R_OK)) { + params.cfg_path = "."; + } else { + const char *slash = std::strrchr(prog,'/'); + if (slash) { + std::string cfg_dir_str(prog,slash-prog); + std::string cfg_shr_str(cfg_dir_str); + cfg_shr_str.append("/shared"); + std::string cfg_mos_str(cfg_shr_str); + cfg_mos_str.append("/moses"); + if (!::access(cfg_mos_str.c_str(),X_OK)) { + params.cfg_path = strdup(cfg_mos_str.c_str()); + } else if (!::access(cfg_shr_str.c_str(),X_OK)) { + params.cfg_path = strdup(cfg_shr_str.c_str()); + } else if (!::access(cfg_dir_str.c_str(),X_OK)) { + params.cfg_path = strdup(cfg_dir_str.c_str()); + } + } + } + } + if (params.cfg_path) { + if (params.verbose_p) { + std::cerr << "config path: " << params.cfg_path << std::endl; + } + } + + std::unique_ptr pofs = 0; + if (!params.out_path.empty()) { + pofs.reset(new std::ofstream(params.out_path.c_str())); + } + std::ostream& ofs(pofs ? *pofs : std::cout); + + if (params.lang_iso.empty()) + params.lang_iso = "en"; + + Tokenizer tize(params); + tize.init(); + std::pair plines = { 0, 0 }; + + if (params.words_p) { + if (params.args.empty()) { + plines.first += copy_words(tize,std::cin,ofs); + } else { + for (std::string& arg : params.args) { + try { + std::ifstream ifs(arg.c_str()); + plines.first += copy_words(tize,ifs,ofs); + } catch (...) { + std::cerr << "Exception extracting words from path " << arg << std::endl; + } + } + } + } else if (params.args.empty()) { + if (detokenize_p) { + plines.first = tize.detokenize(std::cin,ofs); + } else if (params.notokenization_p) { + plines = tize.splitter(std::cin,ofs); + } else { + plines.first = tize.tokenize(std::cin,ofs); + } + } else { + for (std::string& arg : params.args) { + try { + std::ifstream ifs(arg.c_str()); + if (detokenize_p) { + plines.first = tize.detokenize(ifs,ofs); + } else if (params.notokenization_p) { + plines = tize.splitter(ifs,ofs); + } else { + plines.first = tize.tokenize(ifs,ofs); + } + } catch (...) { + std::cerr << "Exception tokenizing from path " << arg << std::endl; + } + } + } + + if (params.verbose_p) { + std::cerr << "%%% " << plines.first << " lines." << std::endl; + if (plines.second) { + std::cerr << "%%% " << plines.second << " sentences." << std::endl; + } + } + return rc; +} + + diff --git a/contrib/checkplf/Makefile b/contrib/checkplf/Makefile new file mode 100644 index 0000000000..9d6111cd61 --- /dev/null +++ b/contrib/checkplf/Makefile @@ -0,0 +1,2 @@ +checkplf: checkplf.cpp + g++ checkplf.cpp -I../../moses/ ../../lib/libmoses.a -o checkplf diff --git a/contrib/checkplf/checkplf.cpp b/contrib/checkplf/checkplf.cpp index f8de29e8e7..05a25243c2 100644 --- a/contrib/checkplf/checkplf.cpp +++ b/contrib/checkplf/checkplf.cpp @@ -30,8 +30,8 @@ int main() num_edges += edges.size(); for (unsigned j = 0; j < edges.size(); ++j) { const PCN::CNAlt& edge = edges[j]; - size_t head = edge.second + node; - const string& label = edge.first.first; + size_t head = edge.m_next + node; + const string& label = edge.m_word; if (head <= node) { cerr << "Line " << lc << ": cycle detected at column position " << (node+1) << ", edge label = '" << label << "'" << endl; return 1; diff --git a/contrib/combine-ptables/README.md b/contrib/combine-ptables/README.md index b180f9202c..14d13857d3 100644 --- a/contrib/combine-ptables/README.md +++ b/contrib/combine-ptables/README.md @@ -59,6 +59,14 @@ This corresponds to the option: `--newSourceMaxLength=4` +BACKOFF +------- + +This combination technique is a simplified version of the fill-up technique. +With respect to fill-up technique, the backoff technique does not add the +binary additional feature denoting the provenance of an entry. + + LINEAR INTERPOLATION -------------------- diff --git a/contrib/combine-ptables/combine-ptables.pl b/contrib/combine-ptables/combine-ptables.pl index de9df7ec24..776565640a 100755 --- a/contrib/combine-ptables/combine-ptables.pl +++ b/contrib/combine-ptables/combine-ptables.pl @@ -17,7 +17,7 @@ sub main { my $usage = " USAGE ----- -combine-ptables.pl --mode=(interp|union|fillup|intersect1|stats) ptable1 ptable2 ... ptableN > combined-ptable +combine-ptables.pl --mode=(interp|union|fillup|backoff|intersect1|stats) ptable1 ptable2 ... ptableN > combined-ptable combine-ptables.pl --mode=intersect1 reotable-unpruned ptable-pruned > reotable-pruned ----- # @@ -32,6 +32,8 @@ sub main { # Required: # --mode fillup: Each entry is taken only from the first table that contains it. # A binary feature is added from each table except the first. +# backoff: Each entry is taken only from the first table that contains it. +# NO binary feature is added. # interp: Linear interpolation. # union: Union of entries, feature vectors are concatenated. # intersect1: Intersection of entries, feature vectors taken from the first table. @@ -51,6 +53,9 @@ sub main { # Options for 'fillup': # --newSourceMaxLength=INT Don't include \"new\" source phrases if longer than INT words. # +# Options for 'backoff': +# --newSourceMaxLength=INT Don't include \"new\" source phrases if longer than INT words. +# # Options for 'interp': # --weights=W1,W2,...WN Weights for interpolation. By default, uniform weights are applied. # --epsilon=X Score to assume when a phrase pair is not contained in a table (in 'interp' and 'union' modes). @@ -85,7 +90,7 @@ sub main { if($help) { die "$usage\n\n"; } -if($combination_mode!~/(interp|union|fillup|intersect1|stats)/) {die "$usage\nUnknown combination mode!\n"}; +if($combination_mode!~/(interp|union|fillup|backoff|intersect1|stats)/) {die "$usage\nUnknown combination mode!\n"}; if(@ARGV < 2) {die "$usage\n\n Please provide at least 2 tables to combine \n\n";} @@ -103,7 +108,7 @@ sub main { # The newSourceMaxLength option requires reading all the first PT before starting the combination my %sourcePhrasesPT1; -if($combination_mode eq "fillup" && $newSourceMaxLength>-1) { +if((($combination_mode eq "fillup") || ($combination_mode eq "backoff")) && $newSourceMaxLength>-1) { my $table1=$tables[0]; $table1 =~ s/(.*\.gz)\s*$/gzip -dc < $1|/; open(TABLE1, "$table1") or die "Cannot open $table1: ($!)\n"; @@ -281,6 +286,25 @@ (PPAIRS_REFARRAY, TABLE_INDICES_REFARRAY) } push(@scores, @bin_feats); } + ### Backoff + elsif($combination_mode eq "backoff") { + #my @bin_feats=(($exp_zero) x ($nbtables-1)); + for(my $i=0; $i<$nbtables; $i++) { + if($ra_toRead->[$i]) { + $ppair= shift(@{$ra_ppairs->[$i]}); + # pruning criteria are applied here: + if($i>0 && $newSourceMaxLength>-1) { + $ppair=~m/^(.*?)$delim_RE/; + if(scalar(split(/ +/, $1)) > $newSourceMaxLength && + !defined($sourcePhrasesPT1{$1})) + { $to_print=0; } + } + @scores = @{shift(@{$ra_ppairs->[$i]})}; + $additional_info=shift(@{$ra_ppairs->[$i]}); + last; + } + } + } ### Linear interpolation elsif($combination_mode eq "interp") { my $firstPpair=-1; diff --git a/contrib/debugging/auto-rollback.sh b/contrib/debugging/auto-rollback.sh new file mode 100755 index 0000000000..c08e59a311 --- /dev/null +++ b/contrib/debugging/auto-rollback.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +git submodule init +git submodule update regtest +while [ true ] ; do + ./bjam -j$(nproc) --with-irstlm=$(pwd)/opt --with-boost=$(pwd)/opt --with-cmph=$(pwd)/opt --with-xmlrpc-c=$(pwd)/opt --with-regtest=$(pwc)/regtest -a -q $@ && break + commit=$(git log | grep ^commit | head -n2 | tail -n1 | sed 's/commit //') + echo REVERTING TO COMMIT $commit + git checkout $commit +done diff --git a/contrib/eppex/ISS.h b/contrib/eppex/ISS.h index 7921fcbf8b..9c4e1fc227 100644 --- a/contrib/eppex/ISS.h +++ b/contrib/eppex/ISS.h @@ -1,236 +1,236 @@ -/** - * ISS (Indexed Strings Storage) - memory efficient storage for permanent strings. - * - * Implementation note: use #define USE_HASHSET to switch between implementation - * using __gnu_cxx::hash_set and implementation using std::set. - * - * (C) Ceslav Przywara, UFAL MFF UK, 2011 - * - * $Id$ - */ - -#ifndef _ISS_H -#define _ISS_H - -#include -#include -#include - -// Use hashset instead of std::set for string-to-number indexing? -#ifdef USE_HASHSET -#include -#else -#include -#endif - -#include - -#ifdef USE_HASHSET -// Forward declaration of comparator functor. -template -class StringsEqualComparator; - -template -class Hasher; -#else -// Forward declaration of comparator functor. -template -class StringsLessComparator; -#endif - -/** - */ -template -class IndexedStringsStorage { - -public: - - typedef IndType index_type; - -#ifdef USE_HASHSET - typedef StringsEqualComparator equality_comparator_t; - - typedef Hasher hasher_t; - - /** @typedef Hash set used as lookup table (string -> numeric index). */ - typedef __gnu_cxx::hash_set index_t; -#else - typedef StringsLessComparator less_comparator_t; - - /** @typedef Set used as lookup table (string -> numeric index). */ - typedef std::set index_t; -#endif - /** @typedef Container of pointers to stored C-strings. Acts as - * conversion table: numeric index -> string. - */ - typedef std::vector table_t; - -private: - - /** @var memory pool used to store C-strings */ - boost::pool<> _storage; - - /** @var index-to-string conversion table */ - table_t _table; - - /** @var index lookup table */ - index_t _index; - -public: - /** Default constructor. - */ - IndexedStringsStorage(void); - - /** @return True, if the indices are exhausted (new strings cannot be stored). - */ - inline bool is_full(void) const { return _table.size() == std::numeric_limits::max(); } - - /** Retrieves pointer to C-string instance represented by given index. - * Note: No range checks are performed! - * @param index Index of C-string to retrieve. - * @return Pointer to stored C-string instance. - */ - inline const char* get(IndType index) const { return _table[index]; } - - /** Stores the string and returns its numeric index. - * @param str Pointer to C-string to store. - * @return Index of stored copy of str. - * @throw std::bad_alloc When insertion of new string would cause - * overflow of indices datatype. - */ - IndType put(const char* str); - - /** @return Number of unique strings stored so far. - */ - inline table_t::size_type size(void) const { return _table.size(); } -}; - - -/** Functor designed for less than comparison of C-strings stored within StringStore. - * @param IndType Type of numerical indices of strings within given StringStore. - */ -#ifdef USE_HASHSET -template -class StringsEqualComparator: public std::binary_function { -#else -template -class StringsLessComparator: public std::binary_function { -#endif - /** @var conversion table: index -> string (necessary for indices comparison) */ - const typename IndexedStringsStorage::table_t& _table; -public: -#ifdef USE_HASHSET - StringsEqualComparator(const typename IndexedStringsStorage::table_t& table): _table(table) {} -#else - StringsLessComparator(const typename IndexedStringsStorage::table_t& table): _table(table) {} -#endif - - /** Comparison of two pointers to C-strings. - * @param lhs Pointer to 1st C-string. - * @param rhs Pointer to 2nd C-string. - * @return True, if 1st argument is equal/less than 2nd argument. - */ - inline bool operator()(IndType lhs, IndType rhs) const { -#ifdef USE_HASHSET - return strcmp(_table[lhs], _table[rhs]) == 0; -#else - return strcmp(_table[lhs], _table[rhs]) < 0; -#endif - } -}; - -#ifdef USE_HASHSET -/** Functor... TODO. - */ -template -class Hasher: public std::unary_function { - - __gnu_cxx::hash _hash; - - /** @var conversion table: index -> string (necessary for indices comparison) */ - const typename IndexedStringsStorage::table_t& _table; - -public: - /** */ - Hasher(const typename IndexedStringsStorage::table_t& table): _hash(), _table(table) {} - - /** Hashing function. - * @param index - * @return Counted hash. - */ - inline size_t operator()(const IndType index) const { - return _hash(_table[index]); - } -}; -#endif - -template -#ifdef USE_HASHSET -IndexedStringsStorage::IndexedStringsStorage(void): _storage(sizeof(char)), _table(), _index(100, hasher_t(_table), equality_comparator_t(_table)) {} -#else -IndexedStringsStorage::IndexedStringsStorage(void): _storage(sizeof(char)), _table(), _index(less_comparator_t(_table)) {} -#endif - -template -IndType IndexedStringsStorage::put(const char* str) { - - if ( this->is_full() ) { - // What a pity, not a single index left to spend. - throw std::bad_alloc(); - } - - // To use the index for lookup we first have to store passed string - // in conversion table (cause during lookup we compare the strings indirectly - // by using their indices). - // Note: thread unsafe! TODO: Redesing. - IndType index = static_cast(_table.size()); - _table.push_back(str); - -#ifdef USE_HASHSET - // - typename index_t::iterator iIndex = _index.find(index); -#else - // A lower_bound() search enables us to use "found" iterator as a hint for - // eventual insertion. - typename index_t::iterator iIndex = _index.lower_bound(index); -#endif - - if ( (iIndex != _index.end()) -#ifndef USE_HASHSET - // In case of lower_bound() search we have to also compare found item - // with passed string. - && (strcmp(_table[*iIndex], str) == 0) -#endif - ) { - // String is already present in storage! - // Pop back temporary stored pointer... - _table.pop_back(); - // ...and return numeric index to already stored copy of `str`. - return static_cast(*iIndex); - } - - // String not found within storage. - - // Allocate memory required for string storage... - char* mem = static_cast(_storage.ordered_malloc(strlen(str) + 1)); - // ...and fill it with copy of passed string. - strcpy(mem, str); - - // Overwrite temporary stored pointer to `str` with pointer to freshly - // saved copy. - _table[index] = mem; - -#ifdef USE_HASHSET - // Insert the index into lookup table. - _index.insert(index); -#else - // Insert the index into lookup table (use previously retrieved iterator - // as a hint). - _index.insert(iIndex, index); -#endif - - // Finally. - return index; -} - -#endif +/** + * ISS (Indexed Strings Storage) - memory efficient storage for permanent strings. + * + * Implementation note: use #define USE_HASHSET to switch between implementation + * using __gnu_cxx::hash_set and implementation using std::set. + * + * (C) Ceslav Przywara, UFAL MFF UK, 2011 + * + * $Id$ + */ + +#ifndef _ISS_H +#define _ISS_H + +#include +#include +#include + +// Use hashset instead of std::set for string-to-number indexing? +#ifdef USE_HASHSET +#include +#else +#include +#endif + +#include + +#ifdef USE_HASHSET +// Forward declaration of comparator functor. +template +class StringsEqualComparator; + +template +class Hasher; +#else +// Forward declaration of comparator functor. +template +class StringsLessComparator; +#endif + +/** + */ +template +class IndexedStringsStorage { + +public: + + typedef IndType index_type; + +#ifdef USE_HASHSET + typedef StringsEqualComparator equality_comparator_t; + + typedef Hasher hasher_t; + + /** @typedef Hash set used as lookup table (string -> numeric index). */ + typedef __gnu_cxx::hash_set index_t; +#else + typedef StringsLessComparator less_comparator_t; + + /** @typedef Set used as lookup table (string -> numeric index). */ + typedef std::set index_t; +#endif + /** @typedef Container of pointers to stored C-strings. Acts as + * conversion table: numeric index -> string. + */ + typedef std::vector table_t; + +private: + + /** @var memory pool used to store C-strings */ + boost::pool<> _storage; + + /** @var index-to-string conversion table */ + table_t _table; + + /** @var index lookup table */ + index_t _index; + +public: + /** Default constructor. + */ + IndexedStringsStorage(void); + + /** @return True, if the indices are exhausted (new strings cannot be stored). + */ + inline bool is_full(void) const { return _table.size() == std::numeric_limits::max(); } + + /** Retrieves pointer to C-string instance represented by given index. + * Note: No range checks are performed! + * @param index Index of C-string to retrieve. + * @return Pointer to stored C-string instance. + */ + inline const char* get(IndType index) const { return _table[index]; } + + /** Stores the string and returns its numeric index. + * @param str Pointer to C-string to store. + * @return Index of stored copy of str. + * @throw std::bad_alloc When insertion of new string would cause + * overflow of indices datatype. + */ + IndType put(const char* str); + + /** @return Number of unique strings stored so far. + */ + inline table_t::size_type size(void) const { return _table.size(); } +}; + + +/** Functor designed for less than comparison of C-strings stored within StringStore. + * @param IndType Type of numerical indices of strings within given StringStore. + */ +#ifdef USE_HASHSET +template +class StringsEqualComparator: public std::binary_function { +#else +template +class StringsLessComparator: public std::binary_function { +#endif + /** @var conversion table: index -> string (necessary for indices comparison) */ + const typename IndexedStringsStorage::table_t& _table; +public: +#ifdef USE_HASHSET + StringsEqualComparator(const typename IndexedStringsStorage::table_t& table): _table(table) {} +#else + StringsLessComparator(const typename IndexedStringsStorage::table_t& table): _table(table) {} +#endif + + /** Comparison of two pointers to C-strings. + * @param lhs Pointer to 1st C-string. + * @param rhs Pointer to 2nd C-string. + * @return True, if 1st argument is equal/less than 2nd argument. + */ + inline bool operator()(IndType lhs, IndType rhs) const { +#ifdef USE_HASHSET + return strcmp(_table[lhs], _table[rhs]) == 0; +#else + return strcmp(_table[lhs], _table[rhs]) < 0; +#endif + } +}; + +#ifdef USE_HASHSET +/** Functor... TODO. + */ +template +class Hasher: public std::unary_function { + + __gnu_cxx::hash _hash; + + /** @var conversion table: index -> string (necessary for indices comparison) */ + const typename IndexedStringsStorage::table_t& _table; + +public: + /** */ + Hasher(const typename IndexedStringsStorage::table_t& table): _hash(), _table(table) {} + + /** Hashing function. + * @param index + * @return Counted hash. + */ + inline size_t operator()(const IndType index) const { + return _hash(_table[index]); + } +}; +#endif + +template +#ifdef USE_HASHSET +IndexedStringsStorage::IndexedStringsStorage(void): _storage(sizeof(char)), _table(), _index(100, hasher_t(_table), equality_comparator_t(_table)) {} +#else +IndexedStringsStorage::IndexedStringsStorage(void): _storage(sizeof(char)), _table(), _index(less_comparator_t(_table)) {} +#endif + +template +IndType IndexedStringsStorage::put(const char* str) { + + if ( this->is_full() ) { + // What a pity, not a single index left to spend. + throw std::bad_alloc(); + } + + // To use the index for lookup we first have to store passed string + // in conversion table (cause during lookup we compare the strings indirectly + // by using their indices). + // Note: thread unsafe! TODO: Redesing. + IndType index = static_cast(_table.size()); + _table.push_back(str); + +#ifdef USE_HASHSET + // + typename index_t::iterator iIndex = _index.find(index); +#else + // A lower_bound() search enables us to use "found" iterator as a hint for + // eventual insertion. + typename index_t::iterator iIndex = _index.lower_bound(index); +#endif + + if ( (iIndex != _index.end()) +#ifndef USE_HASHSET + // In case of lower_bound() search we have to also compare found item + // with passed string. + && (strcmp(_table[*iIndex], str) == 0) +#endif + ) { + // String is already present in storage! + // Pop back temporary stored pointer... + _table.pop_back(); + // ...and return numeric index to already stored copy of `str`. + return static_cast(*iIndex); + } + + // String not found within storage. + + // Allocate memory required for string storage... + char* mem = static_cast(_storage.ordered_malloc(strlen(str) + 1)); + // ...and fill it with copy of passed string. + strcpy(mem, str); + + // Overwrite temporary stored pointer to `str` with pointer to freshly + // saved copy. + _table[index] = mem; + +#ifdef USE_HASHSET + // Insert the index into lookup table. + _index.insert(index); +#else + // Insert the index into lookup table (use previously retrieved iterator + // as a hint). + _index.insert(iIndex, index); +#endif + + // Finally. + return index; +} + +#endif diff --git a/contrib/eppex/LossyCounter.h b/contrib/eppex/LossyCounter.h index 57cce079d7..a3cf3339f7 100644 --- a/contrib/eppex/LossyCounter.h +++ b/contrib/eppex/LossyCounter.h @@ -13,8 +13,8 @@ #ifndef LOSSYCOUNTER_H #define LOSSYCOUNTER_H -#include -#include +#include +#include #ifdef USE_UNORDERED_MAP #include #else @@ -83,7 +83,7 @@ class LossyCounter { const counter_t bucketWidth; // ceil(1/error) private: - + /** @var Current epoch bucket ID (b-current) */ counter_t _bucketId; @@ -182,7 +182,7 @@ class LossyCounterIterator: public std::iterator self_type; - + typedef typename LossyCounter::storage_t::const_iterator const_iterator; protected: @@ -288,7 +288,7 @@ class LossyCounterErasingIterator: public LossyCounterIterator { template void LossyCounter::add(const T& item) { - + typename storage_t::iterator iter = _storage.find(item); if ( iter == _storage.end() ) { @@ -330,7 +330,7 @@ void LossyCounter::prune(void) { //////////////////////////////////////////////////////////////////////////////// template -LossyCounterIterator LossyCounterIterator::operator++(void) { +LossyCounterIterator LossyCounterIterator::operator++(void) { this->forward(); return *this; } diff --git a/contrib/eppex/counter.cpp b/contrib/eppex/counter.cpp index 403e18a081..085837faba 100644 --- a/contrib/eppex/counter.cpp +++ b/contrib/eppex/counter.cpp @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include #include "phrase-extract.h" diff --git a/contrib/eppex/eppex.cpp b/contrib/eppex/eppex.cpp index d382890d2b..76490d9d22 100644 --- a/contrib/eppex/eppex.cpp +++ b/contrib/eppex/eppex.cpp @@ -92,7 +92,7 @@ int main(int argc, char* argv[]) { // Init lossy counters. std::string lossyCountersParams; int paramIdx = 5; - + while ( (argc > paramIdx) && (*argv[paramIdx] != '-') ) { std::string param = std::string(argv[paramIdx]); if ( !parse_lossy_counting_params(param) ) { @@ -113,7 +113,7 @@ int main(int argc, char* argv[]) { usage(argv[0]); } } - + if ( (argc > paramIdx) && (strcmp(argv[paramIdx], "--compact") == 0) ) { compactOutputFlag = true; ++paramIdx; @@ -154,7 +154,7 @@ int main(int argc, char* argv[]) { readInput(eFile, fFile, aFile); std::cerr << std::endl; // Leave the progress bar end on previous line. - + // close input files eFile.close(); fFile.close(); diff --git a/contrib/eppex/phrase-extract.cpp b/contrib/eppex/phrase-extract.cpp index 5dff43b783..46337a8b72 100644 --- a/contrib/eppex/phrase-extract.cpp +++ b/contrib/eppex/phrase-extract.cpp @@ -32,14 +32,14 @@ typedef std::vector output_vector_t; class PhraseComp { /** @var If true, sort by target phrase first. */ bool _inverted; - + bool compareAlignments(const indexed_phrases_pair_t& a, const indexed_phrases_pair_t& b); int comparePhrases(const indexed_phrases_pair_t::phrase_t& a, const indexed_phrases_pair_t::phrase_t& b); - + public: PhraseComp(bool inverted): _inverted(inverted) {} - + bool operator()(const output_pair_t& a, const output_pair_t& b); }; @@ -448,9 +448,9 @@ void extract(SentenceAlignment &sentence) { ((phraseModel)? getOrientString(phrasePrevOrient, phraseType) + " " + getOrientString(phraseNextOrient, phraseType) : "") + " | " + ((hierModel)? getOrientString(hierPrevOrient, hierType) + " " + getOrientString(hierNextOrient, hierType) : ""); } - + addPhrase(sentence, startE, endE, startF, endF, orientationInfo); - + } // end of for loop through inbound phrases } // end if buildExtraStructure @@ -567,7 +567,7 @@ bool PhraseComp::operator()(const output_pair_t& a, const output_pair_t& b) { else { return cmp < 0; } - + } @@ -607,7 +607,7 @@ bool PhraseComp::compareAlignments(const indexed_phrases_pair_t& a, const indexe return cmp < 0; } } - + // Note: LC_ALL=C GNU sort treats shorter item as lesser than longer one. return (cmp == 0) ? (aSize < bSize) : (cmp < 0); @@ -685,7 +685,7 @@ void processSortedOutput(OutputProcessor& processor) { void processUnsortedOutput(OutputProcessor& processor) { - + LossyCountersVector::value_type current = NULL, prev = NULL; for ( size_t i = 1; i < lossyCounters.size(); ++i ) { // Intentionally skip 0. @@ -759,7 +759,7 @@ void printStats(void) { if ( (current == NULL) || ((current != prev) && (prev != NULL)) ) { // Time to print. to = i-1; - + // Increment overall stats. outputMass += prev->outputMass; outputSize += prev->outputSize; @@ -787,7 +787,7 @@ void printStats(void) { from = i; } - + prev = current; } diff --git a/contrib/expected-bleu-training/ExpectedBleuOptimizer.cpp b/contrib/expected-bleu-training/ExpectedBleuOptimizer.cpp new file mode 100644 index 0000000000..1acea48f6b --- /dev/null +++ b/contrib/expected-bleu-training/ExpectedBleuOptimizer.cpp @@ -0,0 +1,223 @@ +/* + Moses - statistical machine translation system + Copyright (C) 2005-2015 University of Edinburgh + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#include "ExpectedBleuOptimizer.h" + + +namespace ExpectedBleuTraining +{ + + +void ExpectedBleuOptimizer::AddTrainingInstance(const size_t nBestSizeCount, + const std::vector& sBleu, + const std::vector& overallScoreUntransformed, + const std::vector< boost::unordered_map > &sparseScore, + bool maintainUpdateSet) +{ + + // compute xBLEU + double sumUntransformedScores = 0.0; + for (std::vector::const_iterator overallScoreUntransformedIt=overallScoreUntransformed.begin(); + overallScoreUntransformedIt!=overallScoreUntransformed.end(); ++overallScoreUntransformedIt) + { + sumUntransformedScores += *overallScoreUntransformedIt; + } + + double xBleu = 0.0; + assert(nBestSizeCount == overallScoreUntransformed.size()); + std::vector p; + for (size_t i=0; i::const_iterator sparseScoreIt=sparseScore[i].begin(); + sparseScoreIt!=sparseScore[i].end(); ++sparseScoreIt) + { + const size_t name = sparseScoreIt->first; + float N = sparseScoreIt->second; + if ( std::fpclassify( p[i] * N * D ) == FP_SUBNORMAL ) + { + m_err << "Error: encountered subnormal value: p[i] * N * D= " << p[i] * N * D + << " with p[i]= " << p[i] << " N= " << N << " D= " << D << '\n'; + m_err.flush(); + exit(1); + } else { + m_gradient[name] += p[i] * N * D; + if ( maintainUpdateSet ) + { + m_updateSet.insert(name); + } + } + } + } + + m_xBleu += xBleu; +} + + +void ExpectedBleuOptimizer::InitSGD(const std::vector& sparseScalingFactor) +{ + const size_t nFeatures = sparseScalingFactor.size(); + memcpy(&m_previousSparseScalingFactor.at(0), &sparseScalingFactor.at(0), nFeatures); + m_gradient.resize(nFeatures); +} + + +float ExpectedBleuOptimizer::UpdateSGD(std::vector& sparseScalingFactor, + size_t batchSize, + bool useUpdateSet) +{ + + float xBleu = m_xBleu / batchSize; + + // update sparse scaling factors + + if (useUpdateSet) { + + for (std::set::const_iterator it = m_updateSet.begin(); it != m_updateSet.end(); ++it) + { + size_t name = *it; + UpdateSingleScalingFactorSGD(name, sparseScalingFactor, batchSize); + } + + m_updateSet.clear(); + + } else { + + for (size_t name=0; name& sparseScalingFactor, + size_t batchSize) +{ + // regularization + if ( m_regularizationParameter != 0 ) + { + m_gradient[name] = m_gradient[name] / m_xBleu - m_regularizationParameter * 2 * sparseScalingFactor[name]; + } else { + // need to normalize by dividing by batchSize + m_gradient[name] /= batchSize; + } + + // the actual update + sparseScalingFactor[name] += m_learningRate * m_gradient[name]; + + // discard scaling factors below a threshold + if ( fabs(sparseScalingFactor[name]) < m_floorAbsScalingFactor ) + { + sparseScalingFactor[name] = 0; + } +} + + +void ExpectedBleuOptimizer::InitRPROP(const std::vector& sparseScalingFactor) +{ + const size_t nFeatures = sparseScalingFactor.size(); + m_previousSparseScalingFactor.resize(nFeatures); + memcpy(&m_previousSparseScalingFactor.at(0), &sparseScalingFactor.at(0), nFeatures); + m_previousGradient.resize(nFeatures); + m_gradient.resize(nFeatures); + m_stepSize.resize(nFeatures, m_initialStepSize); +} + + +float ExpectedBleuOptimizer::UpdateRPROP(std::vector& sparseScalingFactor, + const size_t batchSize) +{ + + float xBleu = m_xBleu / batchSize; + + // update sparse scaling factors + + for (size_t name=0; name 0) { + m_stepSize[name] *= m_increaseRate; + } else if (sign < 0) { + m_stepSize[name] *= m_decreaseRate; + } + if (m_stepSize[name] < m_minStepSize) { + m_stepSize[name] = m_minStepSize; + } + if (m_stepSize[name] > m_maxStepSize) { + m_stepSize[name] = m_maxStepSize; + } + + // the actual update + + m_previousGradient[name] = m_gradient[name]; + if (sign >= 0) { + if (m_gradient[name] > 0) { + m_previousSparseScalingFactor[name] = sparseScalingFactor[name]; + sparseScalingFactor[name] += m_stepSize[name]; + } else if (m_gradient[name] < 0) { + m_previousSparseScalingFactor[name] = sparseScalingFactor[name]; + sparseScalingFactor[name] -= m_stepSize[name]; + } + } else { + sparseScalingFactor[name] = m_previousSparseScalingFactor[name]; + // m_previousGradient[name] = 0; + } + + // discard scaling factors below a threshold + if ( fabs(sparseScalingFactor[name]) < m_floorAbsScalingFactor ) + { + sparseScalingFactor[name] = 0; + } + } + + m_xBleu = 0; + m_gradient.clear(); + return xBleu; +} + + +} + diff --git a/contrib/expected-bleu-training/ExpectedBleuOptimizer.h b/contrib/expected-bleu-training/ExpectedBleuOptimizer.h new file mode 100644 index 0000000000..438f7d161d --- /dev/null +++ b/contrib/expected-bleu-training/ExpectedBleuOptimizer.h @@ -0,0 +1,117 @@ +/* + Moses - statistical machine translation system + Copyright (C) 2005-2015 University of Edinburgh + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#pragma once + +#include +#include +#include +#include "util/file_stream.hh" + + +namespace ExpectedBleuTraining +{ + +class ExpectedBleuOptimizer +{ +public: + + ExpectedBleuOptimizer(util::FileStream& err, + float learningRate=1, + float initialStepSize=0.001, + float decreaseRate=0.5, + float increaseRate=1.2, + float minStepSize=1e-7, + float maxStepSize=1, + float floorAbsScalingFactor=0, + float regularizationParameter=0) + : m_err(err) + , m_learningRate(learningRate) + , m_initialStepSize(initialStepSize) + , m_decreaseRate(decreaseRate) + , m_increaseRate(increaseRate) + , m_minStepSize(minStepSize) + , m_maxStepSize(maxStepSize) + , m_floorAbsScalingFactor(floorAbsScalingFactor) + , m_regularizationParameter(regularizationParameter) + , m_xBleu(0) + { } + + void AddTrainingInstance(const size_t nBestSizeCount, + const std::vector& sBleu, + const std::vector& overallScoreUntransformed, + const std::vector< boost::unordered_map > &sparseScore, + bool maintainUpdateSet = false); + + void InitSGD(const std::vector& sparseScalingFactor); + + float UpdateSGD(std::vector& sparseScalingFactor, + size_t batchSize, + bool useUpdateSet = false); + + void InitRPROP(const std::vector& sparseScalingFactor); + + float UpdateRPROP(std::vector& sparseScalingFactor, + const size_t batchSize); + +protected: + + util::FileStream& m_err; + + // for SGD + const float m_learningRate; + + // for RPROP + const float m_initialStepSize; + const float m_decreaseRate; + const float m_increaseRate; + const float m_minStepSize; + const float m_maxStepSize; + + std::vector m_previousSparseScalingFactor; + std::vector m_previousGradient; + std::vector m_gradient; + std::vector m_stepSize; + + // other + const float m_floorAbsScalingFactor; + const float m_regularizationParameter; + + double m_xBleu; + + std::set m_updateSet; + + + void UpdateSingleScalingFactorSGD(size_t name, + std::vector& sparseScalingFactor, + size_t batchSize); + + + inline int Sign(double x) + { + if (x > 0) return 1; + if (x < 0) return -1; + return 0; + } +}; + +} + + diff --git a/contrib/expected-bleu-training/Jamfile b/contrib/expected-bleu-training/Jamfile new file mode 100644 index 0000000000..3d660650e9 --- /dev/null +++ b/contrib/expected-bleu-training/Jamfile @@ -0,0 +1,2 @@ +exe prepare-expected-bleu-training : PrepareExpectedBleuTraining.cpp ../../util//kenutil ; +exe train-expected-bleu : TrainExpectedBleu.cpp ExpectedBleuOptimizer.cpp ../../util//kenutil ; diff --git a/contrib/expected-bleu-training/PrepareExpectedBleuTraining.cpp b/contrib/expected-bleu-training/PrepareExpectedBleuTraining.cpp new file mode 100644 index 0000000000..6873494b59 --- /dev/null +++ b/contrib/expected-bleu-training/PrepareExpectedBleuTraining.cpp @@ -0,0 +1,222 @@ +/* + Moses - statistical machine translation system + Copyright (C) 2005-2015 University of Edinburgh + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#include +#include +#include +#include +#include +#include +#include +#include "util/file_stream.hh" +#include "util/file.hh" +#include "util/file_piece.hh" +#include "util/string_piece.hh" +#include "util/tokenize_piece.hh" + +namespace po = boost::program_options; + + +int main(int argc, char **argv) +{ + util::FileStream err(2); + + std::string filenameNBestListIn, filenameFeatureNamesOut, filenameIgnoreFeatureNames; + size_t maxNBestSize; + + try { + + po::options_description descr("Usage"); + descr.add_options() + ("help,h", "produce help message") + ("n-best-list,n", po::value(&filenameNBestListIn)->required(), + "input n-best list file") + ("write-feature-names-file,f", po::value(&filenameFeatureNamesOut)->required(), + "output file for mapping between feature names and indices") + ("ignore-features-file,i", po::value(&filenameIgnoreFeatureNames)->required(), + "input file containing list of feature names to be ignored") + ("n-best-size-limit,l", po::value(&maxNBestSize)->default_value(100), + "limit of n-best list entries to be considered") + ; + + po::variables_map vm; + po::store(po::parse_command_line(argc, argv, descr), vm); + + if (vm.count("help")) { + std::ostringstream os; + os << descr; + std::cout << os.str() << '\n'; + exit(0); + } + + po::notify(vm); + + } catch(std::exception& e) { + + err << "Error: " << e.what() << '\n'; + err.flush(); + exit(1); + } + + util::FilePiece ifsNBest(filenameNBestListIn.c_str()); + util::FilePiece ifsIgnoreFeatureNames(filenameIgnoreFeatureNames.c_str()); + util::scoped_fd fdFeatureNames(util::CreateOrThrow(filenameFeatureNamesOut.c_str())); + util::FileStream ofsFeatureNames(fdFeatureNames.get()); + util::FileStream ofsNBest(1); + + boost::unordered_set ignoreFeatureNames; + StringPiece line; + + while ( ifsIgnoreFeatureNames.ReadLineOrEOF(line) ) + { + if ( !line.empty() ) { + util::TokenIter item(line, " \t="); + if ( item != item.end() ) + { + ignoreFeatureNames.insert(item->as_string()); + } + err << "ignoring " << *item << '\n'; + } + } + + size_t maxFeatureNamesIdx = 0; + boost::unordered_map featureNames; + + size_t sentenceIndex = 0; + size_t nBestSizeCount = 0; + size_t globalIndex = 0; + + while ( ifsNBest.ReadLineOrEOF(line) ) + { + util::TokenIter item(line, " ||| "); + + if ( item == item.end() ) + { + err << "Error: flawed content in " << filenameNBestListIn << '\n'; + exit(1); + } + + size_t sentenceIndexCurrent = atol( item->as_string().c_str() ); + + if ( sentenceIndex != sentenceIndexCurrent ) + { + nBestSizeCount = 0; + sentenceIndex = sentenceIndexCurrent; + } + + if ( nBestSizeCount < maxNBestSize ) + { + // process n-best list entry + + StringPiece scores; + StringPiece decoderScore; + for (size_t nItem=1; nItem<=3; ++nItem) + { + if ( ++item == item.end() ) { + err << "Error: flawed content in " << filenameNBestListIn << '\n'; + exit(1); + } + if (nItem == 2) { + scores = *item; + } + if (nItem == 3) { + decoderScore = *item; + } + } + + ofsNBest << sentenceIndex << ' ' + << decoderScore; + + util::TokenIter token(scores, ' '); + std::string featureNameCurrent("ERROR"); + std::string featureNameCurrentBase("ERROR"); + bool ignore = false; + int scoreComponentIndex = 0; + + while ( token != token.end() ) + { + if ( token->ends_with("=") ) + { + scoreComponentIndex = 0; + featureNameCurrent = token->substr(0,token->size()-1).as_string(); + size_t idx = featureNameCurrent.find_first_of('_'); + if ( idx == StringPiece::npos ) { + featureNameCurrentBase = featureNameCurrent; + } else { + featureNameCurrentBase = featureNameCurrent.substr(0,idx+1); + } + ignore = false; + if ( ignoreFeatureNames.find(featureNameCurrentBase) != ignoreFeatureNames.end() ) + { + ignore = true; + } else { + if ( (featureNameCurrent.compare(featureNameCurrentBase)) && + (ignoreFeatureNames.find(featureNameCurrent) != ignoreFeatureNames.end()) ) + { + ignore = true; + } + } + } + else + { + if ( !ignore ) + { + float featureValueCurrent = atof( token->as_string().c_str() );; + if ( scoreComponentIndex > 0 ) + { + std::ostringstream oss; + oss << scoreComponentIndex; + featureNameCurrent.append("+"); + } + if ( featureValueCurrent != 0 ) + { + boost::unordered_map::iterator featureName = featureNames.find(featureNameCurrent); + + if ( featureName == featureNames.end() ) + { + std::pair< boost::unordered_map::iterator, bool> inserted = + featureNames.insert( std::make_pair(featureNameCurrent, maxFeatureNamesIdx) ); + ++maxFeatureNamesIdx; + featureName = inserted.first; + } + + ofsNBest << ' ' << featureName->second // feature name index + << ' ' << *token; // feature value + } + ++scoreComponentIndex; + } + } + ++token; + } + ofsNBest << '\n'; + ++nBestSizeCount; + } + ++globalIndex; + } + + ofsFeatureNames << maxFeatureNamesIdx << '\n'; + for (boost::unordered_map::const_iterator featureNamesIt=featureNames.begin(); + featureNamesIt!=featureNames.end(); ++featureNamesIt) + { + ofsFeatureNames << featureNamesIt->second << ' ' << featureNamesIt->first << '\n'; + } + +} + diff --git a/contrib/expected-bleu-training/TrainExpectedBleu.cpp b/contrib/expected-bleu-training/TrainExpectedBleu.cpp new file mode 100644 index 0000000000..1c6c063215 --- /dev/null +++ b/contrib/expected-bleu-training/TrainExpectedBleu.cpp @@ -0,0 +1,379 @@ +/* + Moses - statistical machine translation system + Copyright (C) 2005-2015 University of Edinburgh + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +*/ + + +#include "ExpectedBleuOptimizer.h" +#include "util/file_stream.hh" +#include "util/file_piece.hh" +#include "util/string_piece.hh" +#include "util/tokenize_piece.hh" + +#include +#include + +using namespace ExpectedBleuTraining; +namespace po = boost::program_options; + + +int main(int argc, char **argv) { + + util::FileStream out(1); + util::FileStream err(2); + + size_t maxNBestSize; + size_t iterationLimit; + std::string filenameSBleu, filenameNBestList, filenameFeatureNames, filenameInitialWeights; + + bool ignoreDecoderScore; + + float learningRate; + float initialStepSize; + float decreaseRate; + float increaseRate; + float minStepSize; + float maxStepSize; + float floorAbsScalingFactor; + float regularizationParameter; + bool printZeroWeights; + bool miniBatches; + std::string optimizerTypeStr; + size_t optimizerType = 0; +#define EXPECTED_BLEU_OPTIMIZER_TYPE_RPROP 1 +#define EXPECTED_BLEU_OPTIMIZER_TYPE_SGD 2 + + try { + + po::options_description descr("Usage"); + descr.add_options() + ("help,h", "produce help message") + ("n-best-size-limit,l", po::value(&maxNBestSize)->default_value(100), + "limit of n-best list entries to be considered for training") + ("iterations,i", po::value(&iterationLimit)->default_value(50), + "number of training iterations") + ("sbleu-file,b", po::value(&filenameSBleu)->required(), + "file containing sentence-level BLEU scores for all n-best list entries") + ("prepared-n-best-list,n", po::value(&filenameNBestList)->required(), + "input n-best list file, in prepared format for expected BLEU training") + ("feature-name-file,f", po::value(&filenameFeatureNames)->required(), + "file containing mapping between feature names and indices") + ("initial-weights-file,w", po::value(&filenameInitialWeights)->default_value(""), + "file containing start values for scaling factors (optional)") + ("ignore-decoder-score", boost::program_options::value(&ignoreDecoderScore)->default_value(0), + "exclude decoder score from computation of posterior probability") + ("regularization", boost::program_options::value(®ularizationParameter)->default_value(0), // e.g. 1e-5 + "regularization parameter; suggested value range: [1e-8,1e-5]") + ("learning-rate", boost::program_options::value(&learningRate)->default_value(1), + "learning rate for the SGD optimizer") + ("floor", boost::program_options::value(&floorAbsScalingFactor)->default_value(0), // e.g. 1e-7 + "set scaling factor to 0 if below this absolute value after update") + ("initial-step-size", boost::program_options::value(&initialStepSize)->default_value(0.001), // TODO: try 0.01 and 0.1 + "initial step size for the RPROP optimizer") + ("decrease-rate", boost::program_options::value(&decreaseRate)->default_value(0.5), + "decrease rate for the RPROP optimizer") + ("increase-rate", boost::program_options::value(&increaseRate)->default_value(1.2), + "increase rate for the RPROP optimizer") + ("min-step-size", boost::program_options::value(&minStepSize)->default_value(1e-7), + "minimum step size for the RPROP optimizer") + ("max-step-size", boost::program_options::value(&maxStepSize)->default_value(1), + "maximum step size for the RPROP optimizer") + ("print-zero-weights", boost::program_options::value(&printZeroWeights)->default_value(0), + "output scaling factors even if they are trained to 0") + ("optimizer", po::value(&optimizerTypeStr)->default_value("RPROP"), + "optimizer type used for training (known algorithms: RPROP, SGD)") + ("mini-batches", boost::program_options::value(&miniBatches)->default_value(0), + "update after every single sentence (SGD only)") + ; + + po::variables_map vm; + po::store(po::parse_command_line(argc, argv, descr), vm); + + if (vm.count("help")) { + std::ostringstream os; + os << descr; + out << os.str() << '\n'; + out.flush(); + exit(0); + } + + po::notify(vm); + + } catch(std::exception& e) { + + err << "Error: " << e.what() << '\n'; + err.flush(); + exit(1); + } + + if ( !optimizerTypeStr.compare("rprop") || !optimizerTypeStr.compare("RPROP") ) { + optimizerType = EXPECTED_BLEU_OPTIMIZER_TYPE_RPROP; + } else if ( !optimizerTypeStr.compare("sgd") || !optimizerTypeStr.compare("SGD") ) { + optimizerType = EXPECTED_BLEU_OPTIMIZER_TYPE_SGD; + } else { + err << "Error: unknown optimizer type: \"" << optimizerTypeStr << "\" (known optimizers: rprop, sgd) " << '\n'; + err.flush(); + exit(1); + } + + + + util::FilePiece ifsFeatureNames(filenameFeatureNames.c_str()); + + StringPiece lineFeatureName; + if ( !ifsFeatureNames.ReadLineOrEOF(lineFeatureName) ) + { + err << "Error: flawed content in " << filenameFeatureNames << '\n'; + err.flush(); + exit(1); + } + size_t maxFeatureNamesIdx = atol( lineFeatureName.as_string().c_str() ); + + std::vector featureNames(maxFeatureNamesIdx); + boost::unordered_map featureIndexes; + for (size_t i=0; i token(lineFeatureName, ' '); + size_t featureIndexCurrent = atol( token->as_string().c_str() ); + token++; + featureNames[featureIndexCurrent] = token->as_string(); + featureIndexes[token->as_string()] = featureIndexCurrent; + } + + + std::vector sparseScalingFactor(maxFeatureNamesIdx); + std::vector< boost::unordered_map > sparseScore(maxNBestSize); + + // read initial weights, if any given + + if ( filenameInitialWeights.length() != 0 ) + { + util::FilePiece ifsInitialWeights(filenameInitialWeights.c_str()); + + StringPiece lineInitialWeight; + if ( !ifsInitialWeights.ReadLineOrEOF(lineInitialWeight) ) { + err << "Error: flawed content in " << filenameInitialWeights << '\n'; + err.flush(); + exit(1); + } + do { + util::TokenIter token(lineInitialWeight, ' '); + boost::unordered_map::const_iterator found = featureIndexes.find(token->as_string()); + if ( found == featureIndexes.end() ) { + err << "Error: flawed content in " << filenameInitialWeights << " (unkown feature name \"" << token->as_string() << "\")" << '\n'; + err.flush(); + exit(1); + } + token++; + sparseScalingFactor[found->second] = atof( token->as_string().c_str() ); + } while ( ifsInitialWeights.ReadLineOrEOF(lineInitialWeight) ); + } + + // train + + ExpectedBleuOptimizer optimizer(err, + learningRate, + initialStepSize, + decreaseRate, + increaseRate, + minStepSize, + maxStepSize, + floorAbsScalingFactor, + regularizationParameter); + + if ( optimizerType == EXPECTED_BLEU_OPTIMIZER_TYPE_RPROP ) + { + optimizer.InitRPROP(sparseScalingFactor); + } else if ( optimizerType == EXPECTED_BLEU_OPTIMIZER_TYPE_SGD ) { + optimizer.InitRPROP(sparseScalingFactor); + } else { + err << "Error: unknown optimizer type" << '\n'; + err.flush(); + exit(1); + } + + for (size_t nIteration=1; nIteration<=iterationLimit; ++nIteration) + { + util::FilePiece ifsSBleu(filenameSBleu.c_str()); + util::FilePiece ifsNBest(filenameNBestList.c_str()); + + out << "### ITERATION " << nIteration << '\n' << '\n'; + + size_t sentenceIndex = 0; + size_t batchSize = 0; + size_t nBestSizeCount = 0; + size_t globalIndex = 0; + StringPiece lineNBest; + std::vector overallScoreUntransformed; + std::vector sBleu; + float xBleu = 0; + // double expPrecisionCorrection = 0.0; + + while ( ifsNBest.ReadLineOrEOF(lineNBest) ) + { + + util::TokenIter token(lineNBest, ' '); + + if ( token == token.end() ) + { + err << "Error: flawed content in " << filenameNBestList << '\n'; + err.flush(); + exit(1); + } + + size_t sentenceIndexCurrent = atol( token->as_string().c_str() ); + token++; + + if ( sentenceIndex != sentenceIndexCurrent ) + { + + if ( optimizerType == EXPECTED_BLEU_OPTIMIZER_TYPE_RPROP ) + { + optimizer.AddTrainingInstance( nBestSizeCount, sBleu, overallScoreUntransformed, sparseScore ); + } else if ( optimizerType == EXPECTED_BLEU_OPTIMIZER_TYPE_SGD ) { + optimizer.AddTrainingInstance( nBestSizeCount, sBleu, overallScoreUntransformed, sparseScore, miniBatches ); + + if ( miniBatches ) { + xBleu += optimizer.UpdateSGD( sparseScalingFactor, 1 ); + // out << "ITERATION " << nIteration << " SENTENCE " << sentenceIndex << " XBLEUSUM= " << xBleu << '\n'; + // for (size_t i=0; ias_string().c_str() ); // decoder score + } + token++; + + // if ( nBestSizeCount == 0 ) // best translation (first n-best list entry for the current sentence / a new mini-batch) + // { + // expPrecisionCorrection = std::floor ( scoreCurrent ); // decoder score of first-best + // } + + while (token != token.end()) + { + size_t featureNameCurrent = atol( token->as_string().c_str() ); + token++; + float featureValueCurrent = atof( token->as_string().c_str() ); + sparseScore[nBestSizeCount].insert(std::make_pair(featureNameCurrent, featureValueCurrent)); + scoreCurrent += sparseScalingFactor[featureNameCurrent] * featureValueCurrent; + token++; + } + + // overallScoreUntransformed.push_back( std::exp(scoreCurrent - expPrecisionCorrection) ); + overallScoreUntransformed.push_back( std::exp(scoreCurrent) ); + + ++nBestSizeCount; + } + ++globalIndex; + } + + if ( optimizerType == EXPECTED_BLEU_OPTIMIZER_TYPE_RPROP ) + { + optimizer.AddTrainingInstance( nBestSizeCount, sBleu, overallScoreUntransformed, sparseScore ); // last sentence in the corpus + xBleu = optimizer.UpdateRPROP( sparseScalingFactor, batchSize ); + out << "xBLEU= " << xBleu << '\n'; + } else if ( optimizerType == EXPECTED_BLEU_OPTIMIZER_TYPE_SGD ) { + optimizer.AddTrainingInstance( nBestSizeCount, sBleu, overallScoreUntransformed, sparseScore, miniBatches ); // last sentence in the corpus + if ( miniBatches ) { + xBleu += optimizer.UpdateSGD( sparseScalingFactor, 1 ); + xBleu /= batchSize; + } else { + xBleu = optimizer.UpdateSGD( sparseScalingFactor, batchSize ); + } + out << "xBLEU= " << xBleu << '\n'; + } else { + err << "Error: unknown optimizer type" << '\n'; + err.flush(); + exit(1); + } + + for (size_t i=0; iLoad Unpacked Extension. Navigate to this `goshen-chrome/` directory, and load. +2. This adds a Goshen icon to your Chrome toolbar. Clicking it brings up a simple modal that allows the switching of languages. +3. Use the Alt+T key-chord ("T" for "Translate") to begin text-selection. The Goshen-translate extension will highlight elements of text in cyan as you mouse over them: To translate what is currently highlighted, click. + +## Goshen.js Documentatio + +### Overview +The Goshen library provides a web-developer-facing library for handling machine translation. It allows interaction with arbitrary machine translation services, agnostic of the technology or algorithm stack. + +### Usage +A very brief tutorial is provided here: + +- Create a new Goshen object. Use the MosesGoshenAdapter, so that translations are handled by a Moses MT server. + ```JavaScript + g = new Goshen('localhost:3000', 'http', MosesGoshenAdapter); + ``` +- Use the Goshen object to pass a translation job to the Moses adapter. The adapter will pass back a completed translation once the job completes. + ```JavaScript + g.translate('This is a simple sentence.', Languages.ENGLISH, Languages.SPANISH); + ``` +- You can also optionally pass a callback function to the .translate method: + ```JavaScript + g.translate('This is a simple sentence.', + Languages.ENGLISH, + Languages.SPANISH, + function(err, val) { + if (!!err) { + console.warn("Encountered an error: " + err); + } else { + console.info("Translated to: " + val); + } + }); + ``` + If a callback is supplied, the function is run on a new thread, and is non-blocking. If one is not supplied, then the return value of the function contains the translated text. `undefined` is returned if the translation fails. + + +### `Goshen` +The generic class for a Goshen.js object, the object that handles translation with an arbitrary translation backend. In order to specify a backend, pass a `type` parameter to the constructor. (Default is Moses, of course!) + +- `Goshen` + - Arguments: + - `hostname`: A string hostname, such as `locahost:8000`. This is the base URL for formulating the RESTful API endpoint. + - `protocol`: The HTTP protocol. Either `http` or `https`. + - `type`: What type of GoshenAdapter to use. Options are currently `GoogleTranslateGoshenAdapter` or `MosesGoshenAdapter`. + - `opts`: A dictonary of options to pass to the adapter constructor. Currently, none are required for existing adapters. + +- function `url` + + Generate a complete URI. If `hostname` is `localhost:8000` and `protocol` is `https`, then `this.url('foo')` returns `https://localhost:8000/foo` + - Arguments: + - `suffix`: A suffix to concatenate onto the end of a well-formed URI. + - Returns: + - String: The complete web-accessible URL. + +- function `translate` + + Translate a text from a source language to a target language. + - Arguments: + - `text`: The text to translate. If this is too long, a series of truncated versions are translated, splitting on sentence-delimiters if possible. + - `source`: An item from the `LANGUAGES` set (e.g. `'en-us'`) + - `target`: An item from the `LANGUAGES` set (e.g. `'en-us'`) + - `callback`: Optional. If supplied, must be a function (or be of a callable type) that will be run with `errors` and `value` as its two arguments. + - Returns: + - String: The translated text. All supplementary data, such as alignments or language detections, are ignored by this function. + + +### `GoshenAdapter` +The `Goshen` class secretly outsources all of its computation to a GoshenAdapter class attribute, which is responsible for performing the machine translation. `GoshenAdapter`s should expose `url` and `translate` functions unambiguously, with the same signatures as those in the `Goshen` class. Other functions may be optionally exposed. + +#### `MosesGoshenAdapter` +This is one particular implementation of the `GoshenAdapter` type, that uses the `moses-mt-server` backend as its translation engine API endpoint. It splits text into manageable chunks when translating, to avoid crashing the underlying Moses server (RAM allocation fail). + +#### `GoogleTranslateGoshenAdapter` +This is another implementation of the `GoshenAdapter` type, that uses the Google Translate API as its translation engine endpoint. Because Google handles arbitrarily long text, this adapter does not split text, as `MosesGoshenAdapter`s do. + + +For more information, see [this full report](https://github.com/j6k4m8/goshen-moses/blob/master/report/report.md), or contact Jordan Matelsky (@j6k4m8). diff --git a/contrib/goshen-chrome/icon.png b/contrib/goshen-chrome/icon.png new file mode 100644 index 0000000000..c63110d5a7 Binary files /dev/null and b/contrib/goshen-chrome/icon.png differ diff --git a/contrib/goshen-chrome/manifest.json b/contrib/goshen-chrome/manifest.json new file mode 100644 index 0000000000..0bea70ab23 --- /dev/null +++ b/contrib/goshen-chrome/manifest.json @@ -0,0 +1,29 @@ +{ + "manifest_version": 2, + + "name": "Goshen Web Translator", + "description": "Translate entire webpages with a casmacat-moses backend", + "version": "1.0", + + "browser_action": { + "default_icon": "icon.png", + "default_popup": "popup/popup.html" + }, + "permissions": [ + "activeTab", + "storage", + "https://ajax.googleapis.com/" + ], + "options_page" : "options/index.html", + + "content_scripts": [{ + "matches": ["http://*/*", "https://*/*", "file:///*"], + "css": ["onpage/onpage.css"], + "js": [ + "onpage/onpage.js", + "onpage/goshen.js", + "onpage/chromegoshen.js" + ], + "all_frames": true + }] +} diff --git a/contrib/goshen-chrome/onpage/chromegoshen.js b/contrib/goshen-chrome/onpage/chromegoshen.js new file mode 100644 index 0000000000..a95ac9c4ea --- /dev/null +++ b/contrib/goshen-chrome/onpage/chromegoshen.js @@ -0,0 +1,166 @@ +(function(window) { + + var demo_url = "ec2-52-23-242-15.compute-1.amazonaws.com:8081"; + + var _goshen = window._goshen; + + on = function(event, cb) { + window.addEventListener(event, cb); + } + + off = function(event, cb) { + window.removeEventListener(event, cb); + } + + class ChromeGoshen { + constructor() { + this.G = new _goshen.Goshen(demo_url); + console.info("Goshenjs engine loaded successfully.") + } + + /** + * Begin interactive dom node selection. + */ + selectMode() { + var self = this; + var selection = []; + var previousElement = null; + + var showSelection = function() { + var olds = document.querySelectorAll('._goshen-selected'); + for (var i = 0; i < olds.length; i++) { + olds[i].classList.remove('_goshen-selected'); + } + for (var i = 0; i < selection.length; i++) { + selection[i].classList.add('_goshen-selected'); + } + }; + + var setSelection = function(sel) { + selection = sel; + showSelection(); + }; + + var validParents = [ + "DIV", "ARTICLE", "BLOCKQUOTE", "MAIN", + "SECTION", "UL", "OL", "DL" + ]; + + var validChildren = [ + "P", "H1", "H2", "H3", "H4", "H5", "H6", "SPAN", "DL", + "OL", "UL", "BLOCKQUOTE", "SECTION" + ]; + + var selectSiblings = function(el) { + var firstChild = el; + var parent = el.parentNode; + while (parent && !~validParents.indexOf(parent.tagName)) { + firstChild = parent; + parent = firstChild.parentNode; + } + + if (parent) { + var kids = parent.childNodes, + len = kids.length, + result = [], + i = 0; + + while (kids[i] !== firstChild) { i++; } + + for (; i < len; i++) { + var kid = kids[i]; + if (!!~validChildren.indexOf(kid.tagName)) { + result.push(kid); + } + } + return result; + + } else { return [el]; } + }; + + var stop = function() { + off("mouseover", mouseoverHandler); + off("mousemove", moveHandler); + off("keydown", keydownHandler); + off("keyup", keyupHandler); + off("click", clickHandler); + self.performSelectTranslation(selection); + }; + + var mouseoverHandler = function(ev) { + previousElement = ev.target; + + if (ev.altKey) { + setSelection([ev.target]); + } else { + setSelection(selectSiblings(ev.target)); + } + }; + + var clickHandler = function(ev) { + stop(); + }; + + var moveHandler = function(ev) { + mouseoverHandler(ev); + off("mousemove", moveHandler); + }; + + var keydownHandler = function(ev) { + if (ev.keyCode === 27) { + stop(); + } else if (ev.altKey && selection.length > 1) { + setSelection([selection[0]]); + } + }; + + var keyupHandler = function(ev) { + if (!ev.altKey && selection.length === 1) { + setSelection(selectSiblings(selection[0])); + } + }; + + on("mouseover", mouseoverHandler); + on("click", clickHandler); + on("mousemove", moveHandler); + on("keydown", keydownHandler); + on("keyup", keyupHandler); + } + + select(contextData) { + var text; + if (contextData === undefined) { + text = window.getSelection().toString(); + } else { + text = contextData.selectionText; + } + if (text.trim().length > 0) { + this.init(this.parse.string(text)); + window.getSelection().removeAllRanges(); + } else { + selectMode(); + } + }; + + _chunkedTranslation(text) { + // We need to find a way to split on sentences, or long things. + var texts = text.split('.'); + for (var i = 0; i < texts.length; i++) { + texts[i] = this.G.translate(texts[i]); + } + return texts.join('.'); + } + + performSelectTranslation(selection) { + for (var i = 0; i < selection.length; i++) { + selection[i].classList.add('_goshen-active'); + selection[i].innerText = this._chunkedTranslation(selection[i].innerText); + selection[i].classList.remove('_goshen-active'); + selection[i].classList.remove('_goshen-selected'); + } + } + }; + + _goshen._cg = new ChromeGoshen(); + +})(this); diff --git a/contrib/goshen-chrome/onpage/goshen.js b/contrib/goshen-chrome/onpage/goshen.js new file mode 100644 index 0000000000..f0d60b1820 --- /dev/null +++ b/contrib/goshen-chrome/onpage/goshen.js @@ -0,0 +1,107 @@ +(function (root) { + + var _goshen = root._goshen; + + LANGUAGES = { + English: 'en', + en: 'en', + German: 'de', + de: 'de' + } + + LOCALES = { + English: 'en-US', + en: 'en-US', + German: 'de', + de: 'de' + } + + + serialize = function(obj) { + var str = []; + for (var p in obj) { + str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); + } + return str.join("&"); + }; + + + class MosesGoshenAdapter { + constructor(hostname, protocol, opts) { + this.hostname = hostname; + this.protocol = protocol || 'http'; + } + + url(suffix) { + suffix = suffix || ''; + return `${this.protocol}://${this.hostname}/translate?${suffix}`; + } + + translate(text, target, source, callback) { + /* Translate a string `text`, using `opts` as corequisite options. + + Arguments: + text (str): The text to translate. + target (str): The language to translate to + source (str): The language to translate from + callback (function): The function to call on the translated text + + Returns: + str: The translated text + */ + + var requestURL = this.url(serialize({ + q: text, + key: 'x', + target: target || LANGUAGES.en, + source: source || LANGUAGES.de + })); + + if (!!root.Meteor && !!root.HTTP) { + var response = HTTP.call('GET', requestURL, {}); + var translated = response.data; + if (callback) callback(text, translated); + + } else if (!!root.XMLHttpRequest) { + var request = new XMLHttpRequest(); + request.open('GET', requestURL, false); + request.send(null); + + if (request.status === 200) { + var translated = root.JSON.parse(request.responseText); + if (callback) callback(text, translated); + } + } + return translated.data.translations[0].translatedText + } + } + + + _goshen.Goshen = class Goshen { + constructor(hostname, protocol, type, opts) { + /* Create a new Goshen object. + + Arguments: + hostname (str): A protocol-less URI such as `255.255.0.0:3000` + protocol (str: 'http'): An http protocol (either 'http' or 'https') + type (class): The type of adapter to use by default. + opts (dict): Options for configuration. + + The options configuration dictionary can contain + */ + type = type || MosesGoshenAdapter; + this.ga = new type(hostname, protocol, opts); + } + + url(suffix) { + return this.ga.url(suffix); + } + + translate(text, target, source, callback) { + /* Calls the local GoshenAdapter#translate. */ + return this.ga.translate(text, target, source, callback); + } + + + }; +})(this); diff --git a/contrib/goshen-chrome/onpage/onpage.css b/contrib/goshen-chrome/onpage/onpage.css new file mode 100644 index 0000000000..06c6c0a0be --- /dev/null +++ b/contrib/goshen-chrome/onpage/onpage.css @@ -0,0 +1,7 @@ +._goshen-selected { + background-color: rgba(100, 250, 250, 0.2); +} + +._goshen-selected._goshen-active { + background-color: rgba(250, 100, 250, 0.2); +} diff --git a/contrib/goshen-chrome/onpage/onpage.js b/contrib/goshen-chrome/onpage/onpage.js new file mode 100644 index 0000000000..046cade28c --- /dev/null +++ b/contrib/goshen-chrome/onpage/onpage.js @@ -0,0 +1,25 @@ +// This is run inside the scope of a page, and so we have direct access to the +// page's HTML from here. + +(function (window) { + + if (typeof window._goshen !== 'undefined') { + console.warn("_goshen unable to initialize!"); + return; + } else { + window._goshen = {}; + } + + // We can now request the contents of window. + + window.addEventListener('keyup', function(ev) { + // This is a bit heavy-handed, and we almost assuredly don't need to be + // capturing every keyup event. But it's lightweight, and serves as a + // decent proof of concept. + if (ev.altKey && ev.keyCode == 84) { + // They pressed Alt+T. Call _goshen's get-text function! + window._goshen._cg.selectMode(); + } + }); + +})(this); diff --git a/contrib/goshen-chrome/options/index.html b/contrib/goshen-chrome/options/index.html new file mode 100644 index 0000000000..869beb4248 --- /dev/null +++ b/contrib/goshen-chrome/options/index.html @@ -0,0 +1,10 @@ + + + + + Goshen Options + + + + + diff --git a/contrib/goshen-chrome/popup/popup.html b/contrib/goshen-chrome/popup/popup.html new file mode 100644 index 0000000000..5bd6029ba7 --- /dev/null +++ b/contrib/goshen-chrome/popup/popup.html @@ -0,0 +1,44 @@ + + + + + + + + + +

+

Goshen Translator

+

+ Goshen uses python-mt-server and moses to + translate webpage text. For more information, see the repository + on GitHub. +

+
+ + +
+

+ To translate the webpage, press the Alt+T + keychord and mouse over the element(s) that you want to queue for + translation. Click to begin the translation — the selected + elements will turn blue to indicate that they're queued. +

+ +
+ + diff --git a/contrib/goshen-chrome/popup/popup.js b/contrib/goshen-chrome/popup/popup.js new file mode 100644 index 0000000000..e69de29bb2 diff --git a/contrib/goshen-chrome/style.less b/contrib/goshen-chrome/style.less new file mode 100644 index 0000000000..bebf021b23 --- /dev/null +++ b/contrib/goshen-chrome/style.less @@ -0,0 +1,22 @@ +* { + box-sizing: border-box; +} +.container { + width: 100%; + .dropdown-container, .arrow-container { + display: inline-block; + width: 40%; + } + + button { + border-radius: 0; + background: #09f; + color: white; + text-transform: uppercase; + padding: 1em; + border: none; + cursor: pointer; + letter-spacing: 0.1em; + font-size: 1.1em; + } +} diff --git a/contrib/goshen-chrome/vendor/less.js b/contrib/goshen-chrome/vendor/less.js new file mode 100644 index 0000000000..8ee05a609a --- /dev/null +++ b/contrib/goshen-chrome/vendor/less.js @@ -0,0 +1,21 @@ +/*! + * Less - Leaner CSS v2.6.1 + * http://lesscss.org + * + * Copyright (c) 2009-2016, Alexis Sellier + * Licensed under the License. + * + */ + + /** * @license + */ + +!function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,b.less=a()}}(function(){return function a(b,c,d){function e(g,h){if(!c[g]){if(!b[g]){var i="function"==typeof require&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);var j=new Error("Cannot find module '"+g+"'");throw j.code="MODULE_NOT_FOUND",j}var k=c[g]={exports:{}};b[g][0].call(k.exports,function(a){var c=b[g][1][a];return e(c?c:a)},k,k.exports,a,b,c,d)}return c[g].exports}for(var f="function"==typeof require&&require,g=0;d.length>g;g++)e(d[g]);return e}({1:[function(a,b){var c=a("./utils").addDataAttr,d=a("./browser");b.exports=function(a,b){c(b,d.currentScript(a)),void 0===b.isFileProtocol&&(b.isFileProtocol=/^(file|(chrome|safari)(-extension)?|resource|qrc|app):/.test(a.location.protocol)),b.async=b.async||!1,b.fileAsync=b.fileAsync||!1,b.poll=b.poll||(b.isFileProtocol?1e3:1500),b.env=b.env||("127.0.0.1"==a.location.hostname||"0.0.0.0"==a.location.hostname||"localhost"==a.location.hostname||a.location.port&&a.location.port.length>0||b.isFileProtocol?"development":"production");var e=/!dumpLineNumbers:(comments|mediaquery|all)/.exec(a.location.hash);e&&(b.dumpLineNumbers=e[1]),void 0===b.useFileCache&&(b.useFileCache=!0),void 0===b.onReady&&(b.onReady=!0)}},{"./browser":3,"./utils":10}],2:[function(a,b){function c(a){a.filename&&console.warn(a),d.async||g.removeChild(h)}a("promise/polyfill.js");var d=window.less||{};a("./add-default-options")(window,d);var e=b.exports=a("./index")(window,d);window.less=e;var f,g,h;d.onReady&&(/!watch/.test(window.location.hash)&&e.watch(),d.async||(f="body { display: none !important }",g=document.head||document.getElementsByTagName("head")[0],h=document.createElement("style"),h.type="text/css",h.styleSheet?h.styleSheet.cssText=f:h.appendChild(document.createTextNode(f)),g.appendChild(h)),e.registerStylesheetsImmediately(),e.pageLoadFinished=e.refresh("development"===e.env).then(c,c))},{"./add-default-options":1,"./index":8,"promise/polyfill.js":97}],3:[function(a,b){var c=a("./utils");b.exports={createCSS:function(a,b,d){var e=d.href||"",f="less:"+(d.title||c.extractId(e)),g=a.getElementById(f),h=!1,i=a.createElement("style");i.setAttribute("type","text/css"),d.media&&i.setAttribute("media",d.media),i.id=f,i.styleSheet||(i.appendChild(a.createTextNode(b)),h=null!==g&&g.childNodes.length>0&&i.childNodes.length>0&&g.firstChild.nodeValue===i.firstChild.nodeValue);var j=a.getElementsByTagName("head")[0];if(null===g||h===!1){var k=d&&d.nextSibling||null;k?k.parentNode.insertBefore(i,k):j.appendChild(i)}if(g&&h===!1&&g.parentNode.removeChild(g),i.styleSheet)try{i.styleSheet.cssText=b}catch(l){throw new Error("Couldn't reassign styleSheet.cssText.")}},currentScript:function(a){var b=a.document;return b.currentScript||function(){var a=b.getElementsByTagName("script");return a[a.length-1]}()}}},{"./utils":10}],4:[function(a,b){b.exports=function(a,b,c){var d=null;if("development"!==b.env)try{d="undefined"==typeof a.localStorage?null:a.localStorage}catch(e){}return{setCSS:function(a,b,e,f){if(d){c.info("saving "+a+" to cache.");try{d.setItem(a,f),d.setItem(a+":timestamp",b),e&&d.setItem(a+":vars",JSON.stringify(e))}catch(g){c.error('failed to save "'+a+'" to local storage for caching.')}}},getCSS:function(a,b,c){var e=d&&d.getItem(a),f=d&&d.getItem(a+":timestamp"),g=d&&d.getItem(a+":vars");return c=c||{},f&&b.lastModified&&new Date(b.lastModified).valueOf()===new Date(f).valueOf()&&(!c&&!g||JSON.stringify(c)===g)?e:void 0}}}},{}],5:[function(a,b){var c=a("./utils"),d=a("./browser");b.exports=function(a,b,e){function f(b,f){var g,h,i="less-error-message:"+c.extractId(f||""),j='
  • {content}
  • ',k=a.document.createElement("div"),l=[],m=b.filename||f,n=m.match(/([^\/]+(\?.*)?)$/)[1];k.id=i,k.className="less-error-message",h="

    "+(b.type||"Syntax")+"Error: "+(b.message||"There is an error in your .less file")+'

    in '+n+" ";var o=function(a,b,c){void 0!==a.extract[b]&&l.push(j.replace(/\{line\}/,(parseInt(a.line,10)||0)+(b-1)).replace(/\{class\}/,c).replace(/\{content\}/,a.extract[b]))};b.extract&&(o(b,0,""),o(b,1,"line"),o(b,2,""),h+="on line "+b.line+", column "+(b.column+1)+":

      "+l.join("")+"
    "),b.stack&&(b.extract||e.logLevel>=4)&&(h+="
    Stack Trace
    "+b.stack.split("\n").slice(1).join("
    ")),k.innerHTML=h,d.createCSS(a.document,[".less-error-message ul, .less-error-message li {","list-style-type: none;","margin-right: 15px;","padding: 4px 0;","margin: 0;","}",".less-error-message label {","font-size: 12px;","margin-right: 15px;","padding: 4px 0;","color: #cc7777;","}",".less-error-message pre {","color: #dd6666;","padding: 4px 0;","margin: 0;","display: inline-block;","}",".less-error-message pre.line {","color: #ff0000;","}",".less-error-message h3 {","font-size: 20px;","font-weight: bold;","padding: 15px 0 5px 0;","margin: 0;","}",".less-error-message a {","color: #10a","}",".less-error-message .error {","color: red;","font-weight: bold;","padding-bottom: 2px;","border-bottom: 1px dashed red;","}"].join("\n"),{title:"error-message"}),k.style.cssText=["font-family: Arial, sans-serif","border: 1px solid #e00","background-color: #eee","border-radius: 5px","-webkit-border-radius: 5px","-moz-border-radius: 5px","color: #e00","padding: 15px","margin-bottom: 15px"].join(";"),"development"===e.env&&(g=setInterval(function(){var b=a.document,c=b.body;c&&(b.getElementById(i)?c.replaceChild(k,b.getElementById(i)):c.insertBefore(k,c.firstChild),clearInterval(g))},10))}function g(b){var d=a.document.getElementById("less-error-message:"+c.extractId(b));d&&d.parentNode.removeChild(d)}function h(){}function i(a){e.errorReporting&&"html"!==e.errorReporting?"console"===e.errorReporting?h(a):"function"==typeof e.errorReporting&&e.errorReporting("remove",a):g(a)}function j(a,c){var d="{line} {content}",f=a.filename||c,g=[],h=(a.type||"Syntax")+"Error: "+(a.message||"There is an error in your .less file")+" in "+f+" ",i=function(a,b,c){void 0!==a.extract[b]&&g.push(d.replace(/\{line\}/,(parseInt(a.line,10)||0)+(b-1)).replace(/\{class\}/,c).replace(/\{content\}/,a.extract[b]))};a.extract&&(i(a,0,""),i(a,1,"line"),i(a,2,""),h+="on line "+a.line+", column "+(a.column+1)+":\n"+g.join("\n")),a.stack&&(a.extract||e.logLevel>=4)&&(h+="\nStack Trace\n"+a.stack),b.logger.error(h)}function k(a,b){e.errorReporting&&"html"!==e.errorReporting?"console"===e.errorReporting?j(a,b):"function"==typeof e.errorReporting&&e.errorReporting("add",a,b):f(a,b)}return{add:k,remove:i}}},{"./browser":3,"./utils":10}],6:[function(a,b){b.exports=function(b,c){function d(){if(window.XMLHttpRequest&&!("file:"===window.location.protocol&&"ActiveXObject"in window))return new XMLHttpRequest;try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(a){return c.error("browser doesn't support AJAX."),null}}var e=a("../less/environment/abstract-file-manager.js"),f={},g=function(){};return g.prototype=new e,g.prototype.alwaysMakePathsAbsolute=function(){return!0},g.prototype.join=function(a,b){return a?this.extractUrlParts(b,a).path:b},g.prototype.doXHR=function(a,e,f,g){function h(b,c,d){b.status>=200&&300>b.status?c(b.responseText,b.getResponseHeader("Last-Modified")):"function"==typeof d&&d(b.status,a)}var i=d(),j=b.isFileProtocol?b.fileAsync:!0;"function"==typeof i.overrideMimeType&&i.overrideMimeType("text/css"),c.debug("XHR: Getting '"+a+"'"),i.open("GET",a,j),i.setRequestHeader("Accept",e||"text/x-less, text/css; q=0.9, */*; q=0.5"),i.send(null),b.isFileProtocol&&!b.fileAsync?0===i.status||i.status>=200&&300>i.status?f(i.responseText):g(i.status,a):j?i.onreadystatechange=function(){4==i.readyState&&h(i,f,g)}:h(i,f,g)},g.prototype.supports=function(){return!0},g.prototype.clearFileCache=function(){f={}},g.prototype.loadFile=function(a,b,c,d,e){b&&!this.isPathAbsolute(a)&&(a=b+a),c=c||{};var g=this.extractUrlParts(a,window.location.href),h=g.url;if(c.useFileCache&&f[h])try{var i=f[h];e(null,{contents:i,filename:h,webInfo:{lastModified:new Date}})}catch(j){e({filename:h,message:"Error loading file "+h+" error was "+j.message})}else this.doXHR(h,c.mime,function(a,b){f[h]=a,e(null,{contents:a,filename:h,webInfo:{lastModified:b}})},function(a,b){e({type:"File",message:"'"+b+"' wasn't found ("+a+")",href:h})})},g}},{"../less/environment/abstract-file-manager.js":15}],7:[function(a,b){b.exports=function(){function b(){throw{type:"Runtime",message:"Image size functions are not supported in browser version of less"}}var c=a("./../less/functions/function-registry"),d={"image-size":function(a){return b(this,a),-1},"image-width":function(a){return b(this,a),-1},"image-height":function(a){return b(this,a),-1}};c.addMultiple(d)}},{"./../less/functions/function-registry":22}],8:[function(a,b){var c=a("./utils").addDataAttr,d=a("./browser");b.exports=function(b,e){function f(a){return e.postProcessor&&"function"==typeof e.postProcessor&&(a=e.postProcessor.call(a,a)||a),a}function g(a){var b={};for(var c in a)a.hasOwnProperty(c)&&(b[c]=a[c]);return b}function h(a,b){var c=Array.prototype.slice.call(arguments,2);return function(){var d=c.concat(Array.prototype.slice.call(arguments,0));return a.apply(b,d)}}function i(a){for(var b,c=m.getElementsByTagName("style"),d=0;c.length>d;d++)if(b=c[d],b.type.match(t)){var f=g(e);f.modifyVars=a;var i=b.innerHTML||"";f.filename=m.location.href.replace(/#.*$/,""),n.render(i,f,h(function(a,b,c){b?r.add(b,"inline"):(a.type="text/css",a.styleSheet?a.styleSheet.cssText=c.css:a.innerHTML=c.css)},null,b))}}function j(a,b,d,h,i){function j(c){var e=c.contents,g=c.filename,i=c.webInfo,j={currentDirectory:q.getPath(g),filename:g,rootFilename:g,relativeUrls:k.relativeUrls};if(j.entryPath=j.currentDirectory,j.rootpath=k.rootpath||j.currentDirectory,i){i.remaining=h;var l=s.getCSS(g,i,k.modifyVars);if(!d&&l)return i.local=!0,void b(null,l,e,a,i,g)}r.remove(g),k.rootFileInfo=j,n.render(e,k,function(c,d){c?(c.href=g,b(c)):(d.css=f(d.css),s.setCSS(a.href,i.lastModified,k.modifyVars,d.css),b(null,d.css,e,a,i,g))})}var k=g(e);c(k,a),k.mime=a.type,i&&(k.modifyVars=i),q.loadFile(a.href,null,k,o,function(a,c){return a?void b(a):void j(c)})}function k(a,b,c){for(var d=0;n.sheets.length>d;d++)j(n.sheets[d],a,b,n.sheets.length-(d+1),c)}function l(){"development"===n.env&&(n.watchTimer=setInterval(function(){n.watchMode&&(q.clearFileCache(),k(function(a,c,e,f){a?r.add(a,a.href||f.href):c&&d.createCSS(b.document,c,f)}))},e.poll))}var m=b.document,n=a("../less")();n.options=e;var o=n.environment,p=a("./file-manager")(e,n.logger),q=new p;o.addFileManager(q),n.FileManager=p,a("./log-listener")(n,e);var r=a("./error-reporting")(b,n,e),s=n.cache=e.cache||a("./cache")(b,e,n.logger);a("./image-size")(n.environment),e.functions&&n.functions.functionRegistry.addMultiple(e.functions);var t=/^text\/(x-)?less$/;return n.watch=function(){return n.watchMode||(n.env="development",l()),this.watchMode=!0,!0},n.unwatch=function(){return clearInterval(n.watchTimer),this.watchMode=!1,!1},n.registerStylesheetsImmediately=function(){var a=m.getElementsByTagName("link");n.sheets=[];for(var b=0;a.length>b;b++)("stylesheet/less"===a[b].rel||a[b].rel.match(/stylesheet/)&&a[b].type.match(t))&&n.sheets.push(a[b])},n.registerStylesheets=function(){return new Promise(function(a){n.registerStylesheetsImmediately(),a()})},n.modifyVars=function(a){return n.refresh(!0,a,!1)},n.refresh=function(a,c,e){return(a||e)&&e!==!1&&q.clearFileCache(),new Promise(function(e,f){var g,h,j;g=h=new Date,k(function(a,c,i,k,l){return a?(r.add(a,a.href||k.href),void f(a)):(n.logger.info(l.local?"loading "+k.href+" from cache.":"rendered "+k.href+" successfully."),d.createCSS(b.document,c,k),n.logger.info("css for "+k.href+" generated in "+(new Date-h)+"ms"),0===l.remaining&&(j=new Date-g,n.logger.info("less has finished. css generated in "+j+"ms"),e({startTime:g,endTime:h,totalMilliseconds:j,sheets:n.sheets.length})),void(h=new Date))},a,c),i(c)})},n.refreshStyles=i,n}},{"../less":31,"./browser":3,"./cache":4,"./error-reporting":5,"./file-manager":6,"./image-size":7,"./log-listener":9,"./utils":10}],9:[function(a,b){b.exports=function(a,b){var c=4,d=3,e=2,f=1;b.logLevel="undefined"!=typeof b.logLevel?b.logLevel:"development"===b.env?d:f,b.loggers||(b.loggers=[{debug:function(a){b.logLevel>=c&&console.log(a)},info:function(a){b.logLevel>=d&&console.log(a)},warn:function(a){b.logLevel>=e&&console.warn(a)},error:function(a){b.logLevel>=f&&console.error(a)}}]);for(var g=0;b.loggers.length>g;g++)a.logger.addListener(b.loggers[g])}},{}],10:[function(a,b){b.exports={extractId:function(a){return a.replace(/^[a-z-]+:\/+?[^\/]+/,"").replace(/[\?\&]livereload=\w+/,"").replace(/^\//,"").replace(/\.[a-zA-Z]+$/,"").replace(/[^\.\w-]+/g,"-").replace(/\./g,":")},addDataAttr:function(a,b){for(var c in b.dataset)if(b.dataset.hasOwnProperty(c))if("env"===c||"dumpLineNumbers"===c||"rootpath"===c||"errorReporting"===c)a[c]=b.dataset[c];else try{a[c]=JSON.parse(b.dataset[c])}catch(d){}}}},{}],11:[function(a,b){var c={};b.exports=c;var d=function(a,b,c){if(a)for(var d=0;c.length>d;d++)a.hasOwnProperty(c[d])&&(b[c[d]]=a[c[d]])},e=["paths","relativeUrls","rootpath","strictImports","insecure","dumpLineNumbers","compress","syncImport","chunkInput","mime","useFileCache","processImports","pluginManager"];c.Parse=function(a){d(a,this,e),"string"==typeof this.paths&&(this.paths=[this.paths])};var f=["paths","compress","ieCompat","strictMath","strictUnits","sourceMap","importMultiple","urlArgs","javascriptEnabled","pluginManager","importantScope"];c.Eval=function(a,b){d(a,this,f),"string"==typeof this.paths&&(this.paths=[this.paths]),this.frames=b||[],this.importantScope=this.importantScope||[]},c.Eval.prototype.inParenthesis=function(){this.parensStack||(this.parensStack=[]),this.parensStack.push(!0)},c.Eval.prototype.outOfParenthesis=function(){this.parensStack.pop()},c.Eval.prototype.isMathOn=function(){return this.strictMath?this.parensStack&&this.parensStack.length:!0},c.Eval.prototype.isPathRelative=function(a){return!/^(?:[a-z-]+:|\/|#)/i.test(a)},c.Eval.prototype.normalizePath=function(a){var b,c=a.split("/").reverse();for(a=[];0!==c.length;)switch(b=c.pop()){case".":break;case"..":0===a.length||".."===a[a.length-1]?a.push(b):a.pop();break;default:a.push(b)}return a.join("/")}},{}],12:[function(a,b){b.exports={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgrey:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",grey:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"}},{}],13:[function(a,b){b.exports={colors:a("./colors"),unitConversions:a("./unit-conversions")}},{"./colors":12,"./unit-conversions":14}],14:[function(a,b){b.exports={length:{m:1,cm:.01,mm:.001,"in":.0254,px:.0254/96,pt:.0254/72,pc:.0254/72*12},duration:{s:1,ms:.001},angle:{rad:1/(2*Math.PI),deg:1/360,grad:.0025,turn:1}}},{}],15:[function(a,b){var c=function(){};c.prototype.getPath=function(a){var b=a.lastIndexOf("?");return b>0&&(a=a.slice(0,b)),b=a.lastIndexOf("/"),0>b&&(b=a.lastIndexOf("\\")),0>b?"":a.slice(0,b+1)},c.prototype.tryAppendExtension=function(a,b){return/(\.[a-z]*$)|([\?;].*)$/.test(a)?a:a+b},c.prototype.tryAppendLessExtension=function(a){return this.tryAppendExtension(a,".less")},c.prototype.supportsSync=function(){return!1},c.prototype.alwaysMakePathsAbsolute=function(){return!1},c.prototype.isPathAbsolute=function(a){return/^(?:[a-z-]+:|\/|\\|#)/i.test(a)},c.prototype.join=function(a,b){return a?a+b:b},c.prototype.pathDiff=function(a,b){var c,d,e,f,g=this.extractUrlParts(a),h=this.extractUrlParts(b),i="";if(g.hostPart!==h.hostPart)return"";for(d=Math.max(h.directories.length,g.directories.length),c=0;d>c&&h.directories[c]===g.directories[c];c++);for(f=h.directories.slice(c),e=g.directories.slice(c),c=0;f.length-1>c;c++)i+="../";for(c=0;e.length-1>c;c++)i+=e[c]+"/";return i},c.prototype.extractUrlParts=function(a,b){var c,d,e=/^((?:[a-z-]+:)?\/+?(?:[^\/\?#]*\/)|([\/\\]))?((?:[^\/\\\?#]*[\/\\])*)([^\/\\\?#]*)([#\?].*)?$/i,f=a.match(e),g={},h=[];if(!f)throw new Error("Could not parse sheet href - '"+a+"'");if(b&&(!f[1]||f[2])){if(d=b.match(e),!d)throw new Error("Could not parse page url - '"+b+"'");f[1]=f[1]||d[1]||"",f[2]||(f[3]=d[3]+f[3])}if(f[3]){for(h=f[3].replace(/\\/g,"/").split("/"),c=0;h.length>c;c++)"."===h[c]&&(h.splice(c,1),c-=1);for(c=0;h.length>c;c++)".."===h[c]&&c>0&&(h.splice(c-1,2),c-=2)}return g.hostPart=f[1],g.directories=h,g.path=(f[1]||"")+h.join("/"),g.fileUrl=g.path+(f[4]||""),g.url=g.fileUrl+(f[5]||""),g},b.exports=c},{}],16:[function(a,b){var c=a("../logger"),d=function(a,b){this.fileManagers=b||[],a=a||{};for(var c=["encodeBase64","mimeLookup","charsetLookup","getSourceMapGenerator"],d=[],e=d.concat(c),f=0;e.length>f;f++){var g=e[f],h=a[g];h?this[g]=h.bind(a):d.length>f&&this.warn("missing required function in environment - "+g)}};d.prototype.getFileManager=function(a,b,d,e,f){a||c.warn("getFileManager called with no filename.. Please report this issue. continuing."),null==b&&c.warn("getFileManager called with null directory.. Please report this issue. continuing.");var g=this.fileManagers;d.pluginManager&&(g=[].concat(g).concat(d.pluginManager.getFileManagers()));for(var h=g.length-1;h>=0;h--){var i=g[h];if(i[f?"supportsSync":"supports"](a,b,d,e))return i}return null},d.prototype.addFileManager=function(a){this.fileManagers.push(a)},d.prototype.clearFileManagers=function(){this.fileManagers=[]},b.exports=d},{"../logger":33}],17:[function(a){function b(a,b,d){var e,f,g,h,i=b.alpha,j=d.alpha,k=[];g=j+i*(1-j);for(var l=0;3>l;l++)e=b.rgb[l]/255,f=d.rgb[l]/255,h=a(e,f),g&&(h=(j*f+i*(e-j*(e+f-h)))/g),k[l]=255*h;return new c(k,g)}var c=a("../tree/color"),d=a("./function-registry"),e={multiply:function(a,b){return a*b},screen:function(a,b){return a+b-a*b},overlay:function(a,b){return a*=2,1>=a?e.multiply(a,b):e.screen(a-1,b)},softlight:function(a,b){var c=1,d=a;return b>.5&&(d=1,c=a>.25?Math.sqrt(a):((16*a-12)*a+4)*a),a-(1-2*b)*d*(c-a)},hardlight:function(a,b){return e.overlay(b,a)},difference:function(a,b){return Math.abs(a-b)},exclusion:function(a,b){return a+b-2*a*b},average:function(a,b){return(a+b)/2},negation:function(a,b){return 1-Math.abs(a+b-1)}};for(var f in e)e.hasOwnProperty(f)&&(b[f]=b.bind(null,e[f]));d.addMultiple(b)},{"../tree/color":50,"./function-registry":22}],18:[function(a){function b(a){return Math.min(1,Math.max(0,a))}function c(a){return f.hsla(a.h,a.s,a.l,a.a)}function d(a){if(a instanceof g)return parseFloat(a.unit.is("%")?a.value/100:a.value);if("number"==typeof a)return a;throw{type:"Argument",message:"color functions take numbers as parameters"}}function e(a,b){return a instanceof g&&a.unit.is("%")?parseFloat(a.value*b/100):d(a)}var f,g=a("../tree/dimension"),h=a("../tree/color"),i=a("../tree/quoted"),j=a("../tree/anonymous"),k=a("./function-registry");f={rgb:function(a,b,c){return f.rgba(a,b,c,1)},rgba:function(a,b,c,f){var g=[a,b,c].map(function(a){return e(a,255)});return f=d(f),new h(g,f)},hsl:function(a,b,c){return f.hsla(a,b,c,1)},hsla:function(a,c,e,g){function h(a){return a=0>a?a+1:a>1?a-1:a,1>6*a?i+(j-i)*a*6:1>2*a?j:2>3*a?i+(j-i)*(2/3-a)*6:i}var i,j;return a=d(a)%360/360,c=b(d(c)),e=b(d(e)),g=b(d(g)),j=.5>=e?e*(c+1):e+c-e*c,i=2*e-j,f.rgba(255*h(a+1/3),255*h(a),255*h(a-1/3),g)},hsv:function(a,b,c){return f.hsva(a,b,c,1)},hsva:function(a,b,c,e){a=d(a)%360/360*360,b=d(b),c=d(c),e=d(e);var g,h;g=Math.floor(a/60%6),h=a/60-g;var i=[c,c*(1-b),c*(1-h*b),c*(1-(1-h)*b)],j=[[0,3,1],[2,0,1],[1,0,3],[1,2,0],[3,1,0],[0,1,2]];return f.rgba(255*i[j[g][0]],255*i[j[g][1]],255*i[j[g][2]],e)},hue:function(a){return new g(a.toHSL().h)},saturation:function(a){return new g(100*a.toHSL().s,"%")},lightness:function(a){return new g(100*a.toHSL().l,"%")},hsvhue:function(a){return new g(a.toHSV().h)},hsvsaturation:function(a){return new g(100*a.toHSV().s,"%")},hsvvalue:function(a){return new g(100*a.toHSV().v,"%")},red:function(a){return new g(a.rgb[0])},green:function(a){return new g(a.rgb[1])},blue:function(a){return new g(a.rgb[2])},alpha:function(a){return new g(a.toHSL().a)},luma:function(a){return new g(a.luma()*a.alpha*100,"%")},luminance:function(a){var b=.2126*a.rgb[0]/255+.7152*a.rgb[1]/255+.0722*a.rgb[2]/255;return new g(b*a.alpha*100,"%")},saturate:function(a,d,e){if(!a.rgb)return null;var f=a.toHSL();return f.s+="undefined"!=typeof e&&"relative"===e.value?f.s*d.value/100:d.value/100,f.s=b(f.s),c(f)},desaturate:function(a,d,e){var f=a.toHSL();return f.s-="undefined"!=typeof e&&"relative"===e.value?f.s*d.value/100:d.value/100,f.s=b(f.s),c(f)},lighten:function(a,d,e){var f=a.toHSL();return f.l+="undefined"!=typeof e&&"relative"===e.value?f.l*d.value/100:d.value/100,f.l=b(f.l),c(f)},darken:function(a,d,e){var f=a.toHSL();return f.l-="undefined"!=typeof e&&"relative"===e.value?f.l*d.value/100:d.value/100,f.l=b(f.l),c(f)},fadein:function(a,d,e){var f=a.toHSL();return f.a+="undefined"!=typeof e&&"relative"===e.value?f.a*d.value/100:d.value/100,f.a=b(f.a),c(f)},fadeout:function(a,d,e){var f=a.toHSL();return f.a-="undefined"!=typeof e&&"relative"===e.value?f.a*d.value/100:d.value/100,f.a=b(f.a),c(f)},fade:function(a,d){var e=a.toHSL();return e.a=d.value/100,e.a=b(e.a),c(e)},spin:function(a,b){var d=a.toHSL(),e=(d.h+b.value)%360;return d.h=0>e?360+e:e,c(d)},mix:function(a,b,c){a.toHSL&&b.toHSL||(console.log(b.type),console.dir(b)),c||(c=new g(50));var d=c.value/100,e=2*d-1,f=a.toHSL().a-b.toHSL().a,i=((e*f==-1?e:(e+f)/(1+e*f))+1)/2,j=1-i,k=[a.rgb[0]*i+b.rgb[0]*j,a.rgb[1]*i+b.rgb[1]*j,a.rgb[2]*i+b.rgb[2]*j],l=a.alpha*d+b.alpha*(1-d);return new h(k,l)},greyscale:function(a){return f.desaturate(a,new g(100))},contrast:function(a,b,c,e){if(!a.rgb)return null;if("undefined"==typeof c&&(c=f.rgba(255,255,255,1)),"undefined"==typeof b&&(b=f.rgba(0,0,0,1)),b.luma()>c.luma()){var g=c;c=b,b=g}return e="undefined"==typeof e?.43:d(e),a.luma()=t&&this.context.ieCompat!==!1?(g.warn("Skipped data-uri embedding of "+i+" because its size ("+s.length+" characters) exceeds IE8-safe "+t+" characters!"),f(this,e||a)):new d(new c('"'+s+'"',s,!1,this.index,this.currentFileInfo),this.index,this.currentFileInfo)})}},{"../logger":33,"../tree/quoted":73,"../tree/url":80,"./function-registry":22}],20:[function(a,b){var c=a("../tree/keyword"),d=a("./function-registry"),e={eval:function(){var a=this.value_,b=this.error_;if(b)throw b;return null!=a?a?c.True:c.False:void 0},value:function(a){this.value_=a},error:function(a){this.error_=a},reset:function(){this.value_=this.error_=null}};d.add("default",e.eval.bind(e)),b.exports=e},{"../tree/keyword":65,"./function-registry":22}],21:[function(a,b){var c=a("../tree/expression"),d=function(a,b,c,d){this.name=a.toLowerCase(),this.index=c,this.context=b,this.currentFileInfo=d,this.func=b.frames[0].functionRegistry.get(this.name)};d.prototype.isValid=function(){return Boolean(this.func)},d.prototype.call=function(a){return Array.isArray(a)&&(a=a.filter(function(a){return"Comment"===a.type?!1:!0}).map(function(a){if("Expression"===a.type){var b=a.value.filter(function(a){return"Comment"===a.type?!1:!0});return 1===b.length?b[0]:new c(b)}return a})),this.func.apply(this,a)},b.exports=d},{"../tree/expression":59}],22:[function(a,b){function c(a){return{_data:{},add:function(a,b){a=a.toLowerCase(),this._data.hasOwnProperty(a),this._data[a]=b},addMultiple:function(a){Object.keys(a).forEach(function(b){this.add(b,a[b])}.bind(this))},get:function(b){return this._data[b]||a&&a.get(b)},inherit:function(){return c(this)}}}b.exports=c(null)},{}],23:[function(a,b){b.exports=function(b){var c={functionRegistry:a("./function-registry"),functionCaller:a("./function-caller")};return a("./default"),a("./color"),a("./color-blending"),a("./data-uri")(b),a("./math"),a("./number"),a("./string"),a("./svg")(b),a("./types"),c}},{"./color":18,"./color-blending":17,"./data-uri":19,"./default":20,"./function-caller":21,"./function-registry":22,"./math":25,"./number":26,"./string":27,"./svg":28,"./types":29}],24:[function(a,b){var c=a("../tree/dimension"),d=function(){};d._math=function(a,b,d){if(!(d instanceof c))throw{type:"Argument",message:"argument must be a number"};return null==b?b=d.unit:d=d.unify(),new c(a(parseFloat(d.value)),b)},b.exports=d},{"../tree/dimension":56}],25:[function(a){var b=a("./function-registry"),c=a("./math-helper.js"),d={ceil:null,floor:null,sqrt:null,abs:null,tan:"",sin:"",cos:"",atan:"rad",asin:"rad",acos:"rad"};for(var e in d)d.hasOwnProperty(e)&&(d[e]=c._math.bind(null,Math[e],d[e]));d.round=function(a,b){var d="undefined"==typeof b?0:b.value;return c._math(function(a){return a.toFixed(d)},null,a)},b.addMultiple(d)},{"./function-registry":22,"./math-helper.js":24}],26:[function(a){var b=a("../tree/dimension"),c=a("../tree/anonymous"),d=a("./function-registry"),e=a("./math-helper.js"),f=function(a,d){switch(d=Array.prototype.slice.call(d),d.length){case 0:throw{type:"Argument",message:"one or more arguments required"}}var e,f,g,h,i,j,k,l,m=[],n={};for(e=0;d.length>e;e++)if(g=d[e],g instanceof b)if(h=""===g.unit.toString()&&void 0!==l?new b(g.value,l).unify():g.unify(),j=""===h.unit.toString()&&void 0!==k?k:h.unit.toString(),k=""!==j&&void 0===k||""!==j&&""===m[0].unify().unit.toString()?j:k,l=""!==j&&void 0===l?g.unit.toString():l,f=void 0!==n[""]&&""!==j&&j===k?n[""]:n[j],void 0!==f)i=""===m[f].unit.toString()&&void 0!==l?new b(m[f].value,l).unify():m[f].unify(),(a&&i.value>h.value||!a&&h.value>i.value)&&(m[f]=g);else{if(void 0!==k&&j!==k)throw{type:"Argument",message:"incompatible types"};n[j]=m.length,m.push(g)}else Array.isArray(d[e].value)&&Array.prototype.push.apply(d,Array.prototype.slice.call(d[e].value));return 1==m.length?m[0]:(d=m.map(function(a){return a.toCSS(this.context)}).join(this.context.compress?",":", "),new c((a?"min":"max")+"("+d+")"))};d.addMultiple({min:function(){return f(!0,arguments)},max:function(){return f(!1,arguments)},convert:function(a,b){return a.convertTo(b.value)},pi:function(){return new b(Math.PI)},mod:function(a,c){return new b(a.value%c.value,a.unit)},pow:function(a,c){if("number"==typeof a&&"number"==typeof c)a=new b(a),c=new b(c);else if(!(a instanceof b&&c instanceof b))throw{type:"Argument",message:"arguments must be numbers"};return new b(Math.pow(a.value,c.value),a.unit)},percentage:function(a){var b=e._math(function(a){return 100*a},"%",a);return b}})},{"../tree/anonymous":46,"../tree/dimension":56,"./function-registry":22,"./math-helper.js":24}],27:[function(a){var b=a("../tree/quoted"),c=a("../tree/anonymous"),d=a("../tree/javascript"),e=a("./function-registry");e.addMultiple({e:function(a){return new c(a instanceof d?a.evaluated:a.value)},escape:function(a){return new c(encodeURI(a.value).replace(/=/g,"%3D").replace(/:/g,"%3A").replace(/#/g,"%23").replace(/;/g,"%3B").replace(/\(/g,"%28").replace(/\)/g,"%29"))},replace:function(a,c,d,e){var f=a.value;return d="Quoted"===d.type?d.value:d.toCSS(),f=f.replace(new RegExp(c.value,e?e.value:""),d),new b(a.quote||"",f,a.escaped)},"%":function(a){for(var c=Array.prototype.slice.call(arguments,1),d=a.value,e=0;c.length>e;e++)d=d.replace(/%[sda]/i,function(a){var b="Quoted"===c[e].type&&a.match(/s/i)?c[e].value:c[e].toCSS();return a.match(/[A-Z]$/)?encodeURIComponent(b):b});return d=d.replace(/%%/g,"%"),new b(a.quote||"",d,a.escaped)}})},{"../tree/anonymous":46,"../tree/javascript":63,"../tree/quoted":73,"./function-registry":22}],28:[function(a,b){b.exports=function(){var b=a("../tree/dimension"),c=a("../tree/color"),d=a("../tree/expression"),e=a("../tree/quoted"),f=a("../tree/url"),g=a("./function-registry"); + +g.add("svg-gradient",function(a){function g(){throw{type:"Argument",message:"svg-gradient expects direction, start_color [start_position], [color position,]..., end_color [end_position] or direction, color list"}}var h,i,j,k,l,m,n,o,p="linear",q='x="0" y="0" width="1" height="1"',r={compress:!1},s=a.toCSS(r);switch(2==arguments.length?(arguments[1].value.length<2&&g(),h=arguments[1].value):arguments.length<3?g():h=Array.prototype.slice.call(arguments,1),s){case"to bottom":i='x1="0%" y1="0%" x2="0%" y2="100%"';break;case"to right":i='x1="0%" y1="0%" x2="100%" y2="0%"';break;case"to bottom right":i='x1="0%" y1="0%" x2="100%" y2="100%"';break;case"to top right":i='x1="0%" y1="100%" x2="100%" y2="0%"';break;case"ellipse":case"ellipse at center":p="radial",i='cx="50%" cy="50%" r="75%"',q='x="-50" y="-50" width="101" height="101"';break;default:throw{type:"Argument",message:"svg-gradient direction must be 'to bottom', 'to right', 'to bottom right', 'to top right' or 'ellipse at center'"}}for(j='<'+p+'Gradient id="gradient" gradientUnits="userSpaceOnUse" '+i+">",k=0;h.length>k;k+=1)h[k]instanceof d?(l=h[k].value[0],m=h[k].value[1]):(l=h[k],m=void 0),l instanceof c&&((0===k||k+1===h.length)&&void 0===m||m instanceof b)||g(),n=m?m.toCSS(r):0===k?"0%":"100%",o=l.alpha,j+='o?' stop-opacity="'+o+'"':"")+"/>";return j+="',j=encodeURIComponent(j),j="data:image/svg+xml,"+j,new f(new e("'"+j+"'",j,!1,this.index,this.currentFileInfo),this.index,this.currentFileInfo)})}},{"../tree/color":50,"../tree/dimension":56,"../tree/expression":59,"../tree/quoted":73,"../tree/url":80,"./function-registry":22}],29:[function(a){var b=a("../tree/keyword"),c=a("../tree/detached-ruleset"),d=a("../tree/dimension"),e=a("../tree/color"),f=a("../tree/quoted"),g=a("../tree/anonymous"),h=a("../tree/url"),i=a("../tree/operation"),j=a("./function-registry"),k=function(a,c){return a instanceof c?b.True:b.False},l=function(a,c){if(void 0===c)throw{type:"Argument",message:"missing the required second argument to isunit."};if(c="string"==typeof c.value?c.value:c,"string"!=typeof c)throw{type:"Argument",message:"Second argument to isunit should be a unit or a string."};return a instanceof d&&a.unit.is(c)?b.True:b.False},m=function(a){var b=Array.isArray(a.value)?a.value:Array(a);return b};j.addMultiple({isruleset:function(a){return k(a,c)},iscolor:function(a){return k(a,e)},isnumber:function(a){return k(a,d)},isstring:function(a){return k(a,f)},iskeyword:function(a){return k(a,b)},isurl:function(a){return k(a,h)},ispixel:function(a){return l(a,"px")},ispercentage:function(a){return l(a,"%")},isem:function(a){return l(a,"em")},isunit:l,unit:function(a,c){if(!(a instanceof d))throw{type:"Argument",message:"the first argument to unit must be a number"+(a instanceof i?". Have you forgotten parenthesis?":"")};return c=c?c instanceof b?c.value:c.toCSS():"",new d(a.value,c)},"get-unit":function(a){return new g(a.unit)},extract:function(a,b){return b=b.value-1,m(a)[b]},length:function(a){return new d(m(a).length)}})},{"../tree/anonymous":46,"../tree/color":50,"../tree/detached-ruleset":55,"../tree/dimension":56,"../tree/keyword":65,"../tree/operation":71,"../tree/quoted":73,"../tree/url":80,"./function-registry":22}],30:[function(a,b){var c=a("./contexts"),d=a("./parser/parser"),e=a("./plugins/function-importer");b.exports=function(a){var b=function(a,b){this.rootFilename=b.filename,this.paths=a.paths||[],this.contents={},this.contentsIgnoredChars={},this.mime=a.mime,this.error=null,this.context=a,this.queue=[],this.files={}};return b.prototype.push=function(b,f,g,h,i){var j=this;this.queue.push(b);var k=function(a,c,d){j.queue.splice(j.queue.indexOf(b),1);var e=d===j.rootFilename;h.optional&&a?i(null,{rules:[]},!1,null):(j.files[d]=c,a&&!j.error&&(j.error=a),i(a,c,e,d))},l={relativeUrls:this.context.relativeUrls,entryPath:g.entryPath,rootpath:g.rootpath,rootFilename:g.rootFilename},m=a.getFileManager(b,g.currentDirectory,this.context,a);if(!m)return void k({message:"Could not find a file-manager for "+b});f&&(b=m.tryAppendExtension(b,h.plugin?".js":".less"));var n=function(a){var b=a.filename,f=a.contents.replace(/^\uFEFF/,"");l.currentDirectory=m.getPath(b),l.relativeUrls&&(l.rootpath=m.join(j.context.rootpath||"",m.pathDiff(l.currentDirectory,l.entryPath)),!m.isPathAbsolute(l.rootpath)&&m.alwaysMakePathsAbsolute()&&(l.rootpath=m.join(l.entryPath,l.rootpath))),l.filename=b;var i=new c.Parse(j.context);i.processImports=!1,j.contents[b]=f,(g.reference||h.reference)&&(l.reference=!0),h.plugin?new e(i,l).eval(f,function(a,c){k(a,c,b)}):h.inline?k(null,f,b):new d(i,j,l).parse(f,function(a,c){k(a,c,b)})},o=m.loadFile(b,g.currentDirectory,this.context,a,function(a,b){a?k(a):n(b)});o&&o.then(n,k)},b}},{"./contexts":11,"./parser/parser":38,"./plugins/function-importer":40}],31:[function(a,b){b.exports=function(b,c){var d,e,f,g,h,i={version:[2,6,1],data:a("./data"),tree:a("./tree"),Environment:h=a("./environment/environment"),AbstractFileManager:a("./environment/abstract-file-manager"),environment:b=new h(b,c),visitors:a("./visitors"),Parser:a("./parser/parser"),functions:a("./functions")(b),contexts:a("./contexts"),SourceMapOutput:d=a("./source-map-output")(b),SourceMapBuilder:e=a("./source-map-builder")(d,b),ParseTree:f=a("./parse-tree")(e),ImportManager:g=a("./import-manager")(b),render:a("./render")(b,f,g),parse:a("./parse")(b,f,g),LessError:a("./less-error"),transformTree:a("./transform-tree"),utils:a("./utils"),PluginManager:a("./plugin-manager"),logger:a("./logger")};return i}},{"./contexts":11,"./data":13,"./environment/abstract-file-manager":15,"./environment/environment":16,"./functions":23,"./import-manager":30,"./less-error":32,"./logger":33,"./parse":35,"./parse-tree":34,"./parser/parser":38,"./plugin-manager":39,"./render":41,"./source-map-builder":42,"./source-map-output":43,"./transform-tree":44,"./tree":62,"./utils":83,"./visitors":87}],32:[function(a,b){var c=a("./utils"),d=b.exports=function(a,b,d){Error.call(this);var e=a.filename||d;if(b&&e){var f=b.contents[e],g=c.getLocation(a.index,f),h=g.line,i=g.column,j=a.call&&c.getLocation(a.call,f).line,k=f.split("\n");this.type=a.type||"Syntax",this.filename=e,this.index=a.index,this.line="number"==typeof h?h+1:null,this.callLine=j+1,this.callExtract=k[j],this.column=i,this.extract=[k[h-1],k[h],k[h+1]]}this.message=a.message,this.stack=a.stack};if("undefined"==typeof Object.create){var e=function(){};e.prototype=Error.prototype,d.prototype=new e}else d.prototype=Object.create(Error.prototype);d.prototype.constructor=d},{"./utils":83}],33:[function(a,b){b.exports={error:function(a){this._fireEvent("error",a)},warn:function(a){this._fireEvent("warn",a)},info:function(a){this._fireEvent("info",a)},debug:function(a){this._fireEvent("debug",a)},addListener:function(a){this._listeners.push(a)},removeListener:function(a){for(var b=0;this._listeners.length>b;b++)if(this._listeners[b]===a)return void this._listeners.splice(b,1)},_fireEvent:function(a,b){for(var c=0;this._listeners.length>c;c++){var d=this._listeners[c][a];d&&d(b)}},_listeners:[]}},{}],34:[function(a,b){var c=a("./less-error"),d=a("./transform-tree"),e=a("./logger");b.exports=function(a){var b=function(a,b){this.root=a,this.imports=b};return b.prototype.toCSS=function(b){var f,g,h={};try{f=d(this.root,b)}catch(i){throw new c(i,this.imports)}try{var j=Boolean(b.compress);j&&e.warn("The compress option has been deprecated. We recommend you use a dedicated css minifier, for instance see less-plugin-clean-css.");var k={compress:j,dumpLineNumbers:b.dumpLineNumbers,strictUnits:Boolean(b.strictUnits),numPrecision:8};b.sourceMap?(g=new a(b.sourceMap),h.css=g.toCSS(f,k,this.imports)):h.css=f.toCSS(k)}catch(i){throw new c(i,this.imports)}if(b.pluginManager)for(var l=b.pluginManager.getPostProcessors(),m=0;l.length>m;m++)h.css=l[m].process(h.css,{sourceMap:g,options:b,imports:this.imports});b.sourceMap&&(h.map=g.getExternalSourceMap()),h.imports=[];for(var n in this.imports.files)this.imports.files.hasOwnProperty(n)&&n!==this.imports.rootFilename&&h.imports.push(n);return h},b}},{"./less-error":32,"./logger":33,"./transform-tree":44}],35:[function(a,b){var c,d=a("./contexts"),e=a("./parser/parser"),f=a("./plugin-manager");b.exports=function(b,g,h){var i=function(b,g,j){if(g=g||{},"function"==typeof g&&(j=g,g={}),!j){c||(c="undefined"==typeof Promise?a("promise"):Promise);var k=this;return new c(function(a,c){i.call(k,b,g,function(b,d){b?c(b):a(d)})})}var l,m,n=new f(this);if(n.addPlugins(g.plugins),g.pluginManager=n,l=new d.Parse(g),g.rootFileInfo)m=g.rootFileInfo;else{var o=g.filename||"input",p=o.replace(/[^\/\\]*$/,"");m={filename:o,relativeUrls:l.relativeUrls,rootpath:l.rootpath||"",currentDirectory:p,entryPath:p,rootFilename:o},m.rootpath&&"/"!==m.rootpath.slice(-1)&&(m.rootpath+="/")}var q=new h(l,m);new e(l,q,m).parse(b,function(a,b){return a?j(a):void j(null,b,q,g)},g)};return i}},{"./contexts":11,"./parser/parser":38,"./plugin-manager":39,promise:void 0}],36:[function(a,b){b.exports=function(a,b){function c(b){var c=h-q;512>c&&!b||!c||(p.push(a.slice(q,h+1)),q=h+1)}var d,e,f,g,h,i,j,k,l,m=a.length,n=0,o=0,p=[],q=0;for(h=0;m>h;h++)if(j=a.charCodeAt(h),!(j>=97&&122>=j||34>j))switch(j){case 40:o++,e=h;continue;case 41:if(--o<0)return b("missing opening `(`",h);continue;case 59:o||c();continue;case 123:n++,d=h;continue;case 125:if(--n<0)return b("missing opening `{`",h);n||o||c();continue;case 92:if(m-1>h){h++;continue}return b("unescaped `\\`",h);case 34:case 39:case 96:for(l=0,i=h,h+=1;m>h;h++)if(k=a.charCodeAt(h),!(k>96)){if(k==j){l=1;break}if(92==k){if(h==m-1)return b("unescaped `\\`",h);h++}}if(l)continue;return b("unmatched `"+String.fromCharCode(j)+"`",i);case 47:if(o||h==m-1)continue;if(k=a.charCodeAt(h+1),47==k)for(h+=2;m>h&&(k=a.charCodeAt(h),!(13>=k)||10!=k&&13!=k);h++);else if(42==k){for(f=i=h,h+=2;m-1>h&&(k=a.charCodeAt(h),125==k&&(g=h),42!=k||47!=a.charCodeAt(h+1));h++);if(h==m-1)return b("missing closing `*/`",i);h++}continue;case 42:if(m-1>h&&47==a.charCodeAt(h+1))return b("unmatched `/*`",h);continue}return 0!==n?f>d&&g>f?b("missing closing `}` or `*/`",d):b("missing closing `}`",d):0!==o?b("missing closing `)`",e):(c(!0),p)}},{}],37:[function(a,b){var c=a("./chunker");b.exports=function(){function a(c){for(var e,f,j,p=k.i,q=d,s=k.i-i,t=k.i+h.length-s,u=k.i+=c,v=b;t>k.i;k.i++){if(e=v.charCodeAt(k.i),k.autoCommentAbsorb&&e===r){if(f=v.charAt(k.i+1),"/"===f){j={index:k.i,isLineComment:!0};var w=v.indexOf("\n",k.i+2);0>w&&(w=t),k.i=w,j.text=v.substr(j.i,k.i-j.i),k.commentStore.push(j);continue}if("*"===f){var x=v.indexOf("*/",k.i+2);if(x>=0){j={index:k.i,text:v.substr(k.i,x+2-k.i),isLineComment:!1},k.i+=j.text.length-1,k.commentStore.push(j);continue}}break}if(e!==l&&e!==n&&e!==m&&e!==o)break}if(h=h.slice(c+k.i-u+s),i=k.i,!h.length){if(g.length-1>d)return h=g[++d],a(0),!0;k.finished=!0}return p!==k.i||q!==d}var b,d,e,f,g,h,i,j=[],k={},l=32,m=9,n=10,o=13,p=43,q=44,r=47,s=57;return k.save=function(){i=k.i,j.push({current:h,i:k.i,j:d})},k.restore=function(a){(k.i>e||k.i===e&&a&&!f)&&(e=k.i,f=a);var b=j.pop();h=b.current,i=k.i=b.i,d=b.j},k.forget=function(){j.pop()},k.isWhitespace=function(a){var c=k.i+(a||0),d=b.charCodeAt(c);return d===l||d===o||d===m||d===n},k.$re=function(b){k.i>i&&(h=h.slice(k.i-i),i=k.i);var c=b.exec(h);return c?(a(c[0].length),"string"==typeof c?c:1===c.length?c[0]:c):null},k.$char=function(c){return b.charAt(k.i)!==c?null:(a(1),c)},k.$str=function(c){for(var d=c.length,e=0;d>e;e++)if(b.charAt(k.i+e)!==c.charAt(e))return null;return a(d),c},k.$quoted=function(){var c=b.charAt(k.i);if("'"===c||'"'===c){for(var d=b.length,e=k.i,f=1;d>f+e;f++){var g=b.charAt(f+e);switch(g){case"\\":f++;continue;case"\r":case"\n":break;case c:var h=b.substr(e,f+1);return a(f+1),h}}return null}},k.autoCommentAbsorb=!0,k.commentStore=[],k.finished=!1,k.peek=function(a){if("string"==typeof a){for(var c=0;a.length>c;c++)if(b.charAt(k.i+c)!==a.charAt(c))return!1;return!0}return a.test(h)},k.peekChar=function(a){return b.charAt(k.i)===a},k.currentChar=function(){return b.charAt(k.i)},k.getInput=function(){return b},k.peekNotNumeric=function(){var a=b.charCodeAt(k.i);return a>s||p>a||a===r||a===q},k.start=function(f,j,l){b=f,k.i=d=i=e=0,g=j?c(f,l):[f],h=g[0],a(0)},k.end=function(){var a,c=k.i>=b.length;return e>k.i&&(a=f,k.i=e),{isFinished:c,furthest:k.i,furthestPossibleErrorMessage:a,furthestReachedEnd:k.i>=b.length-1,furthestChar:b[k.i]}},k}},{"./chunker":36}],38:[function(a,b){var c=a("../less-error"),d=a("../tree"),e=a("../visitors"),f=a("./parser-input"),g=a("../utils"),h=function i(a,b,h){function j(a,d){throw new c({index:o.i,filename:h.filename,type:d||"Syntax",message:a},b)}function k(a,b){var c=a instanceof Function?a.call(n):o.$re(a);return c?c:void j(b||("string"==typeof a?"expected '"+a+"' got '"+o.currentChar()+"'":"unexpected token"))}function l(a,b){return o.$char(a)?a:void j(b||"expected '"+a+"' got '"+o.currentChar()+"'")}function m(a){var b=h.filename;return{lineNumber:g.getLocation(a,o.getInput()).line+1,fileName:b}}var n,o=f();return{parse:function(f,g,j){var k,l,m,n,p=null,q="";if(l=j&&j.globalVars?i.serializeVars(j.globalVars)+"\n":"",m=j&&j.modifyVars?"\n"+i.serializeVars(j.modifyVars):"",a.pluginManager)for(var r=a.pluginManager.getPreProcessors(),s=0;r.length>s;s++)f=r[s].process(f,{context:a,imports:b,fileInfo:h});(l||j&&j.banner)&&(q=(j&&j.banner?j.banner:"")+l,n=b.contentsIgnoredChars,n[h.filename]=n[h.filename]||0,n[h.filename]+=q.length),f=f.replace(/\r\n?/g,"\n"),f=q+f.replace(/^\uFEFF/,"")+m,b.contents[h.filename]=f;try{o.start(f,a.chunkInput,function(a,d){throw new c({index:d,type:"Parse",message:a,filename:h.filename},b)}),k=new d.Ruleset(null,this.parsers.primary()),k.root=!0,k.firstRoot=!0}catch(t){return g(new c(t,b,h.filename))}var u=o.end();if(!u.isFinished){var v=u.furthestPossibleErrorMessage;v||(v="Unrecognised input","}"===u.furthestChar?v+=". Possibly missing opening '{'":")"===u.furthestChar?v+=". Possibly missing opening '('":u.furthestReachedEnd&&(v+=". Possibly missing something")),p=new c({type:"Parse",message:v,index:u.furthest,filename:h.filename},b)}var w=function(a){return a=p||a||b.error,a?(a instanceof c||(a=new c(a,b,h.filename)),g(a)):g(null,k)};return a.processImports===!1?w():void new e.ImportVisitor(b,w).run(k)},parsers:n={primary:function(){for(var a,b=this.mixin,c=[];;){for(;;){if(a=this.comment(),!a)break;c.push(a)}if(o.finished)break;if(o.peek("}"))break;if(a=this.extendRule())c=c.concat(a);else if(a=b.definition()||this.rule()||this.ruleset()||b.call()||this.rulesetCall()||this.directive())c.push(a);else{for(var d=!1;o.$char(";");)d=!0;if(!d)break}}return c},comment:function(){if(o.commentStore.length){var a=o.commentStore.shift();return new d.Comment(a.text,a.isLineComment,a.index,h)}},entities:{quoted:function(){var a,b=o.i,c=!1;return o.save(),o.$char("~")&&(c=!0),(a=o.$quoted())?(o.forget(),new d.Quoted(a.charAt(0),a.substr(1,a.length-2),c,b,h)):void o.restore()},keyword:function(){var a=o.$char("%")||o.$re(/^[_A-Za-z-][_A-Za-z0-9-]*/);return a?d.Color.fromKeyword(a)||new d.Keyword(a):void 0},call:function(){var a,b,c,e,f=o.i;if(!o.peek(/^url\(/i))return o.save(),(a=o.$re(/^([\w-]+|%|progid:[\w\.]+)\(/))?(a=a[1],b=a.toLowerCase(),"alpha"===b&&(e=n.alpha())?(o.forget(),e):(c=this.arguments(),o.$char(")")?(o.forget(),new d.Call(a,c,f,h)):void o.restore("Could not parse call arguments or missing ')'"))):void o.forget()},arguments:function(){for(var a,b=[];;){if(a=this.assignment()||n.expression(),!a)break;if(b.push(a),!o.$char(","))break}return b},literal:function(){return this.dimension()||this.color()||this.quoted()||this.unicodeDescriptor()},assignment:function(){var a,b;return o.save(),(a=o.$re(/^\w+(?=\s?=)/i))&&o.$char("=")&&(b=n.entity())?(o.forget(),new d.Assignment(a,b)):void o.restore()},url:function(){var a,b=o.i;return o.autoCommentAbsorb=!1,o.$str("url(")?(a=this.quoted()||this.variable()||o.$re(/^(?:(?:\\[\(\)'"])|[^\(\)'"])+/)||"",o.autoCommentAbsorb=!0,l(")"),new d.URL(null!=a.value||a instanceof d.Variable?a:new d.Anonymous(a),b,h)):void(o.autoCommentAbsorb=!0)},variable:function(){var a,b=o.i;return"@"===o.currentChar()&&(a=o.$re(/^@@?[\w-]+/))?new d.Variable(a,b,h):void 0},variableCurly:function(){var a,b=o.i;return"@"===o.currentChar()&&(a=o.$re(/^@\{([\w-]+)\}/))?new d.Variable("@"+a[1],b,h):void 0},color:function(){var a;if("#"===o.currentChar()&&(a=o.$re(/^#([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})/))){var b=a.input.match(/^#([\w]+).*/);return b=b[1],b.match(/^[A-Fa-f0-9]+$/)||j("Invalid HEX color code"),new d.Color(a[1],void 0,"#"+b)}},colorKeyword:function(){o.save();var a=o.autoCommentAbsorb;o.autoCommentAbsorb=!1;var b=o.$re(/^[A-Za-z]+/);if(o.autoCommentAbsorb=a,!b)return void o.forget();o.restore();var c=d.Color.fromKeyword(b);return c?(o.$str(b),c):void 0},dimension:function(){if(!o.peekNotNumeric()){var a=o.$re(/^([+-]?\d*\.?\d+)(%|[a-z_]+)?/i);return a?new d.Dimension(a[1],a[2]):void 0}},unicodeDescriptor:function(){var a;return a=o.$re(/^U\+[0-9a-fA-F?]+(\-[0-9a-fA-F?]+)?/),a?new d.UnicodeDescriptor(a[0]):void 0},javascript:function(){var a,b=o.i;o.save();var c=o.$char("~"),e=o.$char("`");return e?(a=o.$re(/^[^`]*`/))?(o.forget(),new d.JavaScript(a.substr(0,a.length-1),Boolean(c),b,h)):void o.restore("invalid javascript definition"):void o.restore()}},variable:function(){var a;return"@"===o.currentChar()&&(a=o.$re(/^(@[\w-]+)\s*:/))?a[1]:void 0},rulesetCall:function(){var a;return"@"===o.currentChar()&&(a=o.$re(/^(@[\w-]+)\(\s*\)\s*;/))?new d.RulesetCall(a[1]):void 0},extend:function(a){var b,c,e,f,g,i=o.i;if(o.$str(a?"&:extend(":":extend(")){do{for(e=null,b=null;!(e=o.$re(/^(all)(?=\s*(\)|,))/))&&(c=this.element());)b?b.push(c):b=[c];e=e&&e[1],b||j("Missing target selector for :extend()."),g=new d.Extend(new d.Selector(b),e,i,h),f?f.push(g):f=[g]}while(o.$char(","));return k(/^\)/),a&&k(/^;/),f}},extendRule:function(){return this.extend(!0)},mixin:{call:function(){var a,b,c,e,f,g,i=o.currentChar(),j=!1,k=o.i;if("."===i||"#"===i){for(o.save();;){if(a=o.i,e=o.$re(/^[#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/),!e)break;c=new d.Element(f,e,a,h),b?b.push(c):b=[c],f=o.$char(">")}return b&&(o.$char("(")&&(g=this.args(!0).args,l(")")),n.important()&&(j=!0),n.end())?(o.forget(),new d.mixin.Call(b,g,k,h,j)):void o.restore()}},args:function(a){var b,c,e,f,g,h,i,k=n.entities,l={args:null,variadic:!1},m=[],p=[],q=[];for(o.save();;){if(a)h=n.detachedRuleset()||n.expression();else{if(o.commentStore.length=0,o.$str("...")){l.variadic=!0,o.$char(";")&&!b&&(b=!0),(b?p:q).push({variadic:!0});break}h=k.variable()||k.literal()||k.keyword()}if(!h)break;f=null,h.throwAwayComments&&h.throwAwayComments(),g=h;var r=null;if(a?h.value&&1==h.value.length&&(r=h.value[0]):r=h,r&&r instanceof d.Variable)if(o.$char(":")){if(m.length>0&&(b&&j("Cannot mix ; and , as delimiter types"),c=!0),g=n.detachedRuleset()||n.expression(),!g){if(!a)return o.restore(),l.args=[],l;j("could not understand value for named argument")}f=e=r.name}else if(o.$str("...")){if(!a){l.variadic=!0,o.$char(";")&&!b&&(b=!0),(b?p:q).push({name:h.name,variadic:!0});break}i=!0}else a||(e=f=r.name,g=null);g&&m.push(g),q.push({name:f,value:g,expand:i}),o.$char(",")||(o.$char(";")||b)&&(c&&j("Cannot mix ; and , as delimiter types"),b=!0,m.length>1&&(g=new d.Value(m)),p.push({name:e,value:g,expand:i}),e=null,m=[],c=!1)}return o.forget(),l.args=b?p:q,l},definition:function(){var a,b,c,e,f=[],g=!1;if(!("."!==o.currentChar()&&"#"!==o.currentChar()||o.peek(/^[^{]*\}/)))if(o.save(),b=o.$re(/^([#.](?:[\w-]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+)\s*\(/)){a=b[1];var h=this.args(!1);if(f=h.args,g=h.variadic,!o.$char(")"))return void o.restore("Missing closing ')'");if(o.commentStore.length=0,o.$str("when")&&(e=k(n.conditions,"expected condition")),c=n.block())return o.forget(),new d.mixin.Definition(a,f,c,e,g);o.restore()}else o.forget()}},entity:function(){var a=this.entities;return this.comment()||a.literal()||a.variable()||a.url()||a.call()||a.keyword()||a.javascript()},end:function(){return o.$char(";")||o.peek("}")},alpha:function(){var a;if(o.$re(/^opacity=/i))return a=o.$re(/^\d+/),a||(a=k(this.entities.variable,"Could not parse alpha")),l(")"),new d.Alpha(a)},element:function(){var a,b,c,e=o.i;return b=this.combinator(),a=o.$re(/^(?:\d+\.\d+|\d+)%/)||o.$re(/^(?:[.#]?|:*)(?:[\w-]|[^\x00-\x9f]|\\(?:[A-Fa-f0-9]{1,6} ?|[^A-Fa-f0-9]))+/)||o.$char("*")||o.$char("&")||this.attribute()||o.$re(/^\([^&()@]+\)/)||o.$re(/^[\.#:](?=@)/)||this.entities.variableCurly(),a||(o.save(),o.$char("(")?(c=this.selector())&&o.$char(")")?(a=new d.Paren(c),o.forget()):o.restore("Missing closing ')'"):o.forget()),a?new d.Element(b,a,e,h):void 0},combinator:function(){var a=o.currentChar();if("/"===a){o.save();var b=o.$re(/^\/[a-z]+\//i);if(b)return o.forget(),new d.Combinator(b);o.restore()}if(">"===a||"+"===a||"~"===a||"|"===a||"^"===a){for(o.i++,"^"===a&&"^"===o.currentChar()&&(a="^^",o.i++);o.isWhitespace();)o.i++;return new d.Combinator(a)}return new d.Combinator(o.isWhitespace(-1)?" ":null)},lessSelector:function(){return this.selector(!0)},selector:function(a){for(var b,c,e,f,g,i,l,m=o.i;(a&&(c=this.extend())||a&&(i=o.$str("when"))||(f=this.element()))&&(i?l=k(this.conditions,"expected condition"):l?j("CSS guard can only be used at the end of selector"):c?g=g?g.concat(c):c:(g&&j("Extend can only be used at the end of selector"),e=o.currentChar(),b?b.push(f):b=[f],f=null),"{"!==e&&"}"!==e&&";"!==e&&","!==e&&")"!==e););return b?new d.Selector(b,g,l,m,h):void(g&&j("Extend must be used to extend a selector, it cannot be used on its own"))},attribute:function(){if(o.$char("[")){var a,b,c,e=this.entities;return(a=e.variableCurly())||(a=k(/^(?:[_A-Za-z0-9-\*]*\|)?(?:[_A-Za-z0-9-]|\\.)+/)),c=o.$re(/^[|~*$^]?=/),c&&(b=e.quoted()||o.$re(/^[0-9]+%/)||o.$re(/^[\w-]+/)||e.variableCurly()),l("]"),new d.Attribute(a,c,b)}},block:function(){var a;return o.$char("{")&&(a=this.primary())&&o.$char("}")?a:void 0},blockRuleset:function(){var a=this.block();return a&&(a=new d.Ruleset(null,a)),a},detachedRuleset:function(){var a=this.blockRuleset();return a?new d.DetachedRuleset(a):void 0},ruleset:function(){var b,c,e,f;for(o.save(),a.dumpLineNumbers&&(f=m(o.i));;){if(c=this.lessSelector(),!c)break;if(b?b.push(c):b=[c],o.commentStore.length=0,c.condition&&b.length>1&&j("Guards are only currently allowed on a single selector."),!o.$char(","))break;c.condition&&j("Guards are only currently allowed on a single selector."),o.commentStore.length=0}if(b&&(e=this.block())){o.forget();var g=new d.Ruleset(b,e,a.strictImports);return a.dumpLineNumbers&&(g.debugInfo=f),g}o.restore()},rule:function(b){var c,e,f,g,i,j=o.i,k=o.currentChar();if("."!==k&&"#"!==k&&"&"!==k&&":"!==k)if(o.save(),c=this.variable()||this.ruleProperty()){if(i="string"==typeof c,i&&(e=this.detachedRuleset()),o.commentStore.length=0,!e){g=!i&&c.length>1&&c.pop().value;var l=!b&&(a.compress||i);if(l&&(e=this.value()),!e&&(e=this.anonymousValue()))return o.forget(),new d.Rule(c,e,!1,g,j,h);l||e||(e=this.value()),f=this.important()}if(e&&this.end())return o.forget(),new d.Rule(c,e,f,g,j,h);if(o.restore(),e&&!b)return this.rule(!0)}else o.forget()},anonymousValue:function(){var a=o.$re(/^([^@+\/'"*`(;{}-]*);/);return a?new d.Anonymous(a[1]):void 0},"import":function(){var a,b,c=o.i,e=o.$re(/^@import?\s+/);if(e){var f=(e?this.importOptions():null)||{};if(a=this.entities.quoted()||this.entities.url())return b=this.mediaFeatures(),o.$char(";")||(o.i=c,j("missing semi-colon or unrecognised media features on import")),b=b&&new d.Value(b),new d.Import(a,b,f,c,h);o.i=c,j("malformed import statement")}},importOptions:function(){var a,b,c,d={};if(!o.$char("("))return null;do if(a=this.importOption()){switch(b=a,c=!0,b){case"css":b="less",c=!1;break;case"once":b="multiple",c=!1}if(d[b]=c,!o.$char(","))break}while(a);return l(")"),d},importOption:function(){var a=o.$re(/^(less|css|multiple|once|inline|reference|optional)/);return a?a[1]:void 0},mediaFeature:function(){var a,b,c=this.entities,e=[];o.save();do a=c.keyword()||c.variable(),a?e.push(a):o.$char("(")&&(b=this.property(),a=this.value(),o.$char(")")?b&&a?e.push(new d.Paren(new d.Rule(b,a,null,null,o.i,h,!0))):a?e.push(new d.Paren(a)):j("badly formed media feature definition"):j("Missing closing ')'","Parse"));while(a);return o.forget(),e.length>0?new d.Expression(e):void 0},mediaFeatures:function(){var a,b=this.entities,c=[];do if(a=this.mediaFeature()){if(c.push(a),!o.$char(","))break}else if(a=b.variable(),a&&(c.push(a),!o.$char(",")))break;while(a);return c.length>0?c:null},media:function(){var b,c,e,f;return a.dumpLineNumbers&&(f=m(o.i)),o.save(),o.$str("@media")?(b=this.mediaFeatures(),c=this.block(),c||j("media definitions require block statements after any features"),o.forget(),e=new d.Media(c,b,o.i,h),a.dumpLineNumbers&&(e.debugInfo=f),e):void o.restore()},plugin:function(){var a,b=o.i,c=o.$re(/^@plugin?\s+/);if(c){var e={plugin:!0};if(a=this.entities.quoted()||this.entities.url())return o.$char(";")||(o.i=b,j("missing semi-colon on plugin")),new d.Import(a,null,e,b,h);o.i=b,j("malformed plugin statement")}},directive:function(){var b,c,e,f,g,i,k,l=o.i,n=!0,p=!0;if("@"===o.currentChar()){if(c=this["import"]()||this.plugin()||this.media())return c;if(o.save(),b=o.$re(/^@[a-z-]+/)){switch(f=b,"-"==b.charAt(1)&&b.indexOf("-",2)>0&&(f="@"+b.slice(b.indexOf("-",2)+1)),f){case"@charset":g=!0,n=!1;break;case"@namespace":i=!0,n=!1;break;case"@keyframes":case"@counter-style":g=!0;break;case"@document":case"@supports":k=!0,p=!1;break;default:k=!0}return o.commentStore.length=0,g?(c=this.entity(),c||j("expected "+b+" identifier")):i?(c=this.expression(),c||j("expected "+b+" expression")):k&&(c=(o.$re(/^[^{;]+/)||"").trim(),n="{"==o.currentChar(),c&&(c=new d.Anonymous(c))),n&&(e=this.blockRuleset()),e||!n&&c&&o.$char(";")?(o.forget(),new d.Directive(b,c,e,l,h,a.dumpLineNumbers?m(l):null,p)):void o.restore("directive options not recognised")}}},value:function(){var a,b=[];do if(a=this.expression(),a&&(b.push(a),!o.$char(",")))break;while(a);return b.length>0?new d.Value(b):void 0},important:function(){return"!"===o.currentChar()?o.$re(/^! *important/):void 0},sub:function(){var a,b;return o.save(),o.$char("(")?(a=this.addition(),a&&o.$char(")")?(o.forget(),b=new d.Expression([a]),b.parens=!0,b):void o.restore("Expected ')'")):void o.restore()},multiplication:function(){var a,b,c,e,f;if(a=this.operand()){for(f=o.isWhitespace(-1);;){if(o.peek(/^\/[*\/]/))break;if(o.save(),c=o.$char("/")||o.$char("*"),!c){o.forget();break}if(b=this.operand(),!b){o.restore();break}o.forget(),a.parensInOp=!0,b.parensInOp=!0,e=new d.Operation(c,[e||a,b],f),f=o.isWhitespace(-1)}return e||a}},addition:function(){var a,b,c,e,f;if(a=this.multiplication()){for(f=o.isWhitespace(-1);;){if(c=o.$re(/^[-+]\s+/)||!f&&(o.$char("+")||o.$char("-")),!c)break;if(b=this.multiplication(),!b)break;a.parensInOp=!0,b.parensInOp=!0,e=new d.Operation(c,[e||a,b],f),f=o.isWhitespace(-1)}return e||a}},conditions:function(){var a,b,c,e=o.i;if(a=this.condition()){for(;;){if(!o.peek(/^,\s*(not\s*)?\(/)||!o.$char(","))break;if(b=this.condition(),!b)break;c=new d.Condition("or",c||a,b,e)}return c||a}},condition:function(){function a(){return o.$str("or")}var b,c,e;if(b=this.conditionAnd(this)){if(c=a()){if(e=this.condition(),!e)return;b=new d.Condition(c,b,e)}return b}},conditionAnd:function(){function a(a){return a.negatedCondition()||a.parenthesisCondition()}function b(){return o.$str("and")}var c,e,f;if(c=a(this)){if(e=b()){if(f=this.conditionAnd(),!f)return;c=new d.Condition(e,c,f)}return c}},negatedCondition:function(){if(o.$str("not")){var a=this.parenthesisCondition();return a&&(a.negate=!a.negate),a}},parenthesisCondition:function(){function a(a){var b;return o.save(),(b=a.condition())&&o.$char(")")?(o.forget(),b):void o.restore()}var b;return o.save(),o.$str("(")?(b=a(this))?(o.forget(),b):(b=this.atomicCondition())?o.$char(")")?(o.forget(),b):void o.restore("expected ')' got '"+o.currentChar()+"'"):void o.restore():void o.restore()},atomicCondition:function(){var a,b,c,e,f=this.entities,g=o.i;return a=this.addition()||f.keyword()||f.quoted(),a?(o.$char(">")?e=o.$char("=")?">=":">":o.$char("<")?e=o.$char("=")?"<=":"<":o.$char("=")&&(e=o.$char(">")?"=>":o.$char("<")?"=<":"="),e?(b=this.addition()||f.keyword()||f.quoted(),b?c=new d.Condition(e,a,b,g,!1):j("expected expression")):c=new d.Condition("=",a,new d.Keyword("true"),g,!1),c):void 0},operand:function(){var a,b=this.entities;o.peek(/^-[@\(]/)&&(a=o.$char("-"));var c=this.sub()||b.dimension()||b.color()||b.variable()||b.call()||b.colorKeyword();return a&&(c.parensInOp=!0,c=new d.Negative(c)),c},expression:function(){var a,b,c=[];do a=this.comment(),a?c.push(a):(a=this.addition()||this.entity(),a&&(c.push(a),o.peek(/^\/[\/*]/)||(b=o.$char("/"),b&&c.push(new d.Anonymous(b)))));while(a);return c.length>0?new d.Expression(c):void 0},property:function(){var a=o.$re(/^(\*?-?[_a-zA-Z0-9-]+)\s*:/);return a?a[1]:void 0},ruleProperty:function(){function a(a){var b=o.i,c=o.$re(a);return c?(f.push(b),e.push(c[1])):void 0}var b,c,e=[],f=[];o.save();var g=o.$re(/^([_a-zA-Z0-9-]+)\s*:/);if(g)return e=[new d.Keyword(g[1])],o.forget(),e;for(a(/^(\*?)/);;)if(!a(/^((?:[\w-]+)|(?:@\{[\w-]+\}))/))break;if(e.length>1&&a(/^((?:\+_|\+)?)\s*:/)){for(o.forget(),""===e[0]&&(e.shift(),f.shift()),c=0;e.length>c;c++)b=e[c],e[c]="@"!==b.charAt(0)?new d.Keyword(b):new d.Variable("@"+b.slice(2,-1),f[c],h);return e}o.restore()}}}};h.serializeVars=function(a){var b="";for(var c in a)if(Object.hasOwnProperty.call(a,c)){var d=a[c];b+=("@"===c[0]?"":"@")+c+": "+d+(";"===String(d).slice(-1)?"":";")}return b},b.exports=h},{"../less-error":32,"../tree":62,"../utils":83,"../visitors":87,"./parser-input":37}],39:[function(a,b){var c=function(a){this.less=a,this.visitors=[],this.preProcessors=[],this.postProcessors=[],this.installedPlugins=[],this.fileManagers=[]};c.prototype.addPlugins=function(a){if(a)for(var b=0;a.length>b;b++)this.addPlugin(a[b])},c.prototype.addPlugin=function(a){this.installedPlugins.push(a),a.install(this.less,this)},c.prototype.addVisitor=function(a){this.visitors.push(a)},c.prototype.addPreProcessor=function(a,b){var c;for(c=0;this.preProcessors.length>c&&!(this.preProcessors[c].priority>=b);c++);this.preProcessors.splice(c,0,{preProcessor:a,priority:b})},c.prototype.addPostProcessor=function(a,b){var c;for(c=0;this.postProcessors.length>c&&!(this.postProcessors[c].priority>=b);c++);this.postProcessors.splice(c,0,{postProcessor:a,priority:b})},c.prototype.addFileManager=function(a){this.fileManagers.push(a)},c.prototype.getPreProcessors=function(){for(var a=[],b=0;this.preProcessors.length>b;b++)a.push(this.preProcessors[b].preProcessor);return a},c.prototype.getPostProcessors=function(){for(var a=[],b=0;this.postProcessors.length>b;b++)a.push(this.postProcessors[b].postProcessor);return a},c.prototype.getVisitors=function(){return this.visitors},c.prototype.getFileManagers=function(){return this.fileManagers},b.exports=c},{}],40:[function(a,b){var c=a("../less-error"),d=a("../tree"),e=b.exports=function(a,b){this.fileInfo=b};e.prototype.eval=function(a,b){var e,f,g={};f={add:function(a,b){g[a]=b},addMultiple:function(a){Object.keys(a).forEach(function(b){g[b]=a[b]})}};try{e=new Function("functions","tree","fileInfo",a),e(f,d,this.fileInfo)}catch(h){b(new c({message:"Plugin evaluation error: '"+h.name+": "+h.message.replace(/["]/g,"'")+"'",filename:this.fileInfo.filename}),null)}b(null,{functions:g})}},{"../less-error":32,"../tree":62}],41:[function(a,b){var c;b.exports=function(b,d){var e=function(b,f,g){if("function"==typeof f&&(g=f,f={}),!g){c||(c="undefined"==typeof Promise?a("promise"):Promise); + +var h=this;return new c(function(a,c){e.call(h,b,f,function(b,d){b?c(b):a(d)})})}this.parse(b,f,function(a,b,c,e){if(a)return g(a);var f;try{var h=new d(b,c);f=h.toCSS(e)}catch(a){return g(a)}g(null,f)})};return e}},{promise:void 0}],42:[function(a,b){b.exports=function(a,b){var c=function(a){this.options=a};return c.prototype.toCSS=function(b,c,d){var e=new a({contentsIgnoredCharsMap:d.contentsIgnoredChars,rootNode:b,contentsMap:d.contents,sourceMapFilename:this.options.sourceMapFilename,sourceMapURL:this.options.sourceMapURL,outputFilename:this.options.sourceMapOutputFilename,sourceMapBasepath:this.options.sourceMapBasepath,sourceMapRootpath:this.options.sourceMapRootpath,outputSourceFiles:this.options.outputSourceFiles,sourceMapGenerator:this.options.sourceMapGenerator,sourceMapFileInline:this.options.sourceMapFileInline}),f=e.toCSS(c);return this.sourceMap=e.sourceMap,this.sourceMapURL=e.sourceMapURL,this.options.sourceMapInputFilename&&(this.sourceMapInputFilename=e.normalizeFilename(this.options.sourceMapInputFilename)),f+this.getCSSAppendage()},c.prototype.getCSSAppendage=function(){var a=this.sourceMapURL;if(this.options.sourceMapFileInline){if(void 0===this.sourceMap)return"";a="data:application/json;base64,"+b.encodeBase64(this.sourceMap)}return a?"/*# sourceMappingURL="+a+" */":""},c.prototype.getExternalSourceMap=function(){return this.sourceMap},c.prototype.setExternalSourceMap=function(a){this.sourceMap=a},c.prototype.isInline=function(){return this.options.sourceMapFileInline},c.prototype.getSourceMapURL=function(){return this.sourceMapURL},c.prototype.getOutputFilename=function(){return this.options.sourceMapOutputFilename},c.prototype.getInputFilename=function(){return this.sourceMapInputFilename},c}},{}],43:[function(a,b){b.exports=function(a){var b=function(b){this._css=[],this._rootNode=b.rootNode,this._contentsMap=b.contentsMap,this._contentsIgnoredCharsMap=b.contentsIgnoredCharsMap,b.sourceMapFilename&&(this._sourceMapFilename=b.sourceMapFilename.replace(/\\/g,"/")),this._outputFilename=b.outputFilename,this.sourceMapURL=b.sourceMapURL,b.sourceMapBasepath&&(this._sourceMapBasepath=b.sourceMapBasepath.replace(/\\/g,"/")),b.sourceMapRootpath?(this._sourceMapRootpath=b.sourceMapRootpath.replace(/\\/g,"/"),"/"!==this._sourceMapRootpath.charAt(this._sourceMapRootpath.length-1)&&(this._sourceMapRootpath+="/")):this._sourceMapRootpath="",this._outputSourceFiles=b.outputSourceFiles,this._sourceMapGeneratorConstructor=a.getSourceMapGenerator(),this._lineNumber=0,this._column=0};return b.prototype.normalizeFilename=function(a){return a=a.replace(/\\/g,"/"),this._sourceMapBasepath&&0===a.indexOf(this._sourceMapBasepath)&&(a=a.substring(this._sourceMapBasepath.length),("\\"===a.charAt(0)||"/"===a.charAt(0))&&(a=a.substring(1))),(this._sourceMapRootpath||"")+a},b.prototype.add=function(a,b,c,d){if(a){var e,f,g,h,i;if(b){var j=this._contentsMap[b.filename];this._contentsIgnoredCharsMap[b.filename]&&(c-=this._contentsIgnoredCharsMap[b.filename],0>c&&(c=0),j=j.slice(this._contentsIgnoredCharsMap[b.filename])),j=j.substring(0,c),f=j.split("\n"),h=f[f.length-1]}if(e=a.split("\n"),g=e[e.length-1],b)if(d)for(i=0;e.length>i;i++)this._sourceMapGenerator.addMapping({generated:{line:this._lineNumber+i+1,column:0===i?this._column:0},original:{line:f.length+i,column:0===i?h.length:0},source:this.normalizeFilename(b.filename)});else this._sourceMapGenerator.addMapping({generated:{line:this._lineNumber+1,column:this._column},original:{line:f.length,column:h.length},source:this.normalizeFilename(b.filename)});1===e.length?this._column+=g.length:(this._lineNumber+=e.length-1,this._column=g.length),this._css.push(a)}},b.prototype.isEmpty=function(){return 0===this._css.length},b.prototype.toCSS=function(a){if(this._sourceMapGenerator=new this._sourceMapGeneratorConstructor({file:this._outputFilename,sourceRoot:null}),this._outputSourceFiles)for(var b in this._contentsMap)if(this._contentsMap.hasOwnProperty(b)){var c=this._contentsMap[b];this._contentsIgnoredCharsMap[b]&&(c=c.slice(this._contentsIgnoredCharsMap[b])),this._sourceMapGenerator.setSourceContent(this.normalizeFilename(b),c)}if(this._rootNode.genCSS(a,this),this._css.length>0){var d,e=JSON.stringify(this._sourceMapGenerator.toJSON());this.sourceMapURL?d=this.sourceMapURL:this._sourceMapFilename&&(d=this._sourceMapFilename),this.sourceMapURL=d,this.sourceMap=e}return this._css.join("")},b}},{}],44:[function(a,b){var c=a("./contexts"),d=a("./visitors"),e=a("./tree");b.exports=function(a,b){b=b||{};var f,g=b.variables,h=new c.Eval(b);"object"!=typeof g||Array.isArray(g)||(g=Object.keys(g).map(function(a){var b=g[a];return b instanceof e.Value||(b instanceof e.Expression||(b=new e.Expression([b])),b=new e.Value([b])),new e.Rule("@"+a,b,!1,null,0)}),h.frames=[new e.Ruleset(null,g)]);var i,j=[],k=[new d.JoinSelectorVisitor,new d.MarkVisibleSelectorsVisitor(!0),new d.ExtendVisitor,new d.ToCSSVisitor({compress:Boolean(b.compress)})];if(b.pluginManager){var l=b.pluginManager.getVisitors();for(i=0;l.length>i;i++){var m=l[i];m.isPreEvalVisitor?j.push(m):m.isPreVisitor?k.splice(0,0,m):k.push(m)}}for(i=0;j.length>i;i++)j[i].run(a);for(f=a.eval(h),i=0;k.length>i;i++)k[i].run(f);return f}},{"./contexts":11,"./tree":62,"./visitors":87}],45:[function(a,b){var c=a("./node"),d=function(a){this.value=a};d.prototype=new c,d.prototype.type="Alpha",d.prototype.accept=function(a){this.value=a.visit(this.value)},d.prototype.eval=function(a){return this.value.eval?new d(this.value.eval(a)):this},d.prototype.genCSS=function(a,b){b.add("alpha(opacity="),this.value.genCSS?this.value.genCSS(a,b):b.add(this.value),b.add(")")},b.exports=d},{"./node":70}],46:[function(a,b){var c=a("./node"),d=function(a,b,c,d,e,f){this.value=a,this.index=b,this.mapLines=d,this.currentFileInfo=c,this.rulesetLike="undefined"==typeof e?!1:e,this.copyVisibilityInfo(f)};d.prototype=new c,d.prototype.type="Anonymous",d.prototype.eval=function(){return new d(this.value,this.index,this.currentFileInfo,this.mapLines,this.rulesetLike,this.visibilityInfo())},d.prototype.compare=function(a){return a.toCSS&&this.toCSS()===a.toCSS()?0:void 0},d.prototype.isRulesetLike=function(){return this.rulesetLike},d.prototype.genCSS=function(a,b){b.add(this.value,this.currentFileInfo,this.index,this.mapLines)},b.exports=d},{"./node":70}],47:[function(a,b){var c=a("./node"),d=function(a,b){this.key=a,this.value=b};d.prototype=new c,d.prototype.type="Assignment",d.prototype.accept=function(a){this.value=a.visit(this.value)},d.prototype.eval=function(a){return this.value.eval?new d(this.key,this.value.eval(a)):this},d.prototype.genCSS=function(a,b){b.add(this.key+"="),this.value.genCSS?this.value.genCSS(a,b):b.add(this.value)},b.exports=d},{"./node":70}],48:[function(a,b){var c=a("./node"),d=function(a,b,c){this.key=a,this.op=b,this.value=c};d.prototype=new c,d.prototype.type="Attribute",d.prototype.eval=function(a){return new d(this.key.eval?this.key.eval(a):this.key,this.op,this.value&&this.value.eval?this.value.eval(a):this.value)},d.prototype.genCSS=function(a,b){b.add(this.toCSS(a))},d.prototype.toCSS=function(a){var b=this.key.toCSS?this.key.toCSS(a):this.key;return this.op&&(b+=this.op,b+=this.value.toCSS?this.value.toCSS(a):this.value),"["+b+"]"},b.exports=d},{"./node":70}],49:[function(a,b){var c=a("./node"),d=a("../functions/function-caller"),e=function(a,b,c,d){this.name=a,this.args=b,this.index=c,this.currentFileInfo=d};e.prototype=new c,e.prototype.type="Call",e.prototype.accept=function(a){this.args&&(this.args=a.visitArray(this.args))},e.prototype.eval=function(a){var b,c=this.args.map(function(b){return b.eval(a)}),f=new d(this.name,a,this.index,this.currentFileInfo);if(f.isValid())try{if(b=f.call(c),null!=b)return b}catch(g){throw{type:g.type||"Runtime",message:"error evaluating function `"+this.name+"`"+(g.message?": "+g.message:""),index:this.index,filename:this.currentFileInfo.filename}}return new e(this.name,c,this.index,this.currentFileInfo)},e.prototype.genCSS=function(a,b){b.add(this.name+"(",this.currentFileInfo,this.index);for(var c=0;this.args.length>c;c++)this.args[c].genCSS(a,b),this.args.length>c+1&&b.add(", ");b.add(")")},b.exports=e},{"../functions/function-caller":21,"./node":70}],50:[function(a,b){function c(a,b){return Math.min(Math.max(a,0),b)}function d(a){return"#"+a.map(function(a){return a=c(Math.round(a),255),(16>a?"0":"")+a.toString(16)}).join("")}var e=a("./node"),f=a("../data/colors"),g=function(a,b,c){this.rgb=Array.isArray(a)?a:6==a.length?a.match(/.{2}/g).map(function(a){return parseInt(a,16)}):a.split("").map(function(a){return parseInt(a+a,16)}),this.alpha="number"==typeof b?b:1,"undefined"!=typeof c&&(this.value=c)};g.prototype=new e,g.prototype.type="Color",g.prototype.luma=function(){var a=this.rgb[0]/255,b=this.rgb[1]/255,c=this.rgb[2]/255;return a=.03928>=a?a/12.92:Math.pow((a+.055)/1.055,2.4),b=.03928>=b?b/12.92:Math.pow((b+.055)/1.055,2.4),c=.03928>=c?c/12.92:Math.pow((c+.055)/1.055,2.4),.2126*a+.7152*b+.0722*c},g.prototype.genCSS=function(a,b){b.add(this.toCSS(a))},g.prototype.toCSS=function(a,b){var d,e,f=a&&a.compress&&!b;if(this.value)return this.value;if(e=this.fround(a,this.alpha),1>e)return"rgba("+this.rgb.map(function(a){return c(Math.round(a),255)}).concat(c(e,1)).join(","+(f?"":" "))+")";if(d=this.toRGB(),f){var g=d.split("");g[1]===g[2]&&g[3]===g[4]&&g[5]===g[6]&&(d="#"+g[1]+g[3]+g[5])}return d},g.prototype.operate=function(a,b,c){for(var d=[],e=this.alpha*(1-c.alpha)+c.alpha,f=0;3>f;f++)d[f]=this._operate(a,b,this.rgb[f],c.rgb[f]);return new g(d,e)},g.prototype.toRGB=function(){return d(this.rgb)},g.prototype.toHSL=function(){var a,b,c=this.rgb[0]/255,d=this.rgb[1]/255,e=this.rgb[2]/255,f=this.alpha,g=Math.max(c,d,e),h=Math.min(c,d,e),i=(g+h)/2,j=g-h;if(g===h)a=b=0;else{switch(b=i>.5?j/(2-g-h):j/(g+h),g){case c:a=(d-e)/j+(e>d?6:0);break;case d:a=(e-c)/j+2;break;case e:a=(c-d)/j+4}a/=6}return{h:360*a,s:b,l:i,a:f}},g.prototype.toHSV=function(){var a,b,c=this.rgb[0]/255,d=this.rgb[1]/255,e=this.rgb[2]/255,f=this.alpha,g=Math.max(c,d,e),h=Math.min(c,d,e),i=g,j=g-h;if(b=0===g?0:j/g,g===h)a=0;else{switch(g){case c:a=(d-e)/j+(e>d?6:0);break;case d:a=(e-c)/j+2;break;case e:a=(c-d)/j+4}a/=6}return{h:360*a,s:b,v:i,a:f}},g.prototype.toARGB=function(){return d([255*this.alpha].concat(this.rgb))},g.prototype.compare=function(a){return a.rgb&&a.rgb[0]===this.rgb[0]&&a.rgb[1]===this.rgb[1]&&a.rgb[2]===this.rgb[2]&&a.alpha===this.alpha?0:void 0},g.fromKeyword=function(a){var b,c=a.toLowerCase();return f.hasOwnProperty(c)?b=new g(f[c].slice(1)):"transparent"===c&&(b=new g([0,0,0],0)),b?(b.value=a,b):void 0},b.exports=g},{"../data/colors":12,"./node":70}],51:[function(a,b){var c=a("./node"),d=function(a){" "===a?(this.value=" ",this.emptyOrWhitespace=!0):(this.value=a?a.trim():"",this.emptyOrWhitespace=""===this.value)};d.prototype=new c,d.prototype.type="Combinator";var e={"":!0," ":!0,"|":!0};d.prototype.genCSS=function(a,b){var c=a.compress||e[this.value]?"":" ";b.add(c+this.value+c)},b.exports=d},{"./node":70}],52:[function(a,b){var c=a("./node"),d=a("./debug-info"),e=function(a,b,c,d){this.value=a,this.isLineComment=b,this.currentFileInfo=d};e.prototype=new c,e.prototype.type="Comment",e.prototype.genCSS=function(a,b){this.debugInfo&&b.add(d(a,this),this.currentFileInfo,this.index),b.add(this.value)},e.prototype.isSilent=function(a){var b=a.compress&&"!"!==this.value[2];return this.isLineComment||b},b.exports=e},{"./debug-info":54,"./node":70}],53:[function(a,b){var c=a("./node"),d=function(a,b,c,d,e){this.op=a.trim(),this.lvalue=b,this.rvalue=c,this.index=d,this.negate=e};d.prototype=new c,d.prototype.type="Condition",d.prototype.accept=function(a){this.lvalue=a.visit(this.lvalue),this.rvalue=a.visit(this.rvalue)},d.prototype.eval=function(a){var b=function(a,b,d){switch(a){case"and":return b&&d;case"or":return b||d;default:switch(c.compare(b,d)){case-1:return"<"===a||"=<"===a||"<="===a;case 0:return"="===a||">="===a||"=<"===a||"<="===a;case 1:return">"===a||">="===a;default:return!1}}}(this.op,this.lvalue.eval(a),this.rvalue.eval(a));return this.negate?!b:b},b.exports=d},{"./node":70}],54:[function(a,b){var c=function(a,b,d){var e="";if(a.dumpLineNumbers&&!a.compress)switch(a.dumpLineNumbers){case"comments":e=c.asComment(b);break;case"mediaquery":e=c.asMediaQuery(b);break;case"all":e=c.asComment(b)+(d||"")+c.asMediaQuery(b)}return e};c.asComment=function(a){return"/* line "+a.debugInfo.lineNumber+", "+a.debugInfo.fileName+" */\n"},c.asMediaQuery=function(a){var b=a.debugInfo.fileName;return/^[a-z]+:\/\//i.test(b)||(b="file://"+b),"@media -sass-debug-info{filename{font-family:"+b.replace(/([.:\/\\])/g,function(a){return"\\"==a&&(a="/"),"\\"+a})+"}line{font-family:\\00003"+a.debugInfo.lineNumber+"}}\n"},b.exports=c},{}],55:[function(a,b){var c=a("./node"),d=a("../contexts"),e=function(a,b){this.ruleset=a,this.frames=b};e.prototype=new c,e.prototype.type="DetachedRuleset",e.prototype.evalFirst=!0,e.prototype.accept=function(a){this.ruleset=a.visit(this.ruleset)},e.prototype.eval=function(a){var b=this.frames||a.frames.slice(0);return new e(this.ruleset,b)},e.prototype.callEval=function(a){return this.ruleset.eval(this.frames?new d.Eval(a,this.frames.concat(a.frames)):a)},b.exports=e},{"../contexts":11,"./node":70}],56:[function(a,b){var c=a("./node"),d=a("../data/unit-conversions"),e=a("./unit"),f=a("./color"),g=function(a,b){this.value=parseFloat(a),this.unit=b&&b instanceof e?b:new e(b?[b]:void 0)};g.prototype=new c,g.prototype.type="Dimension",g.prototype.accept=function(a){this.unit=a.visit(this.unit)},g.prototype.eval=function(){return this},g.prototype.toColor=function(){return new f([this.value,this.value,this.value])},g.prototype.genCSS=function(a,b){if(a&&a.strictUnits&&!this.unit.isSingular())throw new Error("Multiple units in dimension. Correct the units or use the unit function. Bad unit: "+this.unit.toString());var c=this.fround(a,this.value),d=String(c);if(0!==c&&1e-6>c&&c>-1e-6&&(d=c.toFixed(20).replace(/0+$/,"")),a&&a.compress){if(0===c&&this.unit.isLength())return void b.add(d);c>0&&1>c&&(d=d.substr(1))}b.add(d),this.unit.genCSS(a,b)},g.prototype.operate=function(a,b,c){var d=this._operate(a,b,this.value,c.value),e=this.unit.clone();if("+"===b||"-"===b)if(0===e.numerator.length&&0===e.denominator.length)e=c.unit.clone(),this.unit.backupUnit&&(e.backupUnit=this.unit.backupUnit);else if(0===c.unit.numerator.length&&0===e.denominator.length);else{if(c=c.convertTo(this.unit.usedUnits()),a.strictUnits&&c.unit.toString()!==e.toString())throw new Error("Incompatible units. Change the units or use the unit function. Bad units: '"+e.toString()+"' and '"+c.unit.toString()+"'.");d=this._operate(a,b,this.value,c.value)}else"*"===b?(e.numerator=e.numerator.concat(c.unit.numerator).sort(),e.denominator=e.denominator.concat(c.unit.denominator).sort(),e.cancel()):"/"===b&&(e.numerator=e.numerator.concat(c.unit.denominator).sort(),e.denominator=e.denominator.concat(c.unit.numerator).sort(),e.cancel());return new g(d,e)},g.prototype.compare=function(a){var b,d;if(!(a instanceof g))return void 0;if(this.unit.isEmpty()||a.unit.isEmpty())b=this,d=a;else if(b=this.unify(),d=a.unify(),0!==b.unit.compare(d.unit))return void 0;return c.numericCompare(b.value,d.value)},g.prototype.unify=function(){return this.convertTo({length:"px",duration:"s",angle:"rad"})},g.prototype.convertTo=function(a){var b,c,e,f,h,i=this.value,j=this.unit.clone(),k={};if("string"==typeof a){for(b in d)d[b].hasOwnProperty(a)&&(k={},k[b]=a);a=k}h=function(a,b){return e.hasOwnProperty(a)?(b?i/=e[a]/e[f]:i*=e[a]/e[f],f):a};for(c in a)a.hasOwnProperty(c)&&(f=a[c],e=d[c],j.map(h));return j.cancel(),new g(i,j)},b.exports=g},{"../data/unit-conversions":14,"./color":50,"./node":70,"./unit":79}],57:[function(a,b){var c=a("./node"),d=a("./selector"),e=a("./ruleset"),f=function(a,b,c,e,f,g,h,i){var j;if(this.name=a,this.value=b,c)for(Array.isArray(c)?this.rules=c:(this.rules=[c],this.rules[0].selectors=new d([],null,null,this.index,f).createEmptySelectors()),j=0;this.rules.length>j;j++)this.rules[j].allowImports=!0;this.index=e,this.currentFileInfo=f,this.debugInfo=g,this.isRooted=h||!1,this.copyVisibilityInfo(i)};f.prototype=new c,f.prototype.type="Directive",f.prototype.accept=function(a){var b=this.value,c=this.rules;c&&(this.rules=a.visitArray(c)),b&&(this.value=a.visit(b))},f.prototype.isRulesetLike=function(){return this.rules||!this.isCharset()},f.prototype.isCharset=function(){return"@charset"===this.name},f.prototype.genCSS=function(a,b){var c=this.value,d=this.rules;b.add(this.name,this.currentFileInfo,this.index),c&&(b.add(" "),c.genCSS(a,b)),d?this.outputRuleset(a,b,d):b.add(";")},f.prototype.eval=function(a){var b,c,d=this.value,e=this.rules;return b=a.mediaPath,c=a.mediaBlocks,a.mediaPath=[],a.mediaBlocks=[],d&&(d=d.eval(a)),e&&(e=[e[0].eval(a)],e[0].root=!0),a.mediaPath=b,a.mediaBlocks=c,new f(this.name,d,e,this.index,this.currentFileInfo,this.debugInfo,this.isRooted,this.visibilityInfo())},f.prototype.variable=function(a){return this.rules?e.prototype.variable.call(this.rules[0],a):void 0},f.prototype.find=function(){return this.rules?e.prototype.find.apply(this.rules[0],arguments):void 0},f.prototype.rulesets=function(){return this.rules?e.prototype.rulesets.apply(this.rules[0]):void 0},f.prototype.outputRuleset=function(a,b,c){var d,e=c.length;if(a.tabLevel=(0|a.tabLevel)+1,a.compress){for(b.add("{"),d=0;e>d;d++)c[d].genCSS(a,b);return b.add("}"),void a.tabLevel--}var f="\n"+Array(a.tabLevel).join(" "),g=f+" ";if(e){for(b.add(" {"+g),c[0].genCSS(a,b),d=1;e>d;d++)b.add(g),c[d].genCSS(a,b);b.add(f+"}")}else b.add(" {"+f+"}");a.tabLevel--},b.exports=f},{"./node":70,"./ruleset":76,"./selector":77}],58:[function(a,b){var c=a("./node"),d=a("./paren"),e=a("./combinator"),f=function(a,b,c,d,f){this.combinator=a instanceof e?a:new e(a),this.value="string"==typeof b?b.trim():b?b:"",this.index=c,this.currentFileInfo=d,this.copyVisibilityInfo(f)};f.prototype=new c,f.prototype.type="Element",f.prototype.accept=function(a){var b=this.value;this.combinator=a.visit(this.combinator),"object"==typeof b&&(this.value=a.visit(b))},f.prototype.eval=function(a){return new f(this.combinator,this.value.eval?this.value.eval(a):this.value,this.index,this.currentFileInfo,this.visibilityInfo())},f.prototype.clone=function(){return new f(this.combinator,this.value,this.index,this.currentFileInfo,this.visibilityInfo())},f.prototype.genCSS=function(a,b){b.add(this.toCSS(a),this.currentFileInfo,this.index)},f.prototype.toCSS=function(a){a=a||{};var b=this.value,c=a.firstSelector;return b instanceof d&&(a.firstSelector=!0),b=b.toCSS?b.toCSS(a):b,a.firstSelector=c,""===b&&"&"===this.combinator.value.charAt(0)?"":this.combinator.toCSS(a)+b},b.exports=f},{"./combinator":51,"./node":70,"./paren":72}],59:[function(a,b){var c=a("./node"),d=a("./paren"),e=a("./comment"),f=function(a){if(this.value=a,!a)throw new Error("Expression requires an array parameter")};f.prototype=new c,f.prototype.type="Expression",f.prototype.accept=function(a){this.value=a.visitArray(this.value)},f.prototype.eval=function(a){var b,c=this.parens&&!this.parensInOp,e=!1;return c&&a.inParenthesis(),this.value.length>1?b=new f(this.value.map(function(b){return b.eval(a)})):1===this.value.length?(this.value[0].parens&&!this.value[0].parensInOp&&(e=!0),b=this.value[0].eval(a)):b=this,c&&a.outOfParenthesis(),this.parens&&this.parensInOp&&!a.isMathOn()&&!e&&(b=new d(b)),b},f.prototype.genCSS=function(a,b){for(var c=0;this.value.length>c;c++)this.value[c].genCSS(a,b),this.value.length>c+1&&b.add(" ")},f.prototype.throwAwayComments=function(){this.value=this.value.filter(function(a){return!(a instanceof e)})},b.exports=f},{"./comment":52,"./node":70,"./paren":72}],60:[function(a,b){var c=a("./node"),d=a("./selector"),e=function f(a,b,c,d,e){switch(this.selector=a,this.option=b,this.index=c,this.object_id=f.next_id++,this.parent_ids=[this.object_id],this.currentFileInfo=d||{},this.copyVisibilityInfo(e),b){case"all":this.allowBefore=!0,this.allowAfter=!0;break;default:this.allowBefore=!1,this.allowAfter=!1}};e.next_id=0,e.prototype=new c,e.prototype.type="Extend",e.prototype.accept=function(a){this.selector=a.visit(this.selector)},e.prototype.eval=function(a){return new e(this.selector.eval(a),this.option,this.index,this.currentFileInfo,this.visibilityInfo())},e.prototype.clone=function(){return new e(this.selector,this.option,this.index,this.currentFileInfo,this.visibilityInfo())},e.prototype.findSelfSelectors=function(a){var b,c,e=[];for(b=0;a.length>b;b++)c=a[b].elements,b>0&&c.length&&""===c[0].combinator.value&&(c[0].combinator.value=" "),e=e.concat(a[b].elements);this.selfSelectors=[new d(e)],this.selfSelectors[0].copyVisibilityInfo(this.visibilityInfo())},b.exports=e},{"./node":70,"./selector":77}],61:[function(a,b){var c=a("./node"),d=a("./media"),e=a("./url"),f=a("./quoted"),g=a("./ruleset"),h=a("./anonymous"),i=function(a,b,c,d,e,f){if(this.options=c,this.index=d,this.path=a,this.features=b,this.currentFileInfo=e,void 0!==this.options.less||this.options.inline)this.css=!this.options.less||this.options.inline;else{var g=this.getPath();g&&/[#\.\&\?\/]css([\?;].*)?$/.test(g)&&(this.css=!0)}this.copyVisibilityInfo(f)};i.prototype=new c,i.prototype.type="Import",i.prototype.accept=function(a){this.features&&(this.features=a.visit(this.features)),this.path=a.visit(this.path),this.options.plugin||this.options.inline||!this.root||(this.root=a.visit(this.root))},i.prototype.genCSS=function(a,b){this.css&&void 0===this.path.currentFileInfo.reference&&(b.add("@import ",this.currentFileInfo,this.index),this.path.genCSS(a,b),this.features&&(b.add(" "),this.features.genCSS(a,b)),b.add(";"))},i.prototype.getPath=function(){return this.path instanceof e?this.path.value.value:this.path.value},i.prototype.isVariableImport=function(){var a=this.path;return a instanceof e&&(a=a.value),a instanceof f?a.containsVariables():!0},i.prototype.evalForImport=function(a){var b=this.path;return b instanceof e&&(b=b.value),new i(b.eval(a),this.features,this.options,this.index,this.currentFileInfo,this.visibilityInfo())},i.prototype.evalPath=function(a){var b=this.path.eval(a),c=this.currentFileInfo&&this.currentFileInfo.rootpath;if(!(b instanceof e)){if(c){var d=b.value;d&&a.isPathRelative(d)&&(b.value=c+d)}b.value=a.normalizePath(b.value)}return b},i.prototype.eval=function(a){var b=this.doEval(a);return(this.options.reference||this.blocksVisibility())&&(b.length||0===b.length?b.forEach(function(a){a.addVisibilityBlock()}):b.addVisibilityBlock()),b},i.prototype.doEval=function(a){var b,c,e=this.features&&this.features.eval(a);if(this.options.plugin)return c=a.frames[0]&&a.frames[0].functionRegistry,c&&this.root&&this.root.functions&&c.addMultiple(this.root.functions),[];if(this.skip&&("function"==typeof this.skip&&(this.skip=this.skip()),this.skip))return[];if(this.options.inline){var f=new h(this.root,0,{filename:this.importedFilename,reference:this.path.currentFileInfo&&this.path.currentFileInfo.reference},!0,!0);return this.features?new d([f],this.features.value):[f]}if(this.css){var j=new i(this.evalPath(a),e,this.options,this.index);if(!j.css&&this.error)throw this.error;return j}return b=new g(null,this.root.rules.slice(0)),b.evalImports(a),this.features?new d(b.rules,this.features.value):b.rules},b.exports=i},{"./anonymous":46,"./media":66,"./node":70,"./quoted":73,"./ruleset":76,"./url":80}],62:[function(a,b){var c={};c.Node=a("./node"),c.Alpha=a("./alpha"),c.Color=a("./color"),c.Directive=a("./directive"),c.DetachedRuleset=a("./detached-ruleset"),c.Operation=a("./operation"),c.Dimension=a("./dimension"),c.Unit=a("./unit"),c.Keyword=a("./keyword"),c.Variable=a("./variable"),c.Ruleset=a("./ruleset"),c.Element=a("./element"),c.Attribute=a("./attribute"),c.Combinator=a("./combinator"),c.Selector=a("./selector"),c.Quoted=a("./quoted"),c.Expression=a("./expression"),c.Rule=a("./rule"),c.Call=a("./call"),c.URL=a("./url"),c.Import=a("./import"),c.mixin={Call:a("./mixin-call"),Definition:a("./mixin-definition")},c.Comment=a("./comment"),c.Anonymous=a("./anonymous"),c.Value=a("./value"),c.JavaScript=a("./javascript"),c.Assignment=a("./assignment"),c.Condition=a("./condition"),c.Paren=a("./paren"),c.Media=a("./media"),c.UnicodeDescriptor=a("./unicode-descriptor"),c.Negative=a("./negative"),c.Extend=a("./extend"),c.RulesetCall=a("./ruleset-call"),b.exports=c},{"./alpha":45,"./anonymous":46,"./assignment":47,"./attribute":48,"./call":49,"./color":50,"./combinator":51,"./comment":52,"./condition":53,"./detached-ruleset":55,"./dimension":56,"./directive":57,"./element":58,"./expression":59,"./extend":60,"./import":61,"./javascript":63,"./keyword":65,"./media":66,"./mixin-call":67,"./mixin-definition":68,"./negative":69,"./node":70,"./operation":71,"./paren":72,"./quoted":73,"./rule":74,"./ruleset":76,"./ruleset-call":75,"./selector":77,"./unicode-descriptor":78,"./unit":79,"./url":80,"./value":81,"./variable":82}],63:[function(a,b){var c=a("./js-eval-node"),d=a("./dimension"),e=a("./quoted"),f=a("./anonymous"),g=function(a,b,c,d){this.escaped=b,this.expression=a,this.index=c,this.currentFileInfo=d};g.prototype=new c,g.prototype.type="JavaScript",g.prototype.eval=function(a){var b=this.evaluateJavaScript(this.expression,a);return"number"==typeof b?new d(b):"string"==typeof b?new e('"'+b+'"',b,this.escaped,this.index):new f(Array.isArray(b)?b.join(", "):b)},b.exports=g},{"./anonymous":46,"./dimension":56,"./js-eval-node":64,"./quoted":73}],64:[function(a,b){var c=a("./node"),d=a("./variable"),e=function(){};e.prototype=new c,e.prototype.evaluateJavaScript=function(a,b){var c,e=this,f={};if(void 0!==b.javascriptEnabled&&!b.javascriptEnabled)throw{message:"You are using JavaScript, which has been disabled.",filename:this.currentFileInfo.filename,index:this.index};a=a.replace(/@\{([\w-]+)\}/g,function(a,c){return e.jsify(new d("@"+c,e.index,e.currentFileInfo).eval(b))});try{a=new Function("return ("+a+")")}catch(g){throw{message:"JavaScript evaluation error: "+g.message+" from `"+a+"`",filename:this.currentFileInfo.filename,index:this.index}}var h=b.frames[0].variables();for(var i in h)h.hasOwnProperty(i)&&(f[i.slice(1)]={value:h[i].value,toJS:function(){return this.value.eval(b).toCSS()}});try{c=a.call(f)}catch(g){throw{message:"JavaScript evaluation error: '"+g.name+": "+g.message.replace(/["]/g,"'")+"'",filename:this.currentFileInfo.filename,index:this.index}}return c},e.prototype.jsify=function(a){return Array.isArray(a.value)&&a.value.length>1?"["+a.value.map(function(a){return a.toCSS()}).join(", ")+"]":a.toCSS()},b.exports=e},{"./node":70,"./variable":82}],65:[function(a,b){var c=a("./node"),d=function(a){this.value=a};d.prototype=new c,d.prototype.type="Keyword",d.prototype.genCSS=function(a,b){if("%"===this.value)throw{type:"Syntax",message:"Invalid % without number"};b.add(this.value)},d.True=new d("true"),d.False=new d("false"),b.exports=d},{"./node":70}],66:[function(a,b){var c=a("./ruleset"),d=a("./value"),e=a("./selector"),f=a("./anonymous"),g=a("./expression"),h=a("./directive"),i=function(a,b,f,g,h){this.index=f,this.currentFileInfo=g;var i=new e([],null,null,this.index,this.currentFileInfo).createEmptySelectors();this.features=new d(b),this.rules=[new c(i,a)],this.rules[0].allowImports=!0,this.copyVisibilityInfo(h)};i.prototype=new h,i.prototype.type="Media",i.prototype.isRulesetLike=!0,i.prototype.accept=function(a){this.features&&(this.features=a.visit(this.features)),this.rules&&(this.rules=a.visitArray(this.rules))},i.prototype.genCSS=function(a,b){b.add("@media ",this.currentFileInfo,this.index),this.features.genCSS(a,b),this.outputRuleset(a,b,this.rules)},i.prototype.eval=function(a){a.mediaBlocks||(a.mediaBlocks=[],a.mediaPath=[]);var b=new i(null,[],this.index,this.currentFileInfo,this.visibilityInfo());this.debugInfo&&(this.rules[0].debugInfo=this.debugInfo,b.debugInfo=this.debugInfo);var c=!1;a.strictMath||(c=!0,a.strictMath=!0);try{b.features=this.features.eval(a)}finally{c&&(a.strictMath=!1)}return a.mediaPath.push(b),a.mediaBlocks.push(b),this.rules[0].functionRegistry=a.frames[0].functionRegistry.inherit(),a.frames.unshift(this.rules[0]),b.rules=[this.rules[0].eval(a)],a.frames.shift(),a.mediaPath.pop(),0===a.mediaPath.length?b.evalTop(a):b.evalNested(a)},i.prototype.evalTop=function(a){var b=this;if(a.mediaBlocks.length>1){var d=new e([],null,null,this.index,this.currentFileInfo).createEmptySelectors();b=new c(d,a.mediaBlocks),b.multiMedia=!0,b.copyVisibilityInfo(this.visibilityInfo())}return delete a.mediaBlocks,delete a.mediaPath,b},i.prototype.evalNested=function(a){var b,e,h=a.mediaPath.concat([this]);for(b=0;h.length>b;b++)e=h[b].features instanceof d?h[b].features.value:h[b].features,h[b]=Array.isArray(e)?e:[e];return this.features=new d(this.permute(h).map(function(a){for(a=a.map(function(a){return a.toCSS?a:new f(a)}),b=a.length-1;b>0;b--)a.splice(b,0,new f("and"));return new g(a)})),new c([],[])},i.prototype.permute=function(a){if(0===a.length)return[];if(1===a.length)return a[0];for(var b=[],c=this.permute(a.slice(1)),d=0;c.length>d;d++)for(var e=0;a[0].length>e;e++)b.push([a[0][e]].concat(c[d]));return b},i.prototype.bubbleSelectors=function(a){a&&(this.rules=[new c(a.slice(0),[this.rules[0]])])},b.exports=i},{"./anonymous":46,"./directive":57,"./expression":59,"./ruleset":76,"./selector":77,"./value":81}],67:[function(a,b){var c=a("./node"),d=a("./selector"),e=a("./mixin-definition"),f=a("../functions/default"),g=function(a,b,c,e,f){this.selector=new d(a),this.arguments=b||[],this.index=c,this.currentFileInfo=e,this.important=f};g.prototype=new c,g.prototype.type="MixinCall",g.prototype.accept=function(a){this.selector&&(this.selector=a.visit(this.selector)),this.arguments.length&&(this.arguments=a.visitArray(this.arguments))},g.prototype.eval=function(a){function b(b,c){var d,e,g;for(d=0;2>d;d++){for(x[d]=!0,f.value(d),e=0;c.length>e&&x[d];e++)g=c[e],g.matchCondition&&(x[d]=x[d]&&g.matchCondition(null,a));b.matchCondition&&(x[d]=x[d]&&b.matchCondition(t,a))}return x[0]||x[1]?x[0]!=x[1]?x[1]?A:B:z:y}var c,d,g,h,i,j,k,l,m,n,o,p,q,r,s,t=[],u=[],v=!1,w=[],x=[],y=-1,z=0,A=1,B=2;for(j=0;this.arguments.length>j;j++)if(h=this.arguments[j],i=h.value.eval(a),h.expand&&Array.isArray(i.value))for(i=i.value,k=0;i.length>k;k++)t.push({value:i[k]});else t.push({name:h.name,value:i});for(s=function(b){return b.matchArgs(null,a)},j=0;a.frames.length>j;j++)if((c=a.frames[j].find(this.selector,null,s)).length>0){for(n=!0,k=0;c.length>k;k++){for(d=c[k].rule,g=c[k].path,m=!1,l=0;a.frames.length>l;l++)if(!(d instanceof e)&&d===(a.frames[l].originalRuleset||a.frames[l])){m=!0;break}m||d.matchArgs(t,a)&&(o={mixin:d,group:b(d,g)},o.group!==y&&w.push(o),v=!0)}for(f.reset(),q=[0,0,0],k=0;w.length>k;k++)q[w[k].group]++;if(q[z]>0)p=B;else if(p=A,q[A]+q[B]>1)throw{type:"Runtime",message:"Ambiguous use of `default()` found when matching for `"+this.format(t)+"`",index:this.index,filename:this.currentFileInfo.filename};for(k=0;w.length>k;k++)if(o=w[k].group,o===z||o===p)try{d=w[k].mixin,d instanceof e||(r=d.originalRuleset||d,d=new e("",[],d.rules,null,!1,null,r.visibilityInfo()),d.originalRuleset=r);var C=d.evalCall(a,t,this.important).rules;this._setVisibilityToReplacement(C),Array.prototype.push.apply(u,C)}catch(D){throw{message:D.message,index:this.index,filename:this.currentFileInfo.filename,stack:D.stack}}if(v)return u}throw n?{type:"Runtime",message:"No matching definition was found for `"+this.format(t)+"`",index:this.index,filename:this.currentFileInfo.filename}:{type:"Name",message:this.selector.toCSS().trim()+" is undefined",index:this.index,filename:this.currentFileInfo.filename}},g.prototype._setVisibilityToReplacement=function(a){var b,c;if(this.blocksVisibility())for(b=0;a.length>b;b++)c=a[b],c.addVisibilityBlock()},g.prototype.format=function(a){return this.selector.toCSS().trim()+"("+(a?a.map(function(a){var b="";return a.name&&(b+=a.name+":"),b+=a.value.toCSS?a.value.toCSS():"???"; + +}).join(", "):"")+")"},b.exports=g},{"../functions/default":20,"./mixin-definition":68,"./node":70,"./selector":77}],68:[function(a,b){var c=a("./selector"),d=a("./element"),e=a("./ruleset"),f=a("./rule"),g=a("./expression"),h=a("../contexts"),i=function(a,b,e,f,g,h,i){this.name=a,this.selectors=[new c([new d(null,a,this.index,this.currentFileInfo)])],this.params=b,this.condition=f,this.variadic=g,this.arity=b.length,this.rules=e,this._lookups={};var j=[];this.required=b.reduce(function(a,b){return!b.name||b.name&&!b.value?a+1:(j.push(b.name),a)},0),this.optionalParameters=j,this.frames=h,this.copyVisibilityInfo(i)};i.prototype=new e,i.prototype.type="MixinDefinition",i.prototype.evalFirst=!0,i.prototype.accept=function(a){this.params&&this.params.length&&(this.params=a.visitArray(this.params)),this.rules=a.visitArray(this.rules),this.condition&&(this.condition=a.visit(this.condition))},i.prototype.evalParams=function(a,b,c,d){var i,j,k,l,m,n,o,p,q=new e(null,null),r=this.params.slice(0),s=0;if(b.frames&&b.frames[0]&&b.frames[0].functionRegistry&&(q.functionRegistry=b.frames[0].functionRegistry.inherit()),b=new h.Eval(b,[q].concat(b.frames)),c)for(c=c.slice(0),s=c.length,k=0;s>k;k++)if(j=c[k],n=j&&j.name){for(o=!1,l=0;r.length>l;l++)if(!d[l]&&n===r[l].name){d[l]=j.value.eval(a),q.prependRule(new f(n,j.value.eval(a))),o=!0;break}if(o){c.splice(k,1),k--;continue}throw{type:"Runtime",message:"Named argument for "+this.name+" "+c[k].name+" not found"}}for(p=0,k=0;r.length>k;k++)if(!d[k]){if(j=c&&c[p],n=r[k].name)if(r[k].variadic){for(i=[],l=p;s>l;l++)i.push(c[l].value.eval(a));q.prependRule(new f(n,new g(i).eval(a)))}else{if(m=j&&j.value)m=m.eval(a);else{if(!r[k].value)throw{type:"Runtime",message:"wrong number of arguments for "+this.name+" ("+s+" for "+this.arity+")"};m=r[k].value.eval(b),q.resetCache()}q.prependRule(new f(n,m)),d[k]=m}if(r[k].variadic&&c)for(l=p;s>l;l++)d[l]=c[l].value.eval(a);p++}return q},i.prototype.makeImportant=function(){var a=this.rules?this.rules.map(function(a){return a.makeImportant?a.makeImportant(!0):a}):this.rules,b=new i(this.name,this.params,a,this.condition,this.variadic,this.frames);return b},i.prototype.eval=function(a){return new i(this.name,this.params,this.rules,this.condition,this.variadic,this.frames||a.frames.slice(0))},i.prototype.evalCall=function(a,b,c){var d,i,j=[],k=this.frames?this.frames.concat(a.frames):a.frames,l=this.evalParams(a,new h.Eval(a,k),b,j);return l.prependRule(new f("@arguments",new g(j).eval(a))),d=this.rules.slice(0),i=new e(null,d),i.originalRuleset=this,i=i.eval(new h.Eval(a,[this,l].concat(k))),c&&(i=i.makeImportant()),i},i.prototype.matchCondition=function(a,b){return this.condition&&!this.condition.eval(new h.Eval(b,[this.evalParams(b,new h.Eval(b,this.frames?this.frames.concat(b.frames):b.frames),a,[])].concat(this.frames||[]).concat(b.frames)))?!1:!0},i.prototype.matchArgs=function(a,b){var c,d=a&&a.length||0,e=this.optionalParameters,f=a?a.reduce(function(a,b){return e.indexOf(b.name)<0?a+1:a},0):0;if(this.variadic){if(this.required-1>f)return!1}else{if(this.required>f)return!1;if(d>this.params.length)return!1}c=Math.min(f,this.arity);for(var g=0;c>g;g++)if(!this.params[g].name&&!this.params[g].variadic&&a[g].value.eval(b).toCSS()!=this.params[g].value.eval(b).toCSS())return!1;return!0},b.exports=i},{"../contexts":11,"./element":58,"./expression":59,"./rule":74,"./ruleset":76,"./selector":77}],69:[function(a,b){var c=a("./node"),d=a("./operation"),e=a("./dimension"),f=function(a){this.value=a};f.prototype=new c,f.prototype.type="Negative",f.prototype.genCSS=function(a,b){b.add("-"),this.value.genCSS(a,b)},f.prototype.eval=function(a){return a.isMathOn()?new d("*",[new e(-1),this.value]).eval(a):new f(this.value.eval(a))},b.exports=f},{"./dimension":56,"./node":70,"./operation":71}],70:[function(a,b){var c=function(){};c.prototype.toCSS=function(a){var b=[];return this.genCSS(a,{add:function(a){b.push(a)},isEmpty:function(){return 0===b.length}}),b.join("")},c.prototype.genCSS=function(a,b){b.add(this.value)},c.prototype.accept=function(a){this.value=a.visit(this.value)},c.prototype.eval=function(){return this},c.prototype._operate=function(a,b,c,d){switch(b){case"+":return c+d;case"-":return c-d;case"*":return c*d;case"/":return c/d}},c.prototype.fround=function(a,b){var c=a&&a.numPrecision;return null==c?b:Number((b+2e-16).toFixed(c))},c.compare=function(a,b){if(a.compare&&"Quoted"!==b.type&&"Anonymous"!==b.type)return a.compare(b);if(b.compare)return-b.compare(a);if(a.type!==b.type)return void 0;if(a=a.value,b=b.value,!Array.isArray(a))return a===b?0:void 0;if(a.length!==b.length)return void 0;for(var d=0;a.length>d;d++)if(0!==c.compare(a[d],b[d]))return void 0;return 0},c.numericCompare=function(a,b){return b>a?-1:a===b?0:a>b?1:void 0},c.prototype.blocksVisibility=function(){return null==this.visibilityBlocks&&(this.visibilityBlocks=0),0!==this.visibilityBlocks},c.prototype.addVisibilityBlock=function(){null==this.visibilityBlocks&&(this.visibilityBlocks=0),this.visibilityBlocks=this.visibilityBlocks+1},c.prototype.removeVisibilityBlock=function(){null==this.visibilityBlocks&&(this.visibilityBlocks=0),this.visibilityBlocks=this.visibilityBlocks-1},c.prototype.ensureVisibility=function(){this.nodeVisible=!0},c.prototype.ensureInvisibility=function(){this.nodeVisible=!1},c.prototype.isVisible=function(){return this.nodeVisible},c.prototype.visibilityInfo=function(){return{visibilityBlocks:this.visibilityBlocks,nodeVisible:this.nodeVisible}},c.prototype.copyVisibilityInfo=function(a){a&&(this.visibilityBlocks=a.visibilityBlocks,this.nodeVisible=a.nodeVisible)},b.exports=c},{}],71:[function(a,b){var c=a("./node"),d=a("./color"),e=a("./dimension"),f=function(a,b,c){this.op=a.trim(),this.operands=b,this.isSpaced=c};f.prototype=new c,f.prototype.type="Operation",f.prototype.accept=function(a){this.operands=a.visit(this.operands)},f.prototype.eval=function(a){var b=this.operands[0].eval(a),c=this.operands[1].eval(a);if(a.isMathOn()){if(b instanceof e&&c instanceof d&&(b=b.toColor()),c instanceof e&&b instanceof d&&(c=c.toColor()),!b.operate)throw{type:"Operation",message:"Operation on an invalid type"};return b.operate(a,this.op,c)}return new f(this.op,[b,c],this.isSpaced)},f.prototype.genCSS=function(a,b){this.operands[0].genCSS(a,b),this.isSpaced&&b.add(" "),b.add(this.op),this.isSpaced&&b.add(" "),this.operands[1].genCSS(a,b)},b.exports=f},{"./color":50,"./dimension":56,"./node":70}],72:[function(a,b){var c=a("./node"),d=function(a){this.value=a};d.prototype=new c,d.prototype.type="Paren",d.prototype.genCSS=function(a,b){b.add("("),this.value.genCSS(a,b),b.add(")")},d.prototype.eval=function(a){return new d(this.value.eval(a))},b.exports=d},{"./node":70}],73:[function(a,b){var c=a("./node"),d=a("./js-eval-node"),e=a("./variable"),f=function(a,b,c,d,e){this.escaped=null==c?!0:c,this.value=b||"",this.quote=a.charAt(0),this.index=d,this.currentFileInfo=e};f.prototype=new d,f.prototype.type="Quoted",f.prototype.genCSS=function(a,b){this.escaped||b.add(this.quote,this.currentFileInfo,this.index),b.add(this.value),this.escaped||b.add(this.quote)},f.prototype.containsVariables=function(){return this.value.match(/(`([^`]+)`)|@\{([\w-]+)\}/)},f.prototype.eval=function(a){function b(a,b,c){var d=a;do a=d,d=a.replace(b,c);while(a!==d);return d}var c=this,d=this.value,g=function(b,d){return String(c.evaluateJavaScript(d,a))},h=function(b,d){var g=new e("@"+d,c.index,c.currentFileInfo).eval(a,!0);return g instanceof f?g.value:g.toCSS()};return d=b(d,/`([^`]+)`/g,g),d=b(d,/@\{([\w-]+)\}/g,h),new f(this.quote+d+this.quote,d,this.escaped,this.index,this.currentFileInfo)},f.prototype.compare=function(a){return"Quoted"!==a.type||this.escaped||a.escaped?a.toCSS&&this.toCSS()===a.toCSS()?0:void 0:c.numericCompare(this.value,a.value)},b.exports=f},{"./js-eval-node":64,"./node":70,"./variable":82}],74:[function(a,b){function c(a,b){var c,d="",e=b.length,f={add:function(a){d+=a}};for(c=0;e>c;c++)b[c].eval(a).genCSS(a,f);return d}var d=a("./node"),e=a("./value"),f=a("./keyword"),g=function(a,b,c,f,g,h,i,j){this.name=a,this.value=b instanceof d?b:new e([b]),this.important=c?" "+c.trim():"",this.merge=f,this.index=g,this.currentFileInfo=h,this.inline=i||!1,this.variable=void 0!==j?j:a.charAt&&"@"===a.charAt(0)};g.prototype=new d,g.prototype.type="Rule",g.prototype.genCSS=function(a,b){b.add(this.name+(a.compress?":":": "),this.currentFileInfo,this.index);try{this.value.genCSS(a,b)}catch(c){throw c.index=this.index,c.filename=this.currentFileInfo.filename,c}b.add(this.important+(this.inline||a.lastRule&&a.compress?"":";"),this.currentFileInfo,this.index)},g.prototype.eval=function(a){var b,d=!1,e=this.name,h=this.variable;"string"!=typeof e&&(e=1===e.length&&e[0]instanceof f?e[0].value:c(a,e),h=!1),"font"!==e||a.strictMath||(d=!0,a.strictMath=!0);try{if(a.importantScope.push({}),b=this.value.eval(a),!this.variable&&"DetachedRuleset"===b.type)throw{message:"Rulesets cannot be evaluated on a property.",index:this.index,filename:this.currentFileInfo.filename};var i=this.important,j=a.importantScope.pop();return!i&&j.important&&(i=j.important),new g(e,b,i,this.merge,this.index,this.currentFileInfo,this.inline,h)}catch(k){throw"number"!=typeof k.index&&(k.index=this.index,k.filename=this.currentFileInfo.filename),k}finally{d&&(a.strictMath=!1)}},g.prototype.makeImportant=function(){return new g(this.name,this.value,"!important",this.merge,this.index,this.currentFileInfo,this.inline)},b.exports=g},{"./keyword":65,"./node":70,"./value":81}],75:[function(a,b){var c=a("./node"),d=a("./variable"),e=function(a){this.variable=a};e.prototype=new c,e.prototype.type="RulesetCall",e.prototype.eval=function(a){var b=new d(this.variable).eval(a);return b.callEval(a)},b.exports=e},{"./node":70,"./variable":82}],76:[function(a,b){var c=a("./node"),d=a("./rule"),e=a("./selector"),f=a("./element"),g=a("./paren"),h=a("../contexts"),i=a("../functions/function-registry"),j=a("../functions/default"),k=a("./debug-info"),l=function(a,b,c,d){this.selectors=a,this.rules=b,this._lookups={},this.strictImports=c,this.copyVisibilityInfo(d)};l.prototype=new c,l.prototype.type="Ruleset",l.prototype.isRuleset=!0,l.prototype.isRulesetLike=!0,l.prototype.accept=function(a){this.paths?this.paths=a.visitArray(this.paths,!0):this.selectors&&(this.selectors=a.visitArray(this.selectors)),this.rules&&this.rules.length&&(this.rules=a.visitArray(this.rules))},l.prototype.eval=function(a){var b,c,e,f,g=this.selectors,h=!1;if(g&&(c=g.length)){for(b=[],j.error({type:"Syntax",message:"it is currently only allowed in parametric mixin guards,"}),f=0;c>f;f++)e=g[f].eval(a),b.push(e),e.evaldCondition&&(h=!0);j.reset()}else h=!0;var k,m,n=this.rules?this.rules.slice(0):null,o=new l(b,n,this.strictImports,this.visibilityInfo());o.originalRuleset=this,o.root=this.root,o.firstRoot=this.firstRoot,o.allowImports=this.allowImports,this.debugInfo&&(o.debugInfo=this.debugInfo),h||(n.length=0),o.functionRegistry=function(a){for(var b,c=0,d=a.length;c!==d;++c)if(b=a[c].functionRegistry)return b;return i}(a.frames).inherit();var p=a.frames;p.unshift(o);var q=a.selectors;q||(a.selectors=q=[]),q.unshift(this.selectors),(o.root||o.allowImports||!o.strictImports)&&o.evalImports(a);var r=o.rules,s=r?r.length:0;for(f=0;s>f;f++)r[f].evalFirst&&(r[f]=r[f].eval(a));var t=a.mediaBlocks&&a.mediaBlocks.length||0;for(f=0;s>f;f++)"MixinCall"===r[f].type?(n=r[f].eval(a).filter(function(a){return a instanceof d&&a.variable?!o.variable(a.name):!0}),r.splice.apply(r,[f,1].concat(n)),s+=n.length-1,f+=n.length-1,o.resetCache()):"RulesetCall"===r[f].type&&(n=r[f].eval(a).rules.filter(function(a){return a instanceof d&&a.variable?!1:!0}),r.splice.apply(r,[f,1].concat(n)),s+=n.length-1,f+=n.length-1,o.resetCache());for(f=0;r.length>f;f++)k=r[f],k.evalFirst||(r[f]=k=k.eval?k.eval(a):k);for(f=0;r.length>f;f++)if(k=r[f],k instanceof l&&k.selectors&&1===k.selectors.length&&k.selectors[0].isJustParentSelector()){r.splice(f--,1);for(var u=0;k.rules.length>u;u++)m=k.rules[u],m.copyVisibilityInfo(k.visibilityInfo()),m instanceof d&&m.variable||r.splice(++f,0,m)}if(p.shift(),q.shift(),a.mediaBlocks)for(f=t;a.mediaBlocks.length>f;f++)a.mediaBlocks[f].bubbleSelectors(b);return o},l.prototype.evalImports=function(a){var b,c,d=this.rules;if(d)for(b=0;d.length>b;b++)"Import"===d[b].type&&(c=d[b].eval(a),c&&(c.length||0===c.length)?(d.splice.apply(d,[b,1].concat(c)),b+=c.length-1):d.splice(b,1,c),this.resetCache())},l.prototype.makeImportant=function(){var a=new l(this.selectors,this.rules.map(function(a){return a.makeImportant?a.makeImportant():a}),this.strictImports,this.visibilityInfo());return a},l.prototype.matchArgs=function(a){return!a||0===a.length},l.prototype.matchCondition=function(a,b){var c=this.selectors[this.selectors.length-1];return c.evaldCondition?c.condition&&!c.condition.eval(new h.Eval(b,b.frames))?!1:!0:!1},l.prototype.resetCache=function(){this._rulesets=null,this._variables=null,this._lookups={}},l.prototype.variables=function(){return this._variables||(this._variables=this.rules?this.rules.reduce(function(a,b){if(b instanceof d&&b.variable===!0&&(a[b.name]=b),"Import"===b.type&&b.root&&b.root.variables){var c=b.root.variables();for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e])}return a},{}):{}),this._variables},l.prototype.variable=function(a){return this.variables()[a]},l.prototype.rulesets=function(){if(!this.rules)return[];var a,b,c=[],d=this.rules,e=d.length;for(a=0;e>a;a++)b=d[a],b.isRuleset&&c.push(b);return c},l.prototype.prependRule=function(a){var b=this.rules;b?b.unshift(a):this.rules=[a]},l.prototype.find=function(a,b,c){b=b||this;var d,f,g=[],h=a.toCSS();return h in this._lookups?this._lookups[h]:(this.rulesets().forEach(function(h){if(h!==b)for(var i=0;h.selectors.length>i;i++)if(d=a.match(h.selectors[i])){if(a.elements.length>d){if(!c||c(h)){f=h.find(new e(a.elements.slice(d)),b,c);for(var j=0;f.length>j;++j)f[j].path.push(h);Array.prototype.push.apply(g,f)}}else g.push({rule:h,path:[]});break}}),this._lookups[h]=g,g)},l.prototype.genCSS=function(a,b){function c(a){return"boolean"==typeof a.isRulesetLike?a.isRulesetLike:"function"==typeof a.isRulesetLike?a.isRulesetLike():!1}var d,e,f,g,h,i=[],j=[];a.tabLevel=a.tabLevel||0,this.root||a.tabLevel++;var l,m=a.compress?"":Array(a.tabLevel+1).join(" "),n=a.compress?"":Array(a.tabLevel).join(" "),o=0,p=0;for(d=0;this.rules.length>d;d++)g=this.rules[d],"Comment"===g.type?(p===d&&p++,j.push(g)):g.isCharset&&g.isCharset()?(j.splice(o,0,g),o++,p++):"Import"===g.type?(j.splice(p,0,g),p++):j.push(g);if(j=i.concat(j),!this.root){f=k(a,this,n),f&&(b.add(f),b.add(n));var q,r=this.paths,s=r.length;for(l=a.compress?",":",\n"+n,d=0;s>d;d++)if(h=r[d],q=h.length)for(d>0&&b.add(l),a.firstSelector=!0,h[0].genCSS(a,b),a.firstSelector=!1,e=1;q>e;e++)h[e].genCSS(a,b);b.add((a.compress?"{":" {\n")+m)}for(d=0;j.length>d;d++){g=j[d],d+1===j.length&&(a.lastRule=!0);var t=a.lastRule;c(g)&&(a.lastRule=!1),g.genCSS?g.genCSS(a,b):g.value&&b.add(g.value.toString()),a.lastRule=t,a.lastRule?a.lastRule=!1:b.add(a.compress?"":"\n"+m)}this.root||(b.add(a.compress?"}":"\n"+n+"}"),a.tabLevel--),b.isEmpty()||a.compress||!this.firstRoot||b.add("\n")},l.prototype.joinSelectors=function(a,b,c){for(var d=0;c.length>d;d++)this.joinSelector(a,b,c[d])},l.prototype.joinSelector=function(a,b,c){function d(a,b){var c,d;if(0===a.length)c=new g(a[0]);else{var h=[];for(d=0;a.length>d;d++)h.push(new f(null,a[d],b.index,b.currentFileInfo));c=new g(new e(h))}return c}function h(a,b){var c,d;return c=new f(null,a,b.index,b.currentFileInfo),d=new e([c])}function i(a,b,c,d){var e,g,h;if(e=[],a.length>0?(e=a.slice(0),g=e.pop(),h=d.createDerived(g.elements.slice(0))):h=d.createDerived([]),b.length>0){var i=c.combinator,j=b[0].elements[0];i.emptyOrWhitespace&&!j.combinator.emptyOrWhitespace&&(i=j.combinator),h.elements.push(new f(i,j.value,c.index,c.currentFileInfo)),h.elements=h.elements.concat(b[0].elements.slice(1))}if(0!==h.elements.length&&e.push(h),b.length>1){var k=b.slice(1);k=k.map(function(a){return a.createDerived(a.elements,[])}),e=e.concat(k)}return e}function j(a,b,c,d,e){var f;for(f=0;a.length>f;f++){var g=i(a[f],b,c,d);e.push(g)}return e}function k(a,b){var c,d;if(0!==a.length){if(0===b.length)return void b.push([new e(a)]);for(c=0;b.length>c;c++)d=b[c],d.length>0?d[d.length-1]=d[d.length-1].createDerived(d[d.length-1].elements.concat(a)):d.push(new e(a))}}function l(a,b,c){function e(a){var b;return"Paren"!==a.value.type?null:(b=a.value.value,"Selector"!==b.type?null:b)}var g,m,n,o,p,q,r,s,t,u,v=!1;for(o=[],p=[[]],g=0;c.elements.length>g;g++)if(s=c.elements[g],"&"!==s.value){var w=e(s);if(null!=w){k(o,p);var x,y=[],z=[];for(x=l(y,b,w),v=v||x,n=0;y.length>n;n++){var A=h(d(y[n],s),s);j(p,[A],s,c,z)}p=z,o=[]}else o.push(s)}else{for(v=!0,q=[],k(o,p),m=0;p.length>m;m++)if(r=p[m],0===b.length)r.length>0&&r[0].elements.push(new f(s.combinator,"",s.index,s.currentFileInfo)),q.push(r);else for(n=0;b.length>n;n++){var B=i(r,b[n],s,c);q.push(B)}p=q,o=[]}for(k(o,p),g=0;p.length>g;g++)t=p[g].length,t>0&&(a.push(p[g]),u=p[g][t-1],p[g][t-1]=u.createDerived(u.elements,c.extendList));return v}function m(a,b){var c=b.createDerived(b.elements,b.extendList,b.evaldCondition);return c.copyVisibilityInfo(a),c}var n,o,p;if(o=[],p=l(o,b,c),!p)if(b.length>0)for(o=[],n=0;b.length>n;n++){var q=b[n].map(m.bind(this,c.visibilityInfo()));q.push(c),o.push(q)}else o=[[c]];for(n=0;o.length>n;n++)a.push(o[n])},b.exports=l},{"../contexts":11,"../functions/default":20,"../functions/function-registry":22,"./debug-info":54,"./element":58,"./node":70,"./paren":72,"./rule":74,"./selector":77}],77:[function(a,b){var c=a("./node"),d=a("./element"),e=function(a,b,c,d,e,f){this.elements=a,this.extendList=b,this.condition=c,this.currentFileInfo=e||{},c||(this.evaldCondition=!0),this.copyVisibilityInfo(f)};e.prototype=new c,e.prototype.type="Selector",e.prototype.accept=function(a){this.elements&&(this.elements=a.visitArray(this.elements)),this.extendList&&(this.extendList=a.visitArray(this.extendList)),this.condition&&(this.condition=a.visit(this.condition))},e.prototype.createDerived=function(a,b,c){var d=this.visibilityInfo();c=null!=c?c:this.evaldCondition;var f=new e(a,b||this.extendList,null,this.index,this.currentFileInfo,d);return f.evaldCondition=c,f.mediaEmpty=this.mediaEmpty,f},e.prototype.createEmptySelectors=function(){var a=new d("","&",this.index,this.currentFileInfo),b=[new e([a],null,null,this.index,this.currentFileInfo)];return b[0].mediaEmpty=!0,b},e.prototype.match=function(a){var b,c,d=this.elements,e=d.length;if(a.CacheElements(),b=a._elements.length,0===b||b>e)return 0;for(c=0;b>c;c++)if(d[c].value!==a._elements[c])return 0;return b},e.prototype.CacheElements=function(){if(!this._elements){var a=this.elements.map(function(a){return a.combinator.value+(a.value.value||a.value)}).join("").match(/[,&#\*\.\w-]([\w-]|(\\.))*/g);a?"&"===a[0]&&a.shift():a=[],this._elements=a}},e.prototype.isJustParentSelector=function(){return!this.mediaEmpty&&1===this.elements.length&&"&"===this.elements[0].value&&(" "===this.elements[0].combinator.value||""===this.elements[0].combinator.value)},e.prototype.eval=function(a){var b=this.condition&&this.condition.eval(a),c=this.elements,d=this.extendList;return c=c&&c.map(function(b){return b.eval(a)}),d=d&&d.map(function(b){return b.eval(a)}),this.createDerived(c,d,b)},e.prototype.genCSS=function(a,b){var c,d;if(a&&a.firstSelector||""!==this.elements[0].combinator.value||b.add(" ",this.currentFileInfo,this.index),!this._css)for(c=0;this.elements.length>c;c++)d=this.elements[c],d.genCSS(a,b)},e.prototype.getIsOutput=function(){return this.evaldCondition},b.exports=e},{"./element":58,"./node":70}],78:[function(a,b){var c=a("./node"),d=function(a){this.value=a};d.prototype=new c,d.prototype.type="UnicodeDescriptor",b.exports=d},{"./node":70}],79:[function(a,b){var c=a("./node"),d=a("../data/unit-conversions"),e=function(a,b,c){this.numerator=a?a.slice(0).sort():[],this.denominator=b?b.slice(0).sort():[],c?this.backupUnit=c:a&&a.length&&(this.backupUnit=a[0])};e.prototype=new c,e.prototype.type="Unit",e.prototype.clone=function(){return new e(this.numerator.slice(0),this.denominator.slice(0),this.backupUnit)},e.prototype.genCSS=function(a,b){var c=a&&a.strictUnits;1===this.numerator.length?b.add(this.numerator[0]):!c&&this.backupUnit?b.add(this.backupUnit):!c&&this.denominator.length&&b.add(this.denominator[0])},e.prototype.toString=function(){var a,b=this.numerator.join("*");for(a=0;this.denominator.length>a;a++)b+="/"+this.denominator[a];return b},e.prototype.compare=function(a){return this.is(a.toString())?0:void 0},e.prototype.is=function(a){return this.toString().toUpperCase()===a.toUpperCase()},e.prototype.isLength=function(){return Boolean(this.toCSS().match(/px|em|%|in|cm|mm|pc|pt|ex/))},e.prototype.isEmpty=function(){return 0===this.numerator.length&&0===this.denominator.length},e.prototype.isSingular=function(){return 1>=this.numerator.length&&0===this.denominator.length},e.prototype.map=function(a){var b;for(b=0;this.numerator.length>b;b++)this.numerator[b]=a(this.numerator[b],!1);for(b=0;this.denominator.length>b;b++)this.denominator[b]=a(this.denominator[b],!0)},e.prototype.usedUnits=function(){var a,b,c,e={};b=function(b){return a.hasOwnProperty(b)&&!e[c]&&(e[c]=b),b};for(c in d)d.hasOwnProperty(c)&&(a=d[c],this.map(b));return e},e.prototype.cancel=function(){var a,b,c={};for(b=0;this.numerator.length>b;b++)a=this.numerator[b],c[a]=(c[a]||0)+1;for(b=0;this.denominator.length>b;b++)a=this.denominator[b],c[a]=(c[a]||0)-1;this.numerator=[],this.denominator=[];for(a in c)if(c.hasOwnProperty(a)){var d=c[a];if(d>0)for(b=0;d>b;b++)this.numerator.push(a);else if(0>d)for(b=0;-d>b;b++)this.denominator.push(a)}this.numerator.sort(),this.denominator.sort()},b.exports=e},{"../data/unit-conversions":14,"./node":70}],80:[function(a,b){var c=a("./node"),d=function(a,b,c,d){this.value=a,this.currentFileInfo=c,this.index=b,this.isEvald=d};d.prototype=new c,d.prototype.type="Url",d.prototype.accept=function(a){this.value=a.visit(this.value)},d.prototype.genCSS=function(a,b){b.add("url("),this.value.genCSS(a,b),b.add(")")},d.prototype.eval=function(a){var b,c=this.value.eval(a);if(!this.isEvald&&(b=this.currentFileInfo&&this.currentFileInfo.rootpath,b&&"string"==typeof c.value&&a.isPathRelative(c.value)&&(c.quote||(b=b.replace(/[\(\)'"\s]/g,function(a){return"\\"+a})),c.value=b+c.value),c.value=a.normalizePath(c.value),a.urlArgs&&!c.value.match(/^\s*data:/))){var e=-1===c.value.indexOf("?")?"?":"&",f=e+a.urlArgs;-1!==c.value.indexOf("#")?c.value=c.value.replace("#",f+"#"):c.value+=f}return new d(c,this.index,this.currentFileInfo,!0)},b.exports=d},{"./node":70}],81:[function(a,b){var c=a("./node"),d=function(a){if(this.value=a,!a)throw new Error("Value requires an array argument")};d.prototype=new c,d.prototype.type="Value",d.prototype.accept=function(a){this.value&&(this.value=a.visitArray(this.value))},d.prototype.eval=function(a){return 1===this.value.length?this.value[0].eval(a):new d(this.value.map(function(b){return b.eval(a)}))},d.prototype.genCSS=function(a,b){var c;for(c=0;this.value.length>c;c++)this.value[c].genCSS(a,b),this.value.length>c+1&&b.add(a&&a.compress?",":", ")},b.exports=d},{"./node":70}],82:[function(a,b){var c=a("./node"),d=function(a,b,c){this.name=a,this.index=b,this.currentFileInfo=c||{}};d.prototype=new c,d.prototype.type="Variable",d.prototype.eval=function(a){var b,c=this.name;if(0===c.indexOf("@@")&&(c="@"+new d(c.slice(1),this.index,this.currentFileInfo).eval(a).value),this.evaluating)throw{type:"Name",message:"Recursive variable definition for "+c,filename:this.currentFileInfo.filename,index:this.index};if(this.evaluating=!0,b=this.find(a.frames,function(b){var d=b.variable(c);if(d){if(d.important){var e=a.importantScope[a.importantScope.length-1];e.important=d.important}return d.value.eval(a)}}))return this.evaluating=!1,b;throw{type:"Name",message:"variable "+c+" is undefined",filename:this.currentFileInfo.filename,index:this.index}},d.prototype.find=function(a,b){for(var c,d=0;a.length>d;d++)if(c=b.call(a,a[d]))return c;return null},b.exports=d},{"./node":70}],83:[function(a,b){b.exports={getLocation:function(a,b){for(var c=a+1,d=null,e=-1;--c>=0&&"\n"!==b.charAt(c);)e++;return"number"==typeof a&&(d=(b.slice(0,a).match(/\n/g)||"").length),{line:d,column:e}}}},{}],84:[function(a,b){var c=a("../tree"),d=a("./visitor"),e=a("../logger"),f=function(){this._visitor=new d(this),this.contexts=[],this.allExtendsStack=[[]]};f.prototype={run:function(a){return a=this._visitor.visit(a),a.allExtends=this.allExtendsStack[0],a},visitRule:function(a,b){b.visitDeeper=!1},visitMixinDefinition:function(a,b){b.visitDeeper=!1},visitRuleset:function(a){if(!a.root){var b,d,e,f,g=[],h=a.rules,i=h?h.length:0;for(b=0;i>b;b++)a.rules[b]instanceof c.Extend&&(g.push(h[b]),a.extendOnEveryPath=!0);var j=a.paths;for(b=0;j.length>b;b++){var k=j[b],l=k[k.length-1],m=l.extendList;for(f=m?m.slice(0).concat(g):g,f&&(f=f.map(function(a){return a.clone()})),d=0;f.length>d;d++)this.foundExtends=!0,e=f[d],e.findSelfSelectors(k),e.ruleset=a,0===d&&(e.firstExtendOnThisSelectorPath=!0),this.allExtendsStack[this.allExtendsStack.length-1].push(e)}this.contexts.push(a.selectors)}},visitRulesetOut:function(a){a.root||(this.contexts.length=this.contexts.length-1)},visitMedia:function(a){a.allExtends=[],this.allExtendsStack.push(a.allExtends)},visitMediaOut:function(){this.allExtendsStack.length=this.allExtendsStack.length-1},visitDirective:function(a){a.allExtends=[],this.allExtendsStack.push(a.allExtends)},visitDirectiveOut:function(){this.allExtendsStack.length=this.allExtendsStack.length-1}};var g=function(){this._visitor=new d(this)};g.prototype={run:function(a){var b=new f;if(this.extendIndicies={},b.run(a),!b.foundExtends)return a;a.allExtends=a.allExtends.concat(this.doExtendChaining(a.allExtends,a.allExtends)),this.allExtendsStack=[a.allExtends];var c=this._visitor.visit(a);return this.checkExtendsForNonMatched(a.allExtends),c},checkExtendsForNonMatched:function(a){var b=this.extendIndicies;a.filter(function(a){return!a.hasFoundMatches&&1==a.parent_ids.length}).forEach(function(a){var c="_unknown_";try{c=a.selector.toCSS({})}catch(d){}b[a.index+" "+c]||(b[a.index+" "+c]=!0,e.warn("extend '"+c+"' has no matches"))})},doExtendChaining:function(a,b,d){var e,f,g,h,i,j,k,l,m=[],n=this;for(d=d||0,e=0;a.length>e;e++)for(f=0;b.length>f;f++)j=a[e],k=b[f],j.parent_ids.indexOf(k.object_id)>=0||(i=[k.selfSelectors[0]],g=n.findMatch(j,i),g.length&&(j.hasFoundMatches=!0,j.selfSelectors.forEach(function(a){var b=k.visibilityInfo();h=n.extendSelector(g,i,a,j.isVisible()),l=new c.Extend(k.selector,k.option,0,k.currentFileInfo,b),l.selfSelectors=h,h[h.length-1].extendList=[l],m.push(l),l.ruleset=k.ruleset,l.parent_ids=l.parent_ids.concat(k.parent_ids,j.parent_ids),k.firstExtendOnThisSelectorPath&&(l.firstExtendOnThisSelectorPath=!0,k.ruleset.paths.push(h))})));if(m.length){if(this.extendChainCount++,d>100){var o="{unable to calculate}",p="{unable to calculate}";try{o=m[0].selfSelectors[0].toCSS(),p=m[0].selector.toCSS()}catch(q){}throw{message:"extend circular reference detected. One of the circular extends is currently:"+o+":extend("+p+")"}}return m.concat(n.doExtendChaining(m,b,d+1))}return m},visitRule:function(a,b){b.visitDeeper=!1},visitMixinDefinition:function(a,b){b.visitDeeper=!1},visitSelector:function(a,b){b.visitDeeper=!1},visitRuleset:function(a){if(!a.root){var b,c,d,e,f=this.allExtendsStack[this.allExtendsStack.length-1],g=[],h=this;for(d=0;f.length>d;d++)for(c=0;a.paths.length>c;c++)if(e=a.paths[c],!a.extendOnEveryPath){var i=e[e.length-1].extendList;i&&i.length||(b=this.findMatch(f[d],e),b.length&&(f[d].hasFoundMatches=!0,f[d].selfSelectors.forEach(function(a){var c;c=h.extendSelector(b,e,a,f[d].isVisible()),g.push(c)})))}a.paths=a.paths.concat(g)}},findMatch:function(a,b){var c,d,e,f,g,h,i,j=this,k=a.selector.elements,l=[],m=[];for(c=0;b.length>c;c++)for(d=b[c],e=0;d.elements.length>e;e++)for(f=d.elements[e],(a.allowBefore||0===c&&0===e)&&l.push({pathIndex:c,index:e,matched:0,initialCombinator:f.combinator}),h=0;l.length>h;h++)i=l[h],g=f.combinator.value,""===g&&0===e&&(g=" "),!j.isElementValuesEqual(k[i.matched].value,f.value)||i.matched>0&&k[i.matched].combinator.value!==g?i=null:i.matched++,i&&(i.finished=i.matched===k.length,i.finished&&!a.allowAfter&&(d.elements.length>e+1||b.length>c+1)&&(i=null)),i?i.finished&&(i.length=k.length,i.endPathIndex=c,i.endPathElementIndex=e+1,l.length=0,m.push(i)):(l.splice(h,1),h--);return m},isElementValuesEqual:function(a,b){if("string"==typeof a||"string"==typeof b)return a===b;if(a instanceof c.Attribute)return a.op!==b.op||a.key!==b.key?!1:a.value&&b.value?(a=a.value.value||a.value,b=b.value.value||b.value,a===b):a.value||b.value?!1:!0;if(a=a.value,b=b.value,a instanceof c.Selector){if(!(b instanceof c.Selector)||a.elements.length!==b.elements.length)return!1;for(var d=0;a.elements.length>d;d++){if(a.elements[d].combinator.value!==b.elements[d].combinator.value&&(0!==d||(a.elements[d].combinator.value||" ")!==(b.elements[d].combinator.value||" ")))return!1;if(!this.isElementValuesEqual(a.elements[d].value,b.elements[d].value))return!1}return!0}return!1},extendSelector:function(a,b,d,e){var f,g,h,i,j,k=0,l=0,m=[];for(f=0;a.length>f;f++)i=a[f],g=b[i.pathIndex],h=new c.Element(i.initialCombinator,d.elements[0].value,d.elements[0].index,d.elements[0].currentFileInfo),i.pathIndex>k&&l>0&&(m[m.length-1].elements=m[m.length-1].elements.concat(b[k].elements.slice(l)),l=0,k++),j=g.elements.slice(l,i.index).concat([h]).concat(d.elements.slice(1)),k===i.pathIndex&&f>0?m[m.length-1].elements=m[m.length-1].elements.concat(j):(m=m.concat(b.slice(k,i.pathIndex)),m.push(new c.Selector(j))),k=i.endPathIndex,l=i.endPathElementIndex,l>=b[k].elements.length&&(l=0,k++);return b.length>k&&l>0&&(m[m.length-1].elements=m[m.length-1].elements.concat(b[k].elements.slice(l)),k++),m=m.concat(b.slice(k,b.length)),m=m.map(function(a){var b=a.createDerived(a.elements);return e?b.ensureVisibility():b.ensureInvisibility(),b})},visitMedia:function(a){var b=a.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);b=b.concat(this.doExtendChaining(b,a.allExtends)),this.allExtendsStack.push(b)},visitMediaOut:function(){var a=this.allExtendsStack.length-1;this.allExtendsStack.length=a},visitDirective:function(a){var b=a.allExtends.concat(this.allExtendsStack[this.allExtendsStack.length-1]);b=b.concat(this.doExtendChaining(b,a.allExtends)),this.allExtendsStack.push(b)},visitDirectiveOut:function(){var a=this.allExtendsStack.length-1;this.allExtendsStack.length=a}},b.exports=g},{"../logger":33,"../tree":62,"./visitor":91}],85:[function(a,b){function c(a){this.imports=[],this.variableImports=[],this._onSequencerEmpty=a,this._currentDepth=0}c.prototype.addImport=function(a){var b=this,c={callback:a,args:null,isReady:!1};return this.imports.push(c),function(){c.args=Array.prototype.slice.call(arguments,0),c.isReady=!0,b.tryRun()}},c.prototype.addVariableImport=function(a){this.variableImports.push(a)},c.prototype.tryRun=function(){this._currentDepth++;try{for(;;){for(;this.imports.length>0;){var a=this.imports[0];if(!a.isReady)return;this.imports=this.imports.slice(1),a.callback.apply(null,a.args)}if(0===this.variableImports.length)break;var b=this.variableImports[0];this.variableImports=this.variableImports.slice(1),b()}}finally{this._currentDepth--}0===this._currentDepth&&this._onSequencerEmpty&&this._onSequencerEmpty()},b.exports=c},{}],86:[function(a,b){var c=a("../contexts"),d=a("./visitor"),e=a("./import-sequencer"),f=function(a,b){this._visitor=new d(this),this._importer=a,this._finish=b,this.context=new c.Eval,this.importCount=0,this.onceFileDetectionMap={},this.recursionDetector={},this._sequencer=new e(this._onSequencerEmpty.bind(this))};f.prototype={isReplacing:!1,run:function(a){try{this._visitor.visit(a); + +}catch(b){this.error=b}this.isFinished=!0,this._sequencer.tryRun()},_onSequencerEmpty:function(){this.isFinished&&this._finish(this.error)},visitImport:function(a,b){var d=a.options.inline;if(!a.css||d){var e=new c.Eval(this.context,this.context.frames.slice(0)),f=e.frames[0];this.importCount++,a.isVariableImport()?this._sequencer.addVariableImport(this.processImportNode.bind(this,a,e,f)):this.processImportNode(a,e,f)}b.visitDeeper=!1},processImportNode:function(a,b,c){var d,e=a.options.inline;try{d=a.evalForImport(b)}catch(f){f.filename||(f.index=a.index,f.filename=a.currentFileInfo.filename),a.css=!0,a.error=f}if(!d||d.css&&!e)this.importCount--,this.isFinished&&this._sequencer.tryRun();else{d.options.multiple&&(b.importMultiple=!0);for(var g=void 0===d.css,h=0;c.rules.length>h;h++)if(c.rules[h]===a){c.rules[h]=d;break}var i=this.onImported.bind(this,d,b),j=this._sequencer.addImport(i);this._importer.push(d.getPath(),g,d.currentFileInfo,d.options,j)}},onImported:function(a,b,c,d,e,f){c&&(c.filename||(c.index=a.index,c.filename=a.currentFileInfo.filename),this.error=c);var g=this,h=a.options.inline,i=a.options.plugin,j=a.options.optional,k=e||f in g.recursionDetector;if(b.importMultiple||(a.skip=k?!0:function(){return f in g.onceFileDetectionMap?!0:(g.onceFileDetectionMap[f]=!0,!1)}),!f&&j&&(a.skip=!0),d&&(a.root=d,a.importedFilename=f,!(h||i||!b.importMultiple&&k))){g.recursionDetector[f]=!0;var l=this.context;this.context=b;try{this._visitor.visit(d)}catch(c){this.error=c}this.context=l}g.importCount--,g.isFinished&&g._sequencer.tryRun()},visitRule:function(a,b){"DetachedRuleset"===a.value.type?this.context.frames.unshift(a):b.visitDeeper=!1},visitRuleOut:function(a){"DetachedRuleset"===a.value.type&&this.context.frames.shift()},visitDirective:function(a){this.context.frames.unshift(a)},visitDirectiveOut:function(){this.context.frames.shift()},visitMixinDefinition:function(a){this.context.frames.unshift(a)},visitMixinDefinitionOut:function(){this.context.frames.shift()},visitRuleset:function(a){this.context.frames.unshift(a)},visitRulesetOut:function(){this.context.frames.shift()},visitMedia:function(a){this.context.frames.unshift(a.rules[0])},visitMediaOut:function(){this.context.frames.shift()}},b.exports=f},{"../contexts":11,"./import-sequencer":85,"./visitor":91}],87:[function(a,b){var c={Visitor:a("./visitor"),ImportVisitor:a("./import-visitor"),MarkVisibleSelectorsVisitor:a("./set-tree-visibility-visitor"),ExtendVisitor:a("./extend-visitor"),JoinSelectorVisitor:a("./join-selector-visitor"),ToCSSVisitor:a("./to-css-visitor")};b.exports=c},{"./extend-visitor":84,"./import-visitor":86,"./join-selector-visitor":88,"./set-tree-visibility-visitor":89,"./to-css-visitor":90,"./visitor":91}],88:[function(a,b){var c=a("./visitor"),d=function(){this.contexts=[[]],this._visitor=new c(this)};d.prototype={run:function(a){return this._visitor.visit(a)},visitRule:function(a,b){b.visitDeeper=!1},visitMixinDefinition:function(a,b){b.visitDeeper=!1},visitRuleset:function(a){var b,c=this.contexts[this.contexts.length-1],d=[];this.contexts.push(d),a.root||(b=a.selectors,b&&(b=b.filter(function(a){return a.getIsOutput()}),a.selectors=b.length?b:b=null,b&&a.joinSelectors(d,c,b)),b||(a.rules=null),a.paths=d)},visitRulesetOut:function(){this.contexts.length=this.contexts.length-1},visitMedia:function(a){var b=this.contexts[this.contexts.length-1];a.rules[0].root=0===b.length||b[0].multiMedia},visitDirective:function(a){var b=this.contexts[this.contexts.length-1];a.rules&&a.rules.length&&(a.rules[0].root=a.isRooted||0===b.length||null)}},b.exports=d},{"./visitor":91}],89:[function(a,b){var c=function(a){this.visible=a};c.prototype.run=function(a){this.visit(a)},c.prototype.visitArray=function(a){if(!a)return a;var b,c=a.length;for(b=0;c>b;b++)this.visit(a[b]);return a},c.prototype.visit=function(a){return a?a.constructor===Array?this.visitArray(a):!a.blocksVisibility||a.blocksVisibility()?a:(this.visible?a.ensureVisibility():a.ensureInvisibility(),a.accept(this),a):a},b.exports=c},{}],90:[function(a,b){var c=a("../tree"),d=a("./visitor"),e=function(a){this._visitor=new d(this),this._context=a};e.prototype={containsSilentNonBlockedChild:function(a){var b;if(null==a)return!1;for(var c=0;a.length>c;c++)if(b=a[c],b.isSilent&&b.isSilent(this._context)&&!b.blocksVisibility())return!0;return!1},keepOnlyVisibleChilds:function(a){null!=a&&null!=a.rules&&(a.rules=a.rules.filter(function(a){return a.isVisible()}))},isEmpty:function(a){return null==a||null==a.rules?!0:0===a.rules.length},hasVisibleSelector:function(a){return null==a||null==a.paths?!1:a.paths.length>0},resolveVisibility:function(a,b){if(!a.blocksVisibility()){if(this.isEmpty(a)&&!this.containsSilentNonBlockedChild(b))return;return a}var c=a.rules[0];return this.keepOnlyVisibleChilds(c),this.isEmpty(c)?void 0:(a.ensureVisibility(),a.removeVisibilityBlock(),a)},isVisibleRuleset:function(a){return a.firstRoot?!0:this.isEmpty(a)?!1:a.root||this.hasVisibleSelector(a)?!0:!1}};var f=function(a){this._visitor=new d(this),this._context=a,this.utils=new e(a)};f.prototype={isReplacing:!0,run:function(a){return this._visitor.visit(a)},visitRule:function(a){return a.blocksVisibility()||a.variable?void 0:a},visitMixinDefinition:function(a){a.frames=[]},visitExtend:function(){},visitComment:function(a){return a.blocksVisibility()||a.isSilent(this._context)?void 0:a},visitMedia:function(a,b){var c=a.rules[0].rules;return a.accept(this._visitor),b.visitDeeper=!1,this.utils.resolveVisibility(a,c)},visitImport:function(a){return a.blocksVisibility()?void 0:a},visitDirective:function(a,b){return a.rules&&a.rules.length?this.visitDirectiveWithBody(a,b):this.visitDirectiveWithoutBody(a,b)},visitDirectiveWithBody:function(a,b){function c(a){var b=a.rules;return 1===b.length&&(!b[0].paths||0===b[0].paths.length)}function d(a){var b=a.rules;return c(a)?b[0].rules:b}var e=d(a);return a.accept(this._visitor),b.visitDeeper=!1,this.utils.isEmpty(a)||this._mergeRules(a.rules[0].rules),this.utils.resolveVisibility(a,e)},visitDirectiveWithoutBody:function(a){if(!a.blocksVisibility()){if("@charset"===a.name){if(this.charset){if(a.debugInfo){var b=new c.Comment("/* "+a.toCSS(this._context).replace(/\n/g,"")+" */\n");return b.debugInfo=a.debugInfo,this._visitor.visit(b)}return}this.charset=!0}return a}},checkPropertiesInRoot:function(a){for(var b,d=0;a.length>d;d++)if(b=a[d],b instanceof c.Rule&&!b.variable)throw{message:"properties must be inside selector blocks, they cannot be in the root.",index:b.index,filename:b.currentFileInfo?b.currentFileInfo.filename:null}},visitRuleset:function(a,b){var c,d=[];if(a.firstRoot&&this.checkPropertiesInRoot(a.rules),a.root)a.accept(this._visitor),b.visitDeeper=!1;else{this._compileRulesetPaths(a);for(var e=a.rules,f=e?e.length:0,g=0;f>g;)c=e[g],c&&c.rules?(d.push(this._visitor.visit(c)),e.splice(g,1),f--):g++;f>0?a.accept(this._visitor):a.rules=null,b.visitDeeper=!1}return a.rules&&(this._mergeRules(a.rules),this._removeDuplicateRules(a.rules)),this.utils.isVisibleRuleset(a)&&(a.ensureVisibility(),d.splice(0,0,a)),1===d.length?d[0]:d},_compileRulesetPaths:function(a){a.paths&&(a.paths=a.paths.filter(function(a){var b;for(" "===a[0].elements[0].combinator.value&&(a[0].elements[0].combinator=new c.Combinator("")),b=0;a.length>b;b++)if(a[b].isVisible()&&a[b].getIsOutput())return!0;return!1}))},_removeDuplicateRules:function(a){if(a){var b,d,e,f={};for(e=a.length-1;e>=0;e--)if(d=a[e],d instanceof c.Rule)if(f[d.name]){b=f[d.name],b instanceof c.Rule&&(b=f[d.name]=[f[d.name].toCSS(this._context)]);var g=d.toCSS(this._context);-1!==b.indexOf(g)?a.splice(e,1):b.push(g)}else f[d.name]=d}},_mergeRules:function(a){if(a){for(var b,d,e,f={},g=0;a.length>g;g++)d=a[g],d instanceof c.Rule&&d.merge&&(e=[d.name,d.important?"!":""].join(","),f[e]?a.splice(g--,1):f[e]=[],f[e].push(d));Object.keys(f).map(function(a){function e(a){return new c.Expression(a.map(function(a){return a.value}))}function g(a){return new c.Value(a.map(function(a){return a}))}if(b=f[a],b.length>1){d=b[0];var h=[],i=[];b.map(function(a){"+"===a.merge&&(i.length>0&&h.push(e(i)),i=[]),i.push(a)}),h.push(e(i)),d.value=g(h)}})}},visitAnonymous:function(a){return a.blocksVisibility()?void 0:(a.accept(this._visitor),a)}},b.exports=f},{"../tree":62,"./visitor":91}],91:[function(a,b){function c(a){return a}function d(a,b){var c,e;for(c in a)if(a.hasOwnProperty(c))switch(e=a[c],typeof e){case"function":e.prototype&&e.prototype.type&&(e.prototype.typeIndex=b++);break;case"object":b=d(e,b)}return b}var e=a("../tree"),f={visitDeeper:!0},g=!1,h=function(a){this._implementation=a,this._visitFnCache=[],g||(d(e,1),g=!0)};h.prototype={visit:function(a){if(!a)return a;var b=a.typeIndex;if(!b)return a;var d,e=this._visitFnCache,g=this._implementation,h=b<<1,i=1|h,j=e[h],k=e[i],l=f;if(l.visitDeeper=!0,j||(d="visit"+a.type,j=g[d]||c,k=g[d+"Out"]||c,e[h]=j,e[i]=k),j!==c){var m=j.call(g,a,l);g.isReplacing&&(a=m)}return l.visitDeeper&&a&&a.accept&&a.accept(this),k!=c&&k.call(g,a),a},visitArray:function(a,b){if(!a)return a;var c,d=a.length;if(b||!this._implementation.isReplacing){for(c=0;d>c;c++)this.visit(a[c]);return a}var e=[];for(c=0;d>c;c++){var f=this.visit(a[c]);void 0!==f&&(f.splice?f.length&&this.flatten(f,e):e.push(f))}return e},flatten:function(a,b){b||(b=[]);var c,d,e,f,g,h;for(d=0,c=a.length;c>d;d++)if(e=a[d],void 0!==e)if(e.splice)for(g=0,f=e.length;f>g;g++)h=e[g],void 0!==h&&(h.splice?h.length&&this.flatten(h,b):b.push(h));else b.push(e);return b}},b.exports=h},{"../tree":62}],92:[function(a,b){function c(){if(!g){g=!0;for(var a,b=f.length;b;){a=f,f=[];for(var c=-1;++ca;a++)b(k[a]);k=null}if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof a)throw new TypeError("not a function");var i=null,j=null,k=[],l=this;this.then=function(a,c){return new l.constructor(function(e,f){b(new d(a,c,e,f))})},e(a,c,g)}function d(a,b,c,d){this.onFulfilled="function"==typeof a?a:null,this.onRejected="function"==typeof b?b:null,this.resolve=c,this.reject=d}function e(a,b,c){var d=!1;try{a(function(a){d||(d=!0,b(a))},function(a){d||(d=!0,c(a))})}catch(e){if(d)return;d=!0,c(e)}}var f=a("asap");b.exports=c},{asap:95}],94:[function(a,b){"use strict";function c(a){this.then=function(b){return"function"!=typeof b?this:new d(function(c,d){e(function(){try{c(b(a))}catch(e){d(e)}})})}}var d=a("./core.js"),e=a("asap");b.exports=d,c.prototype=d.prototype;var f=new c(!0),g=new c(!1),h=new c(null),i=new c(void 0),j=new c(0),k=new c("");d.resolve=function(a){if(a instanceof d)return a;if(null===a)return h;if(void 0===a)return i;if(a===!0)return f;if(a===!1)return g;if(0===a)return j;if(""===a)return k;if("object"==typeof a||"function"==typeof a)try{var b=a.then;if("function"==typeof b)return new d(b.bind(a))}catch(e){return new d(function(a,b){b(e)})}return new c(a)},d.all=function(a){var b=Array.prototype.slice.call(a);return new d(function(a,c){function d(f,g){try{if(g&&("object"==typeof g||"function"==typeof g)){var h=g.then;if("function"==typeof h)return void h.call(g,function(a){d(f,a)},c)}b[f]=g,0===--e&&a(b)}catch(i){c(i)}}if(0===b.length)return a([]);for(var e=b.length,f=0;b.length>f;f++)d(f,b[f])})},d.reject=function(a){return new d(function(b,c){c(a)})},d.race=function(a){return new d(function(b,c){a.forEach(function(a){d.resolve(a).then(b,c)})})},d.prototype["catch"]=function(a){return this.then(null,a)}},{"./core.js":93,asap:95}],95:[function(a,b){(function(a){function c(){for(;e.next;){e=e.next;var a=e.task;e.task=void 0;var b=e.domain;b&&(e.domain=void 0,b.enter());try{a()}catch(d){if(i)throw b&&b.exit(),setTimeout(c,0),b&&b.enter(),d;setTimeout(function(){throw d},0)}b&&b.exit()}g=!1}function d(b){f=f.next={task:b,domain:i&&a.domain,next:null},g||(g=!0,h())}var e={task:void 0,next:null},f=e,g=!1,h=void 0,i=!1;if("undefined"!=typeof a&&a.nextTick)i=!0,h=function(){a.nextTick(c)};else if("function"==typeof setImmediate)h="undefined"!=typeof window?setImmediate.bind(window,c):function(){setImmediate(c)};else if("undefined"!=typeof MessageChannel){var j=new MessageChannel;j.port1.onmessage=c,h=function(){j.port2.postMessage(0)}}else h=function(){setTimeout(c,0)};b.exports=d}).call(this,a("_process"))},{_process:92}],96:[function(){"function"!=typeof Promise.prototype.done&&(Promise.prototype.done=function(){var a=arguments.length?this.then.apply(this,arguments):this;a.then(null,function(a){setTimeout(function(){throw a},0)})})},{}],97:[function(a){a("asap");"undefined"==typeof Promise&&(Promise=a("./lib/core.js"),a("./lib/es6-extensions.js")),a("./polyfill-done.js")},{"./lib/core.js":93,"./lib/es6-extensions.js":94,"./polyfill-done.js":96,asap:95}]},{},[2])(2)}); diff --git a/contrib/iSenWeb/trans_result.php b/contrib/iSenWeb/trans_result.php index a56900a6d8..de071d908a 100755 --- a/contrib/iSenWeb/trans_result.php +++ b/contrib/iSenWeb/trans_result.php @@ -4,6 +4,7 @@ $ereg='/\n/'; $arr_str = preg_split($ereg,$Content); foreach($arr_str as $value){ + $value = escapeshellarg($value); $result = ` echo $value | nc 161.64.89.129 1986`; echo $result.'
    '; } diff --git a/contrib/lmserver/examples/lmclient.cc b/contrib/lmserver/examples/lmclient.cc index 4ce5be380a..0d9fc23ff1 100644 --- a/contrib/lmserver/examples/lmclient.cc +++ b/contrib/lmserver/examples/lmclient.cc @@ -5,13 +5,13 @@ #include #include #include -#include +#include #include #include #include #include #include -#include +#include #include struct Cache { @@ -45,8 +45,8 @@ struct LMClient { exit(1); } - bzero((char *)&server, sizeof(server)); - bcopy(hp->h_addr, (char *)&server.sin_addr, hp->h_length); + memset(&server, '\0', sizeof(server)); + memcpy((char *)&server.sin_addr, hp->h_addr, hp->h_length); server.sin_family = hp->h_addrtype; server.sin_port = htons(port); diff --git a/contrib/m4m/Jamfile b/contrib/m4m/Jamfile new file mode 100644 index 0000000000..a5b61a9b57 --- /dev/null +++ b/contrib/m4m/Jamfile @@ -0,0 +1,12 @@ +external-lib bzip2 ; +external-lib zlib ; + +exe merge-sorted : +util/merge-sorted.cc +$(TOP)/moses/TranslationModel/UG/mm//mm +$(TOP)/moses/TranslationModel/UG/generic//generic +$(TOP)//boost_iostreams +$(TOP)//boost_program_options +; + +install $(PREFIX)/bin : merge-sorted ; diff --git a/contrib/m4m/Makefile b/contrib/m4m/Makefile new file mode 100644 index 0000000000..1af6061f39 --- /dev/null +++ b/contrib/m4m/Makefile @@ -0,0 +1,2 @@ +merge-sorted: + g++ -O3 -I ../.. util/merge-sorted.cc ../../moses/TranslationModel/UG/generic/file_io/ug_stream.cpp -o $@ -lboost_iostreams -lboost_program_options -lbz2 -lz diff --git a/contrib/m4m/README b/contrib/m4m/README new file mode 100644 index 0000000000..7aa3ffea9b --- /dev/null +++ b/contrib/m4m/README @@ -0,0 +1,24 @@ +M4M - Makefiles for Moses + +Makefiles for Moses (M4M) is a collection of make file modules designed to +facilitate building and experimenting with Moses MT systems. The long story is +in the paper (m4m.pdf). + +You'll need the following additional tools (in your PATH): +- wget if you want to use m4m to download and install WMT data sets +- Gnu parallel: http://www.gnu.org/software/parallel/ +- a word aligner (mgiza or fastalign or Berkeley Aligner) + +****************************************************************************** +* MAKEFILES FOR MOSES IS STILL UNDER INTENSIVE DEVELOPMENT. * +* BEAR WITH ME WHILE BUGS ARE BEING FIXED AND FUNCTIONALITY IS ADDED. * +****************************************************************************** + +KNOWN ISSUES: + +- giza phrase table creation sometimes fails when make is run in + multi-threaded mode. Running make without the -j switch seems to work. + + + +Ulrich Germann diff --git a/contrib/m4m/examples/giza-vs-fast.m4m b/contrib/m4m/examples/giza-vs-fast.m4m new file mode 100644 index 0000000000..e5e56dc2ab --- /dev/null +++ b/contrib/m4m/examples/giza-vs-fast.m4m @@ -0,0 +1,99 @@ +# -*- Makefile -*- + +# some variables need to be set before m4m modules are included +.SECONDARY: + +MOSES_ROOT = ${HOME}/code/moses/master/mosesdecoder +MGIZA_ROOT = ${HOME}/tools/mgiza +fast_align = ${HOME}/bin/fast_align + +# L1: source language; L2: target language +L1 = de +L2 = en +WDIR = $(CURDIR) + +include ${MOSES_ROOT}/contrib/m4m/modules/m4m.m4m + +# both systems use the same language model +L2raw := $(wildcard ${WDIR}/crp/trn/*/raw/*.${L2}.gz) +L2data := $(subst /raw/,/cased/,${L2raw}) +lm.order = 5 +lm.factor = 0 +lm.lazy = 1 +lm.file = ${WDIR}/lm/${L2}.5-grams.kenlm +${lm.file}: | $(L2data) +$(eval $(call add_kenlm,${lm.file},${lm.order},${lm.factor},${lm.lazy})) +.INTERMEDIATE: ${L2data} + +dmodels = wbe-mslr-bidirectional-fe-allff +mysystem = systems/${word-alignment}-aligned +myptable = model/tm/${aligner}.${L1}-${L2} +mydtable = model/dm/${aligner}.${L1}-${L2} + +wa ?= $(error wa not specified on command line) +SYSTEMS := +aligner := +$(foreach a,${wa},\ +$(eval aligner:=${a});\ +$(eval $(clear-ptables));\ +$(eval $(clear-dtables));\ +$(eval SYSTEMS+=systems/${a}-aligned);\ +$(eval $(call add_binary_phrase_table,0,0,4,$${myptable}));\ +$(eval $(call add_binary_reordering_table,0,0,8,\ + ${dmodels},$${mydtable},$${myptable}));\ +$(eval $(call create_moses_ini,$${mysystem}))) + +aln: $(foreach a,${wa},${WDIR}/crp/trn/aln/$a/${L1}-${L2}.symal.gz) +info: +dtable: ${DTABLES} +ptable: ${PTABLES} +system: $(addsuffix /moses.ini.0,${SYSTEMS}) +eval: ${EVALUATIONS} + + +ifdef tune.runs + +TUNED_SYSTEMS := +EVALUATIONS := +$(eval $(tune_all_systems)) +$(eval $(bleu_score_all_systems)) +tune: ${TUNED_SYSTEMS} + echo TUNED ${TUNED_SYSTEMS} +all: ${EVALUATIONS} + +else + +tune: all + +# The recursive calls below make sure that tuning runs happen sequentially +# (moses runs multi-threaded anyway). The reason is that we may want to have +# first results as soon as possible. +tune.runs := 1 1 +$(info TUNE RUNS ${tune.runs}) +all: + $(foreach n,$(shell seq ${tune.runs}),\ + ${MAKE} -f $(word 1, ${MAKEFILE_LIST}) \ + tune.runs="$n $n" ${MAKECMDGOALS} -${MAKEFLAGS}) + +endif + +.PHONY: $(addprefix reset-,lm tm dm all aln tune eval systems) +reset-aln: reset-mm + -rm -rf $(foreach a,${wa},crp/trn/aln/${a}) +reset-mm: reset-dm reset-tm + -rm -rf $(foreach a,${wa},crp/trn/mm/${a}) +reset-dm: reset-systems + -rm -rf $(foreach a,${wa},model/dm/${a}.*) +reset-tm: reset-systems + -rm -rf $(foreach a,${wa},model/tm/${a}.*) +reset-systems: + -rm -rf ${SYSTEMS} +reset-tune: + -rm -rf $(foreach s,${SYSTEMS}/$s/tune) +reset-eval: + -rm -rf $(foreach s,${SYSTEMS},$s/eval) +reset-lm: + -rm -rf lm +reset-all: reset-lm reset-aln + -rm -rf $(wildcard crp/trn/*/[ct]* crp/dev/[ct]* crp/tst/[ct]*) + -rm -rf auxiliary diff --git a/contrib/m4m/modules/#tune.make# b/contrib/m4m/modules/#tune.make# new file mode 100644 index 0000000000..edc7aa72d3 --- /dev/null +++ b/contrib/m4m/modules/#tune.make# @@ -0,0 +1,45 @@ +# -*- Makefile -*- +# make module for tuning a system + +tune.input ?= $(error missing +#tuned_moses_ini ?= tuning/moses.ini.${run_id} +#$(tuned_moses_ini): | ${untuned_moses_ini} +#$(tuned_moses_ini): | ${untuned_moses_ini} + +# make sure that all necessary variables are set +untuned_moses_ini ?= $(error Fatal error: the required variable untuned_moses_ini is not set) +tuning_input ?= $(error Fatal error: the required variable tuning_input is not set) +tuning_reference ?= $(error Fatal error: the required variable tuning_reference is not set) +tuning_itype ?= $(error Fatal error: the required variable tuning_itype is not set) +tuning_wdir ?= $(error Fatal error: the required variable tuning_wdir is not set) + +$tuning_root_dir ?= ${MOSES_ROOT} + + + +# default tuning parameters +mert.nbest ?= 100 +mert.decoder-threads ?= 4 +tuning/%/tmp/moses.ini: mertcmd = ${tune} +tuning/%/tmp/moses.ini: mert_flags += --working-dir $(CURDIR)/tuning/$*/tmp +tuning/%/tmp/moses.ini: mert_flags += --decoder-flags "${mert.decoder_flags} -inputtype ${input-type}" +tuning/%/tmp/moses.ini: mert_flags += --rootdir ${MOSES_ROOT}/scripts +tuning/%/tmp/moses.ini: mert_flags += --mertdir ${MOSES_BIN} +tuning/%/tmp/moses.ini: mert_flags += ${mert.options} +tuning/%/tmp/moses.ini: ${untuned_moses_ini} + $(info TUNING: ${tune} ${tune-src} ${tune-ref} ${decode} ${untuned_moses_ini} ${mert_flags}) + @mkdir -p $(@D) + @mkdir $@.lock + @echo $(call lockline) > $@.lock/owner + ${tune} ${mert_flags} ${tune-src} ${tune-ref} ${decode} ${untuned_moses_ini} + @rm $@.lock/owner + @rmdir $@.lock + +tuning/%/moses.tuned.ini: tuning/%/tmp/moses.ini + @mkdir -p $(@D) + @mkdir $@.lock + @echo $(call lockline) > $@.lock/owner + ${apply-weights} tuning/$*/tmp/moses.ini < ${untuned_moses_ini} > $@_ +mv $@_ $@ + @rm $@.lock/owner + @rmdir $@.lock diff --git a/contrib/m4m/modules/auxiliary.m4m b/contrib/m4m/modules/auxiliary.m4m new file mode 100644 index 0000000000..007b54914a --- /dev/null +++ b/contrib/m4m/modules/auxiliary.m4m @@ -0,0 +1,69 @@ +# -*- Makefile -*- +# +# AS A REGULAR M4M USER, YOU SHOULD NOT HAVE TO CHANGE ANYTHING IN THIS FILE +# + +################################################################################ +# Auxiliary functions # +################################################################################ + +# lock/unlock +# $(lock) creates a directory $@.lock to signal that the respective resource +# is under construction. The lock is removed upon successful resource creation. +# mkdir is defined as an atomic operation under POSIX, so directory creation +# is a safe way of creating a lock. We create a file with 'owner' information, +# so that we can check if the creating process is still +# call as: $(lock) + +ifneq ($(filter n,${MAKEFLAGS}),n) +define lock +@mkdir -p ${@D}; +@mkdir $@.lock +@echo "Started at $(shell date) by process $(shell echo $$PPID) on host $(shell hostname)" \ + > $@.lock/owner +endef +else +lock := +endif + +ifneq ($(filter n, ${MAKEFLAGS}),n) +define unlock +@rm $@.lock/owner; +@rmdir $@.lock +endef +else +unlock := +endif + +# clear_variable allows us to clear a variable from within a function +# the whitespace before and after appears to be necessary to ensure +# things happen at the beginning of a new line, and there's a new line after +define clear_variable + +$1 := + +endef + +define clear-ptables + +PTABLES := +PTABLE_ENTRIES := + +endef + +define clear-dtables + +DTABLES := +DTABLE_ENTRIES := + +endef + +define clear-lmodels + +LMODELS := +LMODEL_ENTRIES := + +endef +clear-locks: | $(shell find -L -type d -name '*.lock') + rm -rf $| + diff --git a/contrib/m4m/modules/eval-system.m4m b/contrib/m4m/modules/eval-system.m4m new file mode 100644 index 0000000000..04aa84b63f --- /dev/null +++ b/contrib/m4m/modules/eval-system.m4m @@ -0,0 +1,70 @@ +# -*- Makefile -*- + +moses.threads ?= 4 +moses.flags += -threads ${moses.threads} +moses.flags += -v 0 -t -text-type "test" -fd '${FACTORSEP}' + +%.multi-bleu: | %.cleaned + $(lock) + ${multi-bleu} ${bleu.ref} < $*.cleaned > $@_ && mv $@_ $@ + $(unlock) + +%.moses-out.wa: moses.flags += -alignment-output-file $*.output.wa +%.moses-out.wa: %.moses-out + +# .SECONDEXPANSION: +moses.ini ?= +%.moses-out: | ${moses.ini} + echo MOSES $^ + $(lock) + ${moses} -i ${moses.input} -inputtype ${moses.inputtype} \ + -f ${moses.ini} ${moses.flags} > $@_ && mv $@_ $@ + $(unlock) + +%.cleaned: %.moses-out + $(lock) + $(clean-decoder-output) < $< > $@_ && mv $@_ $@ + $(unlock) + +%.natcased: %.cleaned + $(eval $(call lock)) + $(detruecase) < $*.cleaned > $@_ && mv $@_ $@ + $(eval $(call unlock)) + + +# $1: output base name +# $2: system to be evaluated +# $3: evaluation input + +define bleu_eval + +EVALUATIONS += $1 +$1: moses.ini := $2 +$1: moses.input := $3 +$1: moses.inputtype := $(call guess-inputtype,$3) +$1: bleu.ref := $$(shell echo $(patsubst %.${L1},%.${L2},$3) | perl -pe 's?/cfn[^/]+/?/cased/?') +$1.moses-out: | $2 $3 +$1.multi-bleu: | $(call reffiles,$3,$(dir $(patsubst %/,%,$(dir $3)))) +$1: | $1.multi-bleu + +endef + +EVALUATIONS := + +eval.sets ?= $(patsubst %.${L1}.gz,%,$(subst /raw/,/cased/,$(wildcard ${WDIR}/crp/tst/raw/*.${L1}.gz))) + +ifdef tune.runs +define bleu_score_all_systems + +$(foreach system,${SYSTEMS},\ +$(foreach tuneset,${tune.sets},\ +$(foreach evalset,${eval.sets},\ +$(foreach run,$(shell seq ${tune.runs}),\ +$(eval $(call bleu_eval,\ +${system}/eval/$(notdir ${tuneset})/${run}/$(notdir ${evalset}),\ +${system}/tuned/$(notdir ${tuneset})/${run}/moses.ini,\ +${evalset}.${L1},${moses.inputtype.plaintext},${evalset}.${L2})))))) + +endef +endif + diff --git a/contrib/m4m/modules/fastalign.m4m b/contrib/m4m/modules/fastalign.m4m new file mode 100644 index 0000000000..7b75263245 --- /dev/null +++ b/contrib/m4m/modules/fastalign.m4m @@ -0,0 +1,85 @@ +# -*- makefile -*- +# M4M module for word alignment with fast_align +# see http://aclweb.org/anthology-new/N/N13/N13-1073 (paper) +# see https://github.com/clab/fast_align (github) + +fstaln ?= ${WDIR}/crp/trn/aln/fast +fstaln.in = $(addprefix ${WDIR}/crp/trn/pll/clean/, ${pllshards}) +# symal +symal_grow_diag_final_and = -a=g -d=yes -f=yes -b=yes +symal_args = ${symal_grow_diag_final_and} + +fastalign: | pll-ready +fastalign: options = -d -v -o +fastalign: $(fstaln)/${L1}.txt.gz +fastalign: $(fstaln)/${L2}.txt.gz +fastalign: $(fstaln)/${L1}-${L2}.symal.gz + +.INTERMEDIATE: $(fstaln)/tmp/${L1}-${L2}.fwd.gz +.INTERMEDIATE: $(fstaln)/tmp/${L1}-${L2}.bwd.gz +$(fstaln)/${L1}-${L2}.symal.gz: | $(fstaln)/tmp/${L1}-${L2}.fwd.gz +$(fstaln)/${L1}-${L2}.symal.gz: | $(fstaln)/tmp/${L1}-${L2}.bwd.gz +$(fstaln)/${L1}-${L2}.symal.gz: | $(fstaln)/${L1}.txt.gz +$(fstaln)/${L1}-${L2}.symal.gz: | $(fstaln)/${L2}.txt.gz + $(lock) + ${m4mdir}/scripts/fast-align2bal.py \ + <(zcat $(fstaln)/${L1}.txt.gz) \ + <(zcat $(fstaln)/${L2}.txt.gz) \ + <(zcat $(fstaln)/tmp/${L1}-${L2}.fwd.gz) \ + <(zcat $(fstaln)/tmp/${L1}-${L2}.bwd.gz) \ + | ${symal} ${symal_args} | gzip > $@_ && mv $@_ $@ + rm -rf $(fstaln)/tmp + $(unlock) + +.INTERMEDIATE: $(fstaln)/tmp/${L1}-${L2}.txt +$(fstaln)/tmp/${L1}-${L2}.txt: | $(fstaln)/${L1}.txt.gz +$(fstaln)/tmp/${L1}-${L2}.txt: | $(fstaln)/${L2}.txt.gz + $(lock) + paste -d '\t' <(zcat $(fstaln)/${L1}.txt.gz) <(zcat $(fstaln)/${L2}.txt.gz) \ + | perl -pe 's/\t/ \|\|\| /' > $@_ && mv $@_ $@ + $(unlock) + +$(fstaln)/tmp/${L1}-${L2}.fwd.gz: options ?= +$(fstaln)/tmp/${L1}-${L2}.fwd.gz: | $(fast_align) +$(fstaln)/tmp/${L1}-${L2}.fwd.gz: | $(fstaln)/tmp/${L1}-${L2}.txt +$(fstaln)/tmp/${L1}-${L2}.fwd.gz: + $(lock) + ${fast_align} -i ${@D}/${L1}-${L2}.txt ${options} | gzip > $@_ && mv $@_ $@ + $(unlock) + +$(fstaln)/tmp/${L1}-${L2}.bwd.gz: options ?= +$(fstaln)/tmp/${L1}-${L2}.bwd.gz: | $(fast_align) +$(fstaln)/tmp/${L1}-${L2}.bwd.gz: | $(fstaln)/tmp/${L1}-${L2}.txt +$(fstaln)/tmp/${L1}-${L2}.bwd.gz: + $(lock) + ${fast_align} -r -i ${@D}/${L1}-${L2}.txt ${options} | gzip > $@_ && mv $@_ $@ + $(unlock) + +$(fstaln)/${L2}.txt.gz: | $(addsuffix .${L2}.gz, ${fstaln.in}) + $(lock) +ifeq ($(words ${pllshards}),1) + @cp -l $| $@ || cp $| $@ +else + @cat $| > $@_ && mv $@_ $@ +endif + $(unlock) + +$(fstaln)/${L1}.txt.gz: | $(addsuffix .${L1}.gz, ${fstaln.in}) + $(lock) +ifeq ($(words ${pllshards}),1) + @cp -l $| $@ || cp $| $@ +else + @cat $| > $@_ && mv $@_ $@ +endif + $(unlock) + +# install fast-align if you don't have it +fast-align.git = https://github.com/clab/fast_align.git +${fast_align}: + $(lock) + git clone ${fast-align.git} + cd fast_align && make + mkdir -p $(dir ${fast_align}) + cp fast_align/fast_align $(dir ${fast_align}) + rm -rf fast_align + $(unlock) diff --git a/contrib/m4m/modules/init.m4m b/contrib/m4m/modules/init.m4m new file mode 100644 index 0000000000..99926d804c --- /dev/null +++ b/contrib/m4m/modules/init.m4m @@ -0,0 +1,33 @@ +# -*- Makefile -*- +.SUFFIXES: # no implicit rules +.SECONDARY: # keep all files created during the make run + +# In this module we initialize a number of variables that we use throughout M4M. +# The 'empty' := assignments are essential; they tell /make/ not to expand variables +# recursively but upon assignment. + +# standard features with one weight each +STANDARD_FEATURES := UnknownWordPenalty WordPenalty Distortion +WEIGHTS := $(foreach x,$(STANDARD_FEATURES),$x0=;1.0) +PTABLE_ENTRIES := +DTABLE_ENTRIES := +LMODEL_ENTRIES := +MOSES_INI_PREREQ := +MY_ENTRY := +TUNED_SYSTEMS := +DTABLES := +PTABLES := +LMODELS := +INPUT_FEATURES ?= +export MY_EXPERIMENT := + + +SHELL = bash +MAKEFLAGS += --warn-undefined-variables +.DEFAULT_GOAL = all + +# a little hack to be able to refer to a blank (in text substitution, for example) +space := +space += +comma := , + diff --git a/contrib/m4m/modules/kenlm.m4m b/contrib/m4m/modules/kenlm.m4m new file mode 100644 index 0000000000..ae9885d53b --- /dev/null +++ b/contrib/m4m/modules/kenlm.m4m @@ -0,0 +1,36 @@ +# -*- Makefile -*- + +# default parameters + +kenlm.order ?= 5 +kenlm.memory ?= 10% +kenlm.type ?= probing +kenlm.lazy ?= 1 +kenlm.factor ?= 0 + +%.kenlm: + $(lock) + zcat -f $| | ${kenlm.build} -o ${kenlm.order} -S${kenlm.memory} \ + | ${kenlm.binarize} ${kenlm.type} /dev/stdin $@_ + mv $@_ $@ + $(unlock) + + +# $1: name of LM file +# $2: order of model +# $3: factors +# $4: lazy loading? +define add_kenlm + +ffname := LM$(words ${LMODEL_ENTRIES}) +MY_ENTRY := KENLM +MY_ENTRY += name=$$(ffname) +MY_ENTRY += order=$2 +MY_ENTRY += factor=$3 +MY_ENTRY += num-features=1 +MY_ENTRY += lazyken=0 +MY_ENTRY += path=$(abspath $1) +LMODEL_ENTRIES += $$(subst $$(space),;,$${MY_ENTRY}) +LMODELS += $(abspath $1) + +endef diff --git a/contrib/m4m/modules/m4m.m4m b/contrib/m4m/modules/m4m.m4m new file mode 100644 index 0000000000..1a88e80b5a --- /dev/null +++ b/contrib/m4m/modules/m4m.m4m @@ -0,0 +1,20 @@ +# -*- Makefile -*- +.SUFFIXES: +.DEFAULT_GOAL := all + +m4mdir := $(patsubst %modules/,%,\ + $(dir $(word $(words $(MAKEFILE_LIST)),\ + $(MAKEFILE_LIST)))) +# $(info M4MDIR is ${m4mdir}) + +# m4m modules to be included +M4M_MODULES := auxiliary init +M4M_MODULES += tools moses-parameters prepare-corpus +M4M_MODULES += mgiza fastalign mmbitext phrase-table moses-ini +M4M_MODULES += tune-moses eval-system kenlm + +NUMCORES = $(shell parallel --number-of-cores) +SHARDSIZE = 100000 + +# include all make modules +$(foreach m,${M4M_MODULES}, $(eval include $(m4mdir)modules/$m.m4m);) diff --git a/contrib/m4m/modules/mgiza.m4m b/contrib/m4m/modules/mgiza.m4m new file mode 100644 index 0000000000..e91533ebe4 --- /dev/null +++ b/contrib/m4m/modules/mgiza.m4m @@ -0,0 +1,190 @@ +# -*- makefile -*- +# +# Makefile module for GIZA++ alignment (with mgiza) +# (c) 2011-2012 Ulrich Germann + +# --- Training Parameters ------------------------------------------------------ +# +# mkcls: -n: iterations -c: classes. No space allowed after -n/-c! +mkcls_args = -n10 -c50 + +# giza training +%/mgiza.cfg: m1=5 +%/mgiza.cfg: m2=0 +%/mgiza.cfg: mh=5 +%/mgiza.cfg: m3=3 +%/mgiza.cfg: m4=3 +%/mgiza.cfg: nodumps=0 +%/mgiza.cfg: onlyaldumps=0 +%/mgiza.cfg: model4smoothfactor=0.4 +%/mgiza.cfg: nsmooth=4 +%/mgiza.cfg: NCPUS=8 + +# symal +symal_grow_diag_final_and = -a=g -d=yes -f=yes -b=yes +symal_args = ${symal_grow_diag_final_and} + +# ------------------------------------------------------------------------------ +# You should not have to edit anything below this line +# ------------------------------------------------------------------------------ +gizaln = ${WDIR}/crp/trn/aln/giza +giztmp = $(gizaln)/tmp +gizout = $(gizaln) +gizaln.in = ${WDIR}/crp/trn/pll/clean/ + +.PHONY: giza giza-prep + +giza: | $(gizout)/${L1}.txt.gz +giza: | $(gizout)/${L2}.txt.gz +giza: | $(gizout)/${L1}-${L2}.symal.gz + @echo "GIZA WORD ALIGNMENT COMPLETE!" + +other = $(if $(findstring $(1),${L1}),${L2},${L1}) +fwd = $(1)-$(call other,$(1)) +bwd = $(call other,$(1))-$(1) + +$(gizout)/${L1}.txt.gz: a3file = $(gizout)/${L2}-${L1}.A3.final.gz +$(gizout)/${L1}.txt.gz: | $(gizout)/${L2}-${L1}.A3.final.gz + $(lock) + (zcat $(a3file) | perl -ne 'print if ++$$ctr%3 == 2;' | gzip > $@_) && mv $@_ $@ + $(unlock) + +$(gizout)/${L2}.txt.gz: a3file = $(gizout)/${L1}-${L2}.A3.final.gz +$(gizout)/${L2}.txt.gz: | $(gizout)/${L1}-${L2}.A3.final.gz + $(lock) + (zcat $(a3file) | perl -ne 'print if ++$$ctr%3 == 2;' | gzip > $@_) && mv $@_ $@ + $(unlock) + +$(gizout)/${L1}-${L2}.symal.gz: A3fwd = $(gizout)/${L1}-${L2}.A3.final.gz +$(gizout)/${L1}-${L2}.symal.gz: A3bwd = $(gizout)/${L2}-${L1}.A3.final.gz +$(gizout)/${L1}-${L2}.symal.gz: | $(gizout)/${L1}-${L2}.A3.final.gz +$(gizout)/${L1}-${L2}.symal.gz: | $(gizout)/${L2}-${L1}.A3.final.gz $(giza2bal.pl) + $(lock) + $(giza2bal.pl) -d 'gunzip -c ${A3fwd}' -i 'gunzip -c ${A3bwd}' \ + | $(symal) $(symal_args) | perl -pe 's/^.*{##}\s+//' | gzip > $@_ && mv $@_ $@ + $(unlock) + +# merge alignments produced by mgiza +$(gizout)/%.A3.final.gz: | $(giztmp)/%/mgiza.DONE + mkdir -p ${@D} + $(lock) + $(mgiza.merge) $(shell ls $(giztmp)/$*/$*.A3.final.part* 2>/dev/null) | gzip > $@_ + mv $@_ $@ + $(unlock) + +# run mgiza: +%/mgiza.DONE: | %/mgiza.cfg + $(lock) + $(mgiza) $| && touch $@ + $(unlock) + +$(giztmp) $(gizout): + mkdir -p $@ + +# --- run mkcls (to get word classes) ------------------------------------------ +# ATTENTION: mkcls does not accept spaces between option markers and +# option arguments mkcls -n 10 -c 50 ... will make it fail! +# mkcls_classes and mkcls_iterations should be set in parameters.mak +stream = find -L $(1) -type f -name "*.$(2)" -or -name "*.$(2).gz" | sort | xargs zcat -f +mkcls_cmd = $(call stream,$(1),$(2)) | ${mkcls} $(mkcls_args) -p/dev/stdin -V$(3) opt +# mkcls: -n: iterations +# mkcls: -c: classes +# mkcls: -p: input data +# mkcls: -V: word classes (output) + +$(giztmp)/%.vcb.classes: ${mkcls} +$(giztmp)/%.vcb.classes: | $(gizaln.in) + @echo CREATING $@ + $(lock) + mkdir -p $(@D) + @$(call mkcls_cmd,$|,$*,$@_) && mv $@_ $@ + @mv $@_.cats $@.cats + $(unlock) + +# NUMBERIZED CORPUS FOR GIZA +$(giztmp)/${L1}.vcb: | $(giztmp)/${L1}-${L2}.snt +$(giztmp)/${L1}.vcb: | $(giztmp)/${L1}-${L2}.snt +$(giztmp)/${L2}.vcb: | $(giztmp)/${L1}-${L2}.snt +$(giztmp)/${L2}-${L1}.snt: | $(giztmp)/${L1}-${L2}.snt +#$(info $(addprefix $(pll-clean), .${L1}.gz)) +$(giztmp)/${L1}-${L2}.snt: L1files = $(addsuffix .${L1}.gz, $(pll-clean)) +$(giztmp)/${L1}-${L2}.snt: L2files = $(addsuffix .${L2}.gz, $(pll-clean)) +$(giztmp)/${L1}-${L2}.snt: | $(giztmp) +$(giztmp)/${L1}-${L2}.snt: | $(addsuffix .${L1}.gz, $(pll-clean)) +$(giztmp)/${L1}-${L2}.snt: | $(addsuffix .${L2}.gz, $(pll-clean)) + $(lock) + $(plain2snt) \ + <(ls $(L1files) | xargs zcat -f) \ + <(ls $(L2files) | xargs zcat -f) \ + -vcb1 $(giztmp)/${L1}.vcb_ -vcb2 $(giztmp)/${L2}.vcb_ \ + -snt1 $(giztmp)/${L1}-${L2}.snt_ -snt2 $(giztmp)/${L2}-${L1}.snt_ + mv $(giztmp)/${L1}.vcb_ $(giztmp)/${L1}.vcb + mv $(giztmp)/${L2}.vcb_ $(giztmp)/${L2}.vcb + mv $(giztmp)/${L1}-${L2}.snt_ $(giztmp)/${L1}-${L2}.snt + mv $(giztmp)/${L2}-${L1}.snt_ $(giztmp)/${L2}-${L1}.snt + $(unlock) + +# .cooc files +$(giztmp)/${L1}-${L2}.cooc: V1 = $(giztmp)/${L1}.vcb +$(giztmp)/${L1}-${L2}.cooc: V2 = $(giztmp)/${L2}.vcb +$(giztmp)/${L2}-${L1}.cooc: V1 = $(giztmp)/${L2}.vcb +$(giztmp)/${L2}-${L1}.cooc: V2 = $(giztmp)/${L1}.vcb +$(giztmp)/%.cooc: | $(giztmp)/%.snt + @echo CREATING $@ + $(lock) + $(snt2cooc) $@_ ${V1} ${V2} $| && mv $@_ $@ + $(unlock) + +################################################################################ +# MGIZA CONFIG FILE: +# +$(giztmp)/%/mgiza.cfg: SHELL=bash +# --- CORPUS RESOURCES --------------------------------------------------------- +$(giztmp)/%/mgiza.cfg: V1 = $(giztmp)/${FROM}.vcb +$(giztmp)/%/mgiza.cfg: V2 = $(giztmp)/${TO}.vcb +$(giztmp)/%/mgiza.cfg: SNT = $(giztmp)/${FROM}-${TO}.snt +$(giztmp)/%/mgiza.cfg: COOC = $(giztmp)/${FROM}-${TO}.cooc +$(giztmp)/%/mgiza.cfg: ODIR = $(giztmp)/${FROM}-${TO}/${FROM}-${TO} +#$(giztmp)/%/mgiza.cfg: | $(giztmp)/%.cooc $(giztmp)/%.snt +$(giztmp)/${L1}-${L2}/mgiza.cfg: FROM = ${L1} +$(giztmp)/${L1}-${L2}/mgiza.cfg: TO = ${L2} +$(giztmp)/${L2}-${L1}/mgiza.cfg: FROM = ${L2} +$(giztmp)/${L2}-${L1}/mgiza.cfg: TO = ${L1} +$(giztmp)/${L1}-${L2}/mgiza.cfg: | $(giztmp)/${L1}-${L2}.cooc +$(giztmp)/${L1}-${L2}/mgiza.cfg: | $(giztmp)/${L1}-${L2}.snt +$(giztmp)/${L2}-${L1}/mgiza.cfg: | $(giztmp)/${L2}-${L1}.cooc +$(giztmp)/${L2}-${L1}/mgiza.cfg: | $(giztmp)/${L2}-${L1}.snt +$(giztmp)/${L1}-${L2}/mgiza.cfg \ +$(giztmp)/${L2}-${L1}/mgiza.cfg: | \ + $(giztmp)/${L1}.vcb $(giztmp)/${L1}.vcb.classes \ + $(giztmp)/${L2}.vcb $(giztmp)/${L2}.vcb.classes + mkdir -p $(dir $@) + touch $@ + @echo "s ${V1}" >> $@ + @echo "t ${V2}" >> $@ + @echo "c ${SNT}" >> $@ + @echo "cooc ${COOC}" >> $@ + @echo "m1 ${m1}" >> $@ + @echo "m2 ${m2}" >> $@ + @echo "mh ${mh}" >> $@ + @echo "m3 ${m3}" >> $@ + @echo "m4 ${m4}" >> $@ + @echo "t1 ${m1}" >> $@ + @echo "t2 ${m2}" >> $@ + @echo "th ${mh}" >> $@ + @echo "t3 ${m3}" >> $@ + @echo "t4 ${m4}" >> $@ + @echo "o ${ODIR}" >> $@ + @echo "model4smoothfactor ${model4smoothfactor}" >> $@ + @echo "onlyaldumps ${onlyaldumps}" >> $@ + @echo "nodumps ${nodumps}" >> $@ + @echo "nsmooth ${nsmooth}" >> $@ + @echo "NCPUS ${NCPUS}" >> $@ +# # ------------------------------------------------------------------------------ +# sanity checks +ifeq ($(gizaln),) +$(warning Giza base directory not defined) +endif +ifeq ($(gizaln.in),) +$(warning No directory for Giza++ training data specified!) +endif diff --git a/contrib/m4m/modules/mmbitext.m4m b/contrib/m4m/modules/mmbitext.m4m new file mode 100644 index 0000000000..5215fe0dce --- /dev/null +++ b/contrib/m4m/modules/mmbitext.m4m @@ -0,0 +1,44 @@ +# -*- makefile -*- + +# Makefile for building a Moses system from a word-aligned corpus +# (c) 2011 - 2012 Ulrich Germann + +define mmap_ttrack + +$2/$(notdir $1).mct: | $2/$(notdir $1).tdx +$2/$(notdir $1).tdx: | $2/$(notdir $1).sfa +$2/$(notdir $1).sfa: | $(strip $1).txt.gz + $$(lock) + zcat -f $(strip $1).txt.gz \ + | ${MOSES_BIN}/mtt-build -i -o $$@.lock/$$(basename $${@F}) + mv $$@.lock/$$(basename $${@F}).tdx $${@D} + mv $$@.lock/$$(basename $${@F}).sfa $${@D} + mv $$@.lock/$$(basename $${@F}).mct $${@D} + $$(unlock) + +endef + +# $1: base name of word-aligned corpus in text format +# $2: directory for mmapped bitext +define mmap_bitext + +$(call mmap_ttrack,$1${L1},$2) +$(call mmap_ttrack,$1${L2},$2) +$2/$(notdir $1)${L1}-${L2}.mam: SYMAL = $(strip $1)${L1}-${L2}.symal.gz +$2/$(notdir $1)${L1}-${L2}.mam: | $(strip $1)${L1}-${L2}.symal.gz + $$(lock) + zcat -f $${SYMAL} | ${MOSES_BIN}/symal2mam $$@_ && mv $$@_ $$@ + $$(unlock) + +$2/$(notdir $1)${L1}-${L2}.lex: | $2/$(notdir $1)${L1}.mct +$2/$(notdir $1)${L1}-${L2}.lex: | $2/$(notdir $1)${L2}.mct +$2/$(notdir $1)${L1}-${L2}.lex: | $2/$(notdir $1)${L1}-${L2}.mam + $$(lock) + ${MOSES_BIN}/mmlex-build $2/$(notdir $1) ${L1} ${L2} \ + -o $$@.lock/$${@F} -c $$@.lock/$$(basename $${@F}).coc + mv $$@.lock/$${@F} $${@D} + mv $$@.lock/$$(basename $${@F}).coc $${@D} + $$(unlock) + +endef + diff --git a/contrib/m4m/modules/moses-ini.m4m b/contrib/m4m/modules/moses-ini.m4m new file mode 100644 index 0000000000..03155597b7 --- /dev/null +++ b/contrib/m4m/modules/moses-ini.m4m @@ -0,0 +1,62 @@ +# -*- makefile -*- +# ------------------------------------------------------------------------------- +# --- generate initial moses.ini file ------------------------------------------- +# ------------------------------------------------------------------------------- +# Defaults; can be overwritten in the respective system.make file +# It is recommended that you use target-specific overrides. +moses.ini_input-factors = 0 +moses.ini_search-algorithm = 1 +moses.ini_stack = 5000 +moses.ini_cube-pruning-pop-limit = 5000 +moses.ini_mapping = 0 T 0 +moses.ini_ttable-limit = 20 +moses.ini_distortion-limit = 6 +moses.ini_v = 0 + +weight_vector = perl -ne \ +'m/name=([^; ]+)/;\ +print "$$1=";\ +m/num-features=([0-9]+)/;\ +print " 1.0"x$$1,"\n";' + +define create_moses_ini + +$(strip $1)/moses.ini.0: ${PTABLES} ${DTABLES} ${LMODELS} ${MOSES_INI_PREREQ} + $$(lock) + echo '[input-factors]' > $$@_ + echo '$${moses.ini_input-factors}' >> $$@_ + echo >> $$@_ + echo '[search-algorithm]' >> $$@_ + echo '$${moses.ini_search-algorithm}' >> $$@_ + echo >> $$@_ + echo '[stack]' >> $$@_ + echo '$${moses.ini_stack}' >> $$@_ + echo >> $$@_ + echo '[cube-pruning-pop-limit]' >> $$@_ + echo '$${moses.ini_cube-pruning-pop-limit}' >> $$@_ + echo >> $$@_ + echo '[mapping]' >> $$@_ + echo '$${moses.ini_mapping}' >> $$@_ + echo >> $$@_ + echo '[distortion-limit]' >> $$@_ + echo '$${moses.ini_distortion-limit}' >> $$@_ + echo >> $$@_ + echo '[v]' >> $$@_ + echo '$${moses.ini_v}' >> $$@_ + echo >> $$@_ + echo '[feature]' >> $$@_ + $$(foreach f,${STANDARD_FEATURES},echo $$f >> $$@_;) + $$(foreach i,${INPUT_FEATURES},echo "$$(subst ;, ,$${i})" >> $$@_;) + $$(foreach pt,${PTABLE_ENTRIES},echo "$$(subst ;, ,$${pt})" >> $$@_;) + $$(foreach dt,${DTABLE_ENTRIES},echo "$$(subst ;, ,$${dt})" >> $$@_;) + $$(foreach lm,${LMODEL_ENTRIES},echo "$$(subst ;, ,$${lm})" >> $$@_;) + echo >> $$@_ + echo '[weight]' >> $$@_ + $$(foreach x,$(STANDARD_FEATURES),echo "$$x0= 1.0" >> $$@_;) + $$(foreach i,${INPUT_FEATURES},echo '$$i' | $${weight_vector} >> $$@_;) + $$(foreach x,${PTABLE_ENTRIES},echo '$$x' | $${weight_vector} >> $$@_;) + $$(foreach x,${DTABLE_ENTRIES},echo '$$x' | $${weight_vector} >> $$@_;) + $$(foreach x,${LMODEL_ENTRIES},echo '$$x' | $${weight_vector} >> $$@_;) + mv $$@_ $$@ + $$(unlock) +endef diff --git a/contrib/m4m/modules/moses-parameters.m4m b/contrib/m4m/modules/moses-parameters.m4m new file mode 100644 index 0000000000..d3c66b8086 --- /dev/null +++ b/contrib/m4m/modules/moses-parameters.m4m @@ -0,0 +1,57 @@ +# -*- makefile -*- +casing1 ?= truecase +casing2 ?= truecase +word-alignment ?= fast +moses.threads = $(shell parallel --number-of-cores) + +# numerical constants for moses +moses.inputtype.plaintext = 0 + +PHRASE_TABLES = $(ptable) +LANGUAGE_MODELS = $(lmodel) +DISTORTION_MODELS = $(lexdm) + +# defaults +ptable = model/tm/bin/${L1}-${L2} +lmodel = model/lm/${L2}/kenlm +lexdm_specs = wbe-mslr-bidirectional-fe-allff +lexdm = model/dm/bin/${L1}-${L2}/${dflt_lexdmodel_specs} + +ptable.max-phrase-length ?= 7 +ptable.smoothing ?= --GoodTuring +ptable.source-factors ?= 0 +ptable.target-factors ?= 0 +ptable.num-features ?= 5 +ptable.implemetation ?= 1 +# reminder: implementation types: +# 0 - text +# 1 - binary via processPhraseTable +# 14 - based on dynamic suffix arrays + +# if you don't provide the phrase table, you must +# specify the components of the word-aligned corpus +# as target-specific variable assignments +model/tm/bin/${L1}-${L2}: ptable.L1_text = ${ +model/tm/bin/${L1}-${L2}: ptable.smoothing = --GoodTuring + +# source corpus and parameters here: + + +# reordering model +dmodel.type = wbe +dmodel.orientation = mslr +dmodel.direction = bidirectional +dmodel.language = fe +dmodel.collapsing = allff +dmodel.smooth = 0.5 +dmodel.num-feats = 9 +dmodel.description = $(addprefix ${dmodel.type}-${dmodel.orientation}-,\ + ${dmodel.direction}-${dmodel.language}-${dmodel.collapsing}) +distortion-limit = 6 + +# DEFAULT TUNING PARAMETERS +FACTORSEP ?= \n +mert.nbest = 100 +mert.extra-flags ?= +mert.extra-flags += --no-filter-phrase-table +mert.decoder-flags = -threads ${moses.threads} -fd '${FACTORSEP}' diff --git a/contrib/m4m/modules/obsolete/Makefile b/contrib/m4m/modules/obsolete/Makefile new file mode 100644 index 0000000000..f785a03541 --- /dev/null +++ b/contrib/m4m/modules/obsolete/Makefile @@ -0,0 +1,64 @@ +# -*- Makefile -*- +# Mandatory at the beginning of the file, before m4m inclusions + +# L1,L2: tags that identify translation source (L1) +# and translation target (L2) language +L1 ?= de +L2 ?= en + +LL = $(word 1, $(sort ${L1} ${L2}))-$(word 2, $(sort ${L1} ${L2})) +# a name for this experiment +experiment = dynsa-vs-std-phrase-table + +# the working directry +WDIR = $(CURDIR) +MOSES_ROOT = ${HOME}/code/moses/master/mosesdecoder + +# include m4m boilerplate +include ${MOSES_ROOT}/contrib/m4m/modules/m4m.m4m + +$(info M4MDIR=${m4mdir}) + +#include ${m4mdir}/baseline-system.make +#include ${m4mdir}dynsa-system.make +#$(info ${MY_EXPERIMENT}) + +tune.sets = $(subst /raw/,/cased/,$(wildcard crp/dev/raw/*.${L1}.gz)) + +all: +.PHONY: all + +ifdef tune.runs +$(foreach tuneset, $(word 1,${tune.sets:.${L1}.gz=}),\ +$(foreach run,$(shell seq ${tune.runs}),\ + $(eval $(call tune_system,baseline/moses.ini.0,\ + baseline/tuned/$(notdir ${tuneset})/${run}/moses.ini,\ + ${tuneset}.${L1},${tuneset}.${L2},0));\ + $(if ,$(info $(call tune_system,baseline/moses.ini.0,\ + baseline/tuned/$(notdir ${tuneset})/${run}/moses.ini,\ + ${tuneset}.${L1},${tuneset}.${L2},0));)\ + $(eval $(call copy_weights,dynsa/moses.ini.0,\ + baseline/tuned/$(notdir ${tuneset})/${run}/moses.ini,\ + dynsa/tuned/$(notdir ${tuneset})/${run}/moses.ini));\ + $(if ,$(info $(call copy_weights,dynsa/moses.ini.0,\ + baseline/tuned/$(notdir ${tuneset})/${run}/moses.ini,\ + dynsa/tuned/$(notdir ${tuneset})/${run}/moses.ini));)\ + $(foreach evalset,$(word 2,${tune.sets:.${L1}.gz=}),\ + $(foreach system,baseline dynsa,\ + $(eval evaltarget:=${system}/eval/$(notdir ${tuneset})/${run}/$(notdir ${evalset}));\ + $(eval $(call bleu_eval,${evaltarget},\ + ${system}/tuned/$(notdir ${tuneset})/${run}/moses.ini,\ + ${evalset}.${L1},${moses.inputtype.plaintext},${evalset}.${L2}));\ + $(if ,$(info $(call bleu_eval,${evaltarget},\ + ${system}/tuned/$(notdir ${tuneset})/${run}/moses.ini,\ + ${evalset}.${L1},${moses.inputtype.plaintext},${evalset}.${L2}));)\ + ));\ +)) + +all: ${EVALUATIONS} + echo EVALS ${EVALUATIONS} +else +all: + $(foreach n,$(shell seq 1 1),${MAKE} tune.runs="$n $n";) +endif + diff --git a/contrib/m4m/modules/obsolete/baseline-system.m4m b/contrib/m4m/modules/obsolete/baseline-system.m4m new file mode 100644 index 0000000000..4125c8e718 --- /dev/null +++ b/contrib/m4m/modules/obsolete/baseline-system.m4m @@ -0,0 +1,48 @@ +# -*- Makefile -*- + +# This module defines a simple phrase-based baseline system +# - a single corpus +# - no factors +# - single ttable +# - single distortion model + +# chose a name for the system +# ${system}/moses.ini.0 then defines the system +system = baseline +SYSTEMS += ${system} +.PHONY: ${system} +${system}: ${system}/moses.ini.0 + +################################################################################# +# +# Create phrase table(s) and distortion model(s) that you want to use in this +# system. If you already have binary or text version of all tables, you don't +# need to specify pll.{txt1,txt2,aln}. +pll.txt1 = ${WDIR}/crp/trn/aln/fast/${L1}.txt.gz +pll.txt2 = ${WDIR}/crp/trn/aln/fast/${L2}.txt.gz +pll.aln = ${WDIR}/crp/trn/aln/fast/${L1}-${L2}.symal.gz +ptable = ${WDIR}/model/tm/ptable.${L1}-${L2} +dtable = ${WDIR}/model/dm/dtable.${L1}-${L2} +ptable.max-phrase-length = 7 +# ptable.smoothing = --GoodTuring +# dmodels = wbe-mslr-bidirectional-fe-allff + +LMODEL_ENTRIES = KENLM;name=KENLM0;order=5;factor=0;num-features=1;lazyken=0;path=$(abspath lm/europarl-v7.en.kenlm) +LMODELS = lm/europarl-v7.en.kenlm + +MY_EXPERIMENT += $(call add_binary_phrase_table,0,0,5,${ptable}) +$(eval $(call add_binary_phrase_table,0,0,5,${ptable})) + +if 0 +MY_EXPERIMENT += $(call add_binary_reordering_table,0,0,8,\ + wbe-mslr-bidirectional-fe-allff,${dtable},${ptable}) +$(eval $(call add_binary_reordering_table,0,0,8,\ + wbe-mslr-bidirectional-fe-allff,${dtable},${ptable})) +endif + +MY_EXPERIMENT += $(call create_moses_ini,${system}) +$(eval $(call create_moses_ini,${system})) + +################################################################################# + + diff --git a/contrib/m4m/modules/obsolete/decode.m4m b/contrib/m4m/modules/obsolete/decode.m4m new file mode 100644 index 0000000000..4388361206 --- /dev/null +++ b/contrib/m4m/modules/obsolete/decode.m4m @@ -0,0 +1,40 @@ +# -*- Makefile -*- +# Make module for translating some input. +# the make module that specifies the target must also +# set some specific variables + +decoder-settings = -threads 4 -v 0 -t -text-type "test" + +# What does the -t switch do? +# What's the purpose of -text-type "test" ? + +%.output.${run-id}.wa: %.output.${run-id} +%.output.${run-id}: decoder-input-file ?= $(error no decoder input given) +%.output.${run-id}: decoder-input-type ?= $(error no decoder input type specified) +%.output.${run-id}: moses_ini ?= tuning/moses.ini.${run-id} +%.output.${run-id}: | ${moses_ini} +%.output.${run-id}: | ${decoder_input_file} +%.output.${run-id}: | decode_cmd = ${decode} ${decoder-settings} +%.output.${run-id}: | decode_cmd += -f ${moses_ini} +%.output.${run-id}: | decode_cmd += < -inputtype ${decoder-input-type} +%.output.${run-id}: | decode_cmd += < ${decoder-input-file} +%.output.${run-id}: + echo ${decoder-input-file} +# ifndef ${decoder-input-type} +# $(error Fatal error: decoder input type must be specified explicitly!) +# endif +# mkdir $@.lock +# echo $(call lockline) > $@.lock/owner +# ${decode} ${decoder-settings} -alignment-output-file $@.wa_ -f ${moses_ini} < ${decoder_input_file} > $@_ +# rm $@.lock/owner +# rmdir $@.lock + +.PNONEY = bla.output +bla.output: run-id = 0 +bla.output: decoder-input-file = bla.cfn +bla.output: decoder-input-type = 1 +bla.output: bla.output.${run-id} + + +boo.output.1: decoder-input-file = boo.txt +boo.output.0: decoder-input-type = 0 diff --git a/contrib/m4m/modules/obsolete/directory-structure.m4m b/contrib/m4m/modules/obsolete/directory-structure.m4m new file mode 100644 index 0000000000..6020f9141f --- /dev/null +++ b/contrib/m4m/modules/obsolete/directory-structure.m4m @@ -0,0 +1,7 @@ +# -*- Makefile -*- + +# STANDARD LOCATIONS +basedir ?= $(CURDIR) +tune.dir ?= ${basedir}/tune +eval.dir ?= ${basedir}/eval +input.dir ?= ${basedir}/input diff --git a/contrib/m4m/modules/obsolete/dynsa-system.m4m b/contrib/m4m/modules/obsolete/dynsa-system.m4m new file mode 100644 index 0000000000..0e637539b5 --- /dev/null +++ b/contrib/m4m/modules/obsolete/dynsa-system.m4m @@ -0,0 +1,12 @@ +# -*- Makefile -*- +# ${system}/moses.ini.0 then defines the system +system := dynsa +SYSTEMS += ${system} +.PHONY: ${system} +${system}: ${system}/moses.ini.0 +MY_EXPERIMENT += $(call clear_variable,PTABLE_ENTRIES) +MY_EXPERIMENT += $(call add_dynsa_phrase_table,0,0,5,${pll.txt1},${pll.txt2},${pll.aln}) +PTABLE_ENTRIES := +$(eval $(call add_dynsa_phrase_table,0,0,5,${pll.txt1},${pll.txt2},${pll.aln})) +MY_EXPERIMENT += $(call create_moses_ini,${system}) +$(eval $(call create_moses_ini,${system})) diff --git a/contrib/m4m/modules/obsolete/eval.m4m b/contrib/m4m/modules/obsolete/eval.m4m new file mode 100644 index 0000000000..d9241a520d --- /dev/null +++ b/contrib/m4m/modules/obsolete/eval.m4m @@ -0,0 +1,6 @@ +# -*- Makefile -*- + +%.multi-bleu: | %.cleaned + $(lock) + ${multi-bleu} ${bleu.ref} < $*.cleaned > $@_ && mv $@_ $@ + $(unlock) diff --git a/contrib/m4m/modules/obsolete/general.m4m b/contrib/m4m/modules/obsolete/general.m4m new file mode 100644 index 0000000000..7ae846b29d --- /dev/null +++ b/contrib/m4m/modules/obsolete/general.m4m @@ -0,0 +1,8 @@ +# -*- Makefile -*- + +%.gz: | % + $(lock) + gzip $* -o $@_ + mv $@_ $@ + $(unlock) + diff --git a/contrib/m4m/modules/obsolete/makefile.m4m b/contrib/m4m/modules/obsolete/makefile.m4m new file mode 100644 index 0000000000..8ab5ce8e33 --- /dev/null +++ b/contrib/m4m/modules/obsolete/makefile.m4m @@ -0,0 +1,18 @@ +# -*- Makefile -*- + +runs/%/Makefile: + mkdir -p $(@D) + mkdir $@.lock + echo $(call lockline) > $@.lock/owner + $(foreach e,${eval-sets}, \ + $(foreach m,${eval-metrics}, + echo "evaluation/$*/report: sets += set=$e,type=$m,file=evaluation/$*/$e.$m" >> $@_;) \ + echo "evaluation/$*/report: sets += set=$e,type=analysis-precision,file=evaluation/$*/$e.analysis" >> $@_; \ + echo "evaluation/$*/report: sets += set=$e,type=analysis-coverage,file=evaluation/$*/$e.analysis" >> $@_;) + $(foreach e,${eval-sets}, \ + $(foreach m,${eval-metrics}, + echo "evaluation/$*/report: evaluation/$*/$e.$m" >> $@_;) \ + echo "evaluation/$*/report: evaluation/$*/$e.analysis" >> $@_;) + mv $@_ $@ + rm $@.lock/owner + rmdir $@.lock diff --git a/contrib/m4m/modules/obsolete/model-filtering.m4m b/contrib/m4m/modules/obsolete/model-filtering.m4m new file mode 100644 index 0000000000..7b1933e6c5 --- /dev/null +++ b/contrib/m4m/modules/obsolete/model-filtering.m4m @@ -0,0 +1,37 @@ +# -*- Makefile -*- +# +# This module deals with model filtering (if necessary). +# It produces the moses.ini files for filtered models for +# tuning and evaluation. + +ifndef ${moses_ini_for_tuning} + moses_ini_for_tuning = # WHAT'S THE DEFAULT LOCATION FOR THIS IN EMS? +endif + +ifndef ${moses_ini_for_eval} + moses_ini_for_eval = # WHAT'S THE DEFAULT LOCATION FOR THIS IN EMS? +endif + +# filter models if suggested by set-up +ifneq (${moses_ini_for_tuning}, ${untuned_moses_ini}) + ${moses_ini_for_tuning}: | ${untuned_moses_ini} + ${moses_ini_for_tuning}: | ${tuning_input_ready} + + # phrase table in text format? + ifeq ($(shell grep -v '^ *\#' ${untuned_moses_ini} \ + | grep -A1 '\[ttable-file\]' | tail -n +2 \ + | head -n1 | awk '{print $$1}'),0) + # ADD PHRASE TABLE FILTERING COMMAND HERE + endif + + # how does moses know if a lexicalized distortion table is binary or not? + # ADD LEXICAL DISTORTION TABLE FILTERING COMMAND HERE + +ifneq (${moses_ini_for_eval),$(tuned_moses_ini)) + # add code for model filtering for eval here +endif + + + + + diff --git a/contrib/m4m/modules/obsolete/phrase-table.make.scratch b/contrib/m4m/modules/obsolete/phrase-table.make.scratch new file mode 100644 index 0000000000..81b869750b --- /dev/null +++ b/contrib/m4m/modules/obsolete/phrase-table.make.scratch @@ -0,0 +1,124 @@ +# .PHONY: $1 +# $1: $1.binphr.idx +# $1.txt.gz: | L1text = $4 +# $1.txt.gz: | L2text = $5 +# $1.txt.gz: | symal = $6 +# ${moses.ini}: $1 +# PTABLES += 1;$2;$3;5;$1 +# endef + + +# ${target}.tmp/fwd/scored.gz: | ${target}/phrase-extraction.DONE +# | ${L1File} ${L2File} ${symal} + + +# # convert phrase table from text file to binary format +# %.binphr.idx: | %.txt.gz ${MOSES_BIN}/processPhraseTable +# $(lock) +# zcat -f $*.txt.gz | ${MOSES_BIN}/processPhraseTable \ +# -ttable ${L1factors} ${L2factors} - -nscores 5 -out ${@D}/_${@F} \ +# && mv ${@D}/_${@F} $@ +# $(unlock) + + +# # directory definitions +# mo_mdl = model +# mo_tmp = model/tmp +# wrdaln = ${fstaln}/out +# # wrdaln should be set elsewhere! + +# # milestone files created during phrase table construction +# ptable_bin = ${mo_mdl}/ptable.${L1}-${L2} +# ptable = ${mo_mdl}/ptable.${L1}-${L2}.txt.gz +# lex1given2 = ${mo_mdl}/${L1}-given-${L2}.lex.gz +# lex2given1 = ${mo_mdl}/${L2}-given-${L1}.lex.gz +# mosesinifile = ${mo_mdl}/moses.ini.0 + +# .PHONY: lex ptable +# lex: ${lex1given2} ${lex2given1} +# ptable: ${ptable_bin} + +# # steps taken in this module + +# # ------------------------------------------------------------------------------- +# # --- STEP 1a: extract raw phrases from word-aligned corpus --------------------- +# # ------------------------------------------------------------------------------- +# # Note: the script ${moses.extract-phrases} takes care of initial sorting +# ${mo_tmp}/phrase-extraction.DONE: | ${moses.extract-phrases} +# ${mo_tmp}/phrase-extraction.DONE: | ${moses.extract} +# ${mo_tmp}/phrase-extraction.DONE: | ${wrdaln}/${L1}.txt.gz +# ${mo_tmp}/phrase-extraction.DONE: | ${wrdaln}/${L2}.txt.gz +# ${mo_tmp}/phrase-extraction.DONE: | ${wrdaln}/${L1}-${L2}.symal.gz +# ${mo_tmp}/phrase-extraction.DONE: +# $(lock) +# ${moses.extract-phrases} \ +# ${moses.extract} \ +# ${wrdaln}/${L1}.txt.gz \ +# ${wrdaln}/${L2}.txt.gz \ +# ${wrdaln}/${L1}-${L2}.symal.gz \ +# ${mo_tmp} ${max_phrase_length} \ +# ${dmodel.type}-${dmodel.orientation} \ +# && touch $@ +# $(unlock) + +# # ------------------------------------------------------------------------------- +# # --- STEP 1a: extract word translation lexica from word-aligned corpus --------- +# # --- (for lexical phrase scoring) --------- +# # ------------------------------------------------------------------------------- +# $(lex2given1): $(lex1given2) +# $(lex1given2): | ${wrdaln}/${L1}.txt.gz +# $(lex1given2): | ${wrdaln}/${L2}.txt.gz +# $(lex1given2): | ${wrdaln}/${L1}-${L2}.symal.gz +# $(lock) +# $(moses.make-lex) \ +# ${wrdaln}/${L1}.txt.gz \ +# ${wrdaln}/${L2}.txt.gz \ +# ${wrdaln}/${L1}-${L2}.symal.gz \ +# $(lex1given2) \ +# $(lex2given1) +# $(unlock) + +# # ------------------------------------------------------------------------------- +# # --- STEP 2: score extracted phrase pairs -------------------------------------- +# # ------------------------------------------------------------------------------- +# ptfwdhalf = ${mo_tmp}/fwd/phrases.fwd.scored.gz +# ptbwdhalf = ${mo_tmp}/bwd/phrase-scoring.DONE + +# # ------------------------------------------------------------------------------- +# # --- STEP 2a: score phrases in the 'forward' direction ------------------------- +# # ------------------------------------------------------------------------------- +# $(ptfwdhalf): | ${mo_tmp}/phrase-extraction.DONE +# $(ptfwdhalf): | ${lex1given2} +# $(lock) +# $(merge-sorted) ${mo_tmp}/fwd/part.*.gz \ +# | ${moses.score-phrases} ${MOSES_BIN}/score - ${lex1given2} ${@:.scored.gz=} \ +# $(ptable.smoothing) && mv $@_ $@ +# $(unlock) + +# # ------------------------------------------------------------------------------- +# # --- STEP 2b: score phrases in the 'backward' direction ------------------------- +# # ------------------------------------------------------------------------------- +# # Note: ${moses.score-phrases} re-sorts the scored backward phrases +# $(ptbwdhalf): | ${mo_tmp}/phrase-extraction.DONE +# $(ptbwdhalf): | ${lex2given1} +# $(lock) +# $(merge-sorted) ${mo_tmp}/bwd/part.*.gz \ +# | ${moses.score-phrases} ${MOSES_BIN}/score - ${lex2given1} ${@D}/scored \ +# "$(ptable.smoothing)" --Inverse && touch $@ +# $(unlock) + +# # ------------------------------------------------------------------------------- +# # --- STEP 3: put the two phrase table halves together -------------------------- +# # ------------------------------------------------------------------------------- +# # ptfwdhalf is a single .gz file, ptbwdhalf is a collection .gz files +# $(ptable): | ${MOSES_BIN}/consolidate +# $(ptable): | $(ptfwdhalf) $(ptbwdhalf) +# $(lock) +# ${MOSES_BIN}/consolidate \ +# <(zcat ${ptfwdhalf}) \ +# <(${merge-sorted} ${mo_tmp}/bwd/scored.*.gz) /dev/stdout \ +# $(if $(ptable.smoothing), \ +# $(ptable.smoothing) $(ptfwdhalf:.sorted.gz=.coc)) \ +# | gzip > $@_ && mv $@_ $@ +# $(unlock) + diff --git a/contrib/m4m/modules/obsolete/reporting.m4m b/contrib/m4m/modules/obsolete/reporting.m4m new file mode 100644 index 0000000000..967e381777 --- /dev/null +++ b/contrib/m4m/modules/obsolete/reporting.m4m @@ -0,0 +1,95 @@ +# -*- Makefile -*- + +rset = set=$2,type=$3,file=evaluation/$1/$2.$3 +analyses = $(foreach e, ${eval-sets}, \ + $(call rset,$1,$e,analysis-precision) \ + $(call rset,$1,$e,analysis-coverage)) +eval-scores = $(foreach e, ${eval-sets}, \ + $(foreach m, ${eval-metrics}, \ + $(call rset,$1,$e,$m))) +eval-results = $(foreach e, ${eval-sets}, \ + $(foreach m, ${eval-metrics}, \ + evaluation/$1/$e.$m)) + + +.SECONDEXPANSION: +# NOTA BENE: setup-experiments.make adds additional dependencies for +# evaluation/%/report in the file experiments.make! +evaluation/%/report: sets = $(call eval-scores,$*) +#evaluation/%/report: sets += $(call analyses,$*) +#evaluation/%/report: tuned_moses_ini := $(if ${have_tuned_moses_ini},${have_tuned_moses_ini},tuning/$*/moses.tuned.ini) +evaluation/%/report: prereqs = $(call eval-results,$*) +evaluation/%/report: $$(prereqs) + echo $(foreach s, ${sets}, $s) $^ + mkdir $@.lock + echo $(call lockline) > $@.lock/owner + ${report} ${sets} > $@_ + mv $@_ $@ + rm $@.lock/owner + rmdir $@.lock + +%.analysis: params1 = -input ${$(notdir $*)-src} +%.analysis: params1 += -input-corpus ${crp_train}.${L1} +%.analysis: params1 += -ttable ${ttable} -dir $@ +%.analysis: params2 = -precision-by-coverage +%.analysis: params2 += -reference ${$(notdir $*)-ref} +%.analysis: params2 += -system $*.truecased +%.analysis: params2 += -segmentation $*.output +%.analysis: params2 += -system-alignment $*.output.wa +%.analysis: params2 += -coverage $@ +%.analysis: | ${ttable} ${crp_train}.${L1} +%.analysis: %.output.wa %.output %.truecased + @echo ANALYSING $^ + @mkdir $@.lock + @echo $(call lockline) > $@.lock/owner + ${analyze} ${params1} + ${analyze} ${params1} ${params2} + @rm$@.lock/owner + @rmdir $@.lock + +%.multi-bleu: %.cleaned + $(info ) + $(info RUNNING MULTI-BLEU on $^) + @mkdir $@.lock + @echo $(call lockline) > $@.lock/owner + ${multi-bleu} ${$(notdir $*)-ref} < $< > $@_ + @mv $@_ $@ + @rm $@.lock/owner + @rmdir $@.lock + +%.truecased: %.cleaned + mkdir $@.lock + $(detruecase) < $< > $@_ + mv $@_ $@ + rmdir $@.lock + +%.cleaned: %.output + $(info ) + $(info CLEANING UP DECODER OUTPUT: $<) + $(info ) + mkdir $@.lock + echo $(call lockline) > $@.lock/owner + $(clean-decoder-output) < $< > $@_ + mv $@_ $@ + rm $@.lock/owner + rmdir $@.lock + +%.output.wa: %.output +evaluation/%.output: decoder_flags += -threads ${moses.threads} -v 0 +evaluation/%.output: decoder_flags += -inputtype ${input-type} +evaluation/%.output: decoder_flags += -alignment-output-file $@.wa +evaluation/%.output: decoder_flags += -t -text-type "test" +evaluation/%.output: decoder_flags += -f ${moses_ini} +evaluation/%.output: input = ${$(notdir $*)-src} +evaluation/%.output: + echo MOSES_INI = ${moses_ini} + @mkdir -p $(@D) + @mkdir $@.lock + @echo $(call lockline) > $@.lock/owner + ${decode} ${decoder_flags} < ${input} > $@_ + @mv $@_ $@ + @rm $@.lock/owner + @rmdir $@.lock + +.SECONDARY: + diff --git a/contrib/m4m/modules/obsolete/run-moses.m4m b/contrib/m4m/modules/obsolete/run-moses.m4m new file mode 100644 index 0000000000..c24c92a8e5 --- /dev/null +++ b/contrib/m4m/modules/obsolete/run-moses.m4m @@ -0,0 +1,37 @@ +# -*- Makefile -*- + +# This make module deals with running the moses decoder. +# It sets default parameters and checks that parameters that +# need to be set elsewhere are actually set. + +# The following parameters are translation-job specific and need to be set +# explicitly for each job. + +moses.threads ?= 4 +moses.flags += -threads ${moses.threads} +moses.flags += -v 0 -t -text-type "test" + +%.moses-out.wa: moses.flags += -alignment-output-file $*.output.wa +%.moses-out.wa: %.moses-out + + +.SECONDEXPANSION: +%.moses-out: + echo MOSES $^ + $(checkvar,moses.input) + $(checkvar,moses.ini) + $(lock) + ${moses} -i ${moses.input} -inputtype ${moses.inputtype} \ + -f ${moses.ini} ${moses.flags} > $@_ && mv $@_ $@ + $(unlock) + +%.cleaned: %.moses-out + $(lock) + $(clean-decoder-output) < $< > $@_ && mv $@_ $@ + $(unlock) + +%.natcased: %.cleaned + $(eval $(call lock)) + $(detruecase) < $*.cleaned > $@_ && mv $@_ $@ + $(eval $(call unlock)) + diff --git a/contrib/m4m/modules/obsolete/setup-experiments.m4m b/contrib/m4m/modules/obsolete/setup-experiments.m4m new file mode 100644 index 0000000000..dd3bf3dd90 --- /dev/null +++ b/contrib/m4m/modules/obsolete/setup-experiments.m4m @@ -0,0 +1,121 @@ +# -*- Makefile -*- + +# This make module sets up the actual experiments + +L1 = fr +L2 = en +tune-ref-ready = /fs/sif0/bhaddow/experiments/accept/symantec-baseline/tuning/reference.tc.18 +eval-ref-ready = /fs/saxnot5/germann/accept/homophones/exp.new/evaluation/201201_devtest_b.reference.tok.1 +crp_train = /fs/sif0/bhaddow/experiments/accept/symantec-baseline/training/corpus.19 +ttable = /fs/sif0/bhaddow/experiments/accept/symantec-baseline/model/phrase-table.10 + +untuned_moses_ini = model/moses.ini.0 +fixed-iweight = --activate-feature d_0,d_1,d_2,d_3,d_4,d_5,d_6,lm_0,w_0,tm_0,tm_1,tm_2,tm_3,tm_4 + +# list the evaluation metrics to be used for evaluation +# TO DO: list available metrics +eval-metrics = multi-bleu +moses-threads = 20 +tuning-runs = $(shell seq 25) + +# experiments.make: WSCHEMES = uniform unigram bigram bigram2 +# experiments.make: DATASETS = tune eval +# experiments.make: PREPROC = baseline uniq multi +# experiments.make: CSETS = unfiltered filtered edited +experiments.make: WSCHEMES = bigram2 +experiments.make: DATASETS = tune eval +experiments.make: PREPROC = baseline +experiments.make: CSETS = filtered +# remake experiments.make if this file changes +experiments.make: $(word $(words ${MAKEFILE_LIST}), ${MAKEFILE_LIST}) +experiments.make: + mkdir $@.lock + echo $(call lockline) > $@.lock/owner + echo '# -*- Makefile -*-' > $@_ + echo '# This file was automatically generated by setup-experiments.make.' >> $@_ + echo 'experiments := ' >> $@_; + $(foreach p, ${PREPROC}, \ + echo '# NEW EXPERIMENT #####################################' >> $@_; \ + echo 'experiments += $p' >> $@_; \ + echo 'ctr = $$(words $${experiments})' >> $@_; \ + echo '$p: input-type = 0' >> $@_; \ + echo '$p: eval-sets = $p.eval' >> $@_; \ + echo '$p: tune-src = input/$p.tune.tc' >> $@_; \ + echo '$p: tune-ref = ${tune-ref-ready}' >> $@_; \ + echo '$p: $p.eval-src = input/$p.eval.tc' >> $@_; \ + echo '$p: $p.eval-ref = ${eval-ref-ready}' >> $@_; \ + echo '$p: evaluation/$${ctr}/report' >> $@_; \ + echo >> $@_; \ + echo 'evaluation/$p/%/$p.eval.output: input = input/$p.eval.tc' >> $@_; \ + echo 'evaluation/$p/%/$p.eval.output: input/$p.eval.tc' >> $@_; \ + echo $(if $(findstring ini,${tuned_moses_ini}), \ + 'evaluation/$${ctr}/$p.eval.output: ${tuned_moses_ini}', \ + 'evaluation/$${ctr}/$p.eval.output: tuning/$${ctr}/moses.tuned.ini') >> $@_; \ + echo $(if $(findstring ini,${tuned_moses_ini}), \ + 'evaluation/$${ctr}/$p.eval.output: moses_ini := ${tuned_moses_ini}', \ + 'evaluation/$${ctr}/$p.eval.output: moses_ini := tuning/$${ctr}/moses.tuned.ini') >> $@_; \ + echo 'evaluation/$${ctr}/$p.eval.multi-bleu: $${$p.eval-ref}' >> $@_; \ + echo >> $@_;) + $(foreach c, ${CSETS}, \ + $(foreach p, ${PREPROC}, \ + $(foreach w, ${WSCHEMES}, \ + echo '# NEW EXPERIMENT #####################################' >> $@_; \ + echo 'experiments += $w-$c-$p' >> $@_; \ + echo 'ctr = $$(words $${experiments})' >> $@_; \ + echo '$w-$c-$p: input-type = 1' >> $@_; \ + echo '$w-$c-$p: eval-sets = $w-$c-$p.eval' >> $@_; \ + echo '$w-$c-$p: tune-src = input/$w-$c-$p.tune.cfn' >> $@_; \ + echo '$w-$c-$p: tune-ref = ${tune-ref-ready}' >> $@_; \ + echo '$w-$c-$p: $w-$c-$p.eval-src = input/$w-$c-$p.eval.cfn' >> $@_; \ + echo '$w-$c-$p: $w-$c-$p.eval-ref = ${eval-ref-ready}' >> $@_; \ + echo '$w-$c-$p: evaluation/$${ctr}/report' >> $@_; \ + echo >> $@_; \ + echo 'evaluation/$${ctr}/$w-$c-$p.eval.output: input = input/$w-$c-$p.eval.cfn' >> $@_; \ + echo 'evaluation/$${ctr}/$w-$c-$p.eval.output: input/$w-$c-$p.eval.cfn' >> $@_; \ + echo $(if $(findstring ini,${tuned_moses_ini}), \ + 'evaluation/$${ctr}/$w-$c-$p.eval.output: ${tuned_moses_ini}', \ + 'evaluation/$${ctr}/$w-$c-$p.eval.output: tuning/$${ctr}/moses.tuned.ini') >> $@_; \ + echo $(if $(findstring ini,${tuned_moses_ini}), \ + 'evaluation/$${ctr}/$w-$c-$p.eval.output: moses_ini := ${tuned_moses_ini}', \ + 'evaluation/$${ctr}/$w-$c-$p.eval.output: moses_ini := tuning/$${ctr}/moses.tuned.ini') >> $@_; \ + echo 'evaluation/$${ctr}/$w-$c-$p.eval.multi-bleu: $${$w-$c-$p.eval-ref}' >> $@_; \ + echo >> $@_;\ + $(foreach d, tune eval, \ + echo 'cfn-targets += input/$w-$c-$p.$d.cfn' >> $@_; \ + echo 'input/$w-$c-$p.$d.cfn: input/$p.$d.tc' >> $@_; \ + printf '\t@mkdir $$@.lock\n\t@echo $$(call lockline) > $$@.lock/owner\n' >> $@_; \ + printf '\tcreate-confusion-network.01.exe -q -w $w -s csets/csets.$c.txt -c ../mm/fr < $$< > $$@_ && mv $$@_ $$@\n' >> $@_;\ + printf '\t@rm $$@.lock/owner\n\t@rmdir $$@.lock\n' >> $@_;)))) + echo '.PHONY += $$(experiments) cfn' >> $@_ + echo 'cfns: $${cfn-targets}' >> $@_ + @mv $@_ $@ + @rm $@.lock/owner + @rmdir $@.lock + + + +# # echo 'ctr = $$(words $${experiments})' >> $@_; \ + # echo 'eval-sets = $w-$c-$p.eval' >> $@_; \ + # echo 'rx := $$(call report-prereqs,$${ctr},$${eval-sets})' >> $@_; \ + # echo '$w-$c-$p: run-id := $${ctr}' >> $@_; \ + # echo '$w-$c-$p: tune-input = input/$w-$c-$p.tune.cfn' >> $@_; \ + # echo '$w-$c-$p: tune-src = input/$w-$c-$p.tune.cfn' >> $@_; \ + # echo '$w-$c-$p: tune-ref = ${tune-ref-ready}' >> $@_; \ + # echo '$w-$c-$p: $w-$c-$p.eval-src = input/$w-$c-$p.eval.cfn' >> $@_; \ + # echo '$w-$c-$p: $w-$c-$p.eval-ref = ${eval-ref-ready}' >> $@_; \ + # echo '$w-$c-$p: input-type = 1' >> $@_; \ + # echo '$w-$c-$p: mert.options += $$(if $$(findstring uniform,$w),${fixed-iweight})' >> $@_; \ + # echo '$w-$c-$p: evaluation/report.$${ctr}' >> $@_; \ + # echo >> $@_; \ + # echo 'evaluation/$w-$c-$p.eval.output.$${ctr}: input = input/$w-$c-$p.eval.cfn' >> $@_; \ + # echo >> $@_; \ + # $(foreach d, tune eval, \ + # ofile=input/$w-$c-$p.$d.cfn; \ + # ifile=input/$p.$d.tc; \ + # echo "$$ofile: $$ifile" >> $@_ ; \ + # printf '\t create-confusion-network.01.exe -w $w -s csets/cset.$c.txt -c ../mm/fr < $$< > $$@_ && mv $$@_ $$@\n' >> $@_ ; \ + # echo >> $@_; )))) + # echo '.PHONY += $$(experiments)' >> $@_ + # @mv $@_ $@ + # @rm $@.lock/owner + # @rmdir $@.lock diff --git a/contrib/m4m/modules/obsolete/skip-steps.mak b/contrib/m4m/modules/obsolete/skip-steps.mak new file mode 100644 index 0000000000..1eb38aa5f0 --- /dev/null +++ b/contrib/m4m/modules/obsolete/skip-steps.mak @@ -0,0 +1,19 @@ +# -*- Makefile -*- + +# Specify in this file resources that you already have +run_id ?= 0 + +untuned_moses_ini := model/moses.ini.0 +moses_ini_for_tuning = ${untuned_moses_ini} +moses_ini_for_eval = ${tuned_moses_ini} + +# Notes: +# +# - if ${moses_ini_for_tuning} is different from ${untuned_mose_ini}, the phrase table and the +# lexical distortion table will be filtered for tuning (see tune.make) +# - if ${moses_ini_for_eval} is different from ${tuned_mose_ini}, the phrase table and the +# lexical distortion table will be filtered for evaluation (see eval.make) + + +all: + echo ";$(foo);" diff --git a/contrib/m4m/modules/obsolete/system.m4m b/contrib/m4m/modules/obsolete/system.m4m new file mode 100644 index 0000000000..f3cf179ae1 --- /dev/null +++ b/contrib/m4m/modules/obsolete/system.m4m @@ -0,0 +1,38 @@ +# -*- Makefile -*- + +# This module defines the actual system + +# Choose names for translation and distortion model +ptable = model/tm/ptable.${L1}-${L2} +dtable = model/dm/dtable.${L1}-${L2} + +# specify the underlying corpus +pll.txt1 ?= crp/trn/aln/${word-alignment}/${L1}.txt.gz +pll.txt2 ?= crp/trn/aln/${word-alignment}/${L2}.txt.gz +pll.aln ?= crp/trn/aln/${word-alignment}/${L1}-${L2}.symal.gz + +# specify the distortion model parameters; we bunch them +# all together in one string +${ptable}: dmodels = wbe-mslr-bidirectional-fe-allff + +# phrase table parameters: maximum phrase length and smoothing +ptable.max-phrase-length = 7 +ptable.smoothing = --GoodTuring + +#$(info $(call add_binary_phrase_table,0,0,5,${ptable},info)) +$(eval $(call add_binary_phrase_table,0,0,5,${ptable})) + +$(eval $(call add_binary_reordering_table,\ +0-0,wbe-mslr-bidirectional-fe-allff,6,${dtable},${ptable})) + +$(info $(call add_binary_reordering_table,\ +0-0,wbe-mslr-bidirectional-fe-allff,6,${dtable},${ptable},info)) + +# below: moses.ini.0 is the moses ini file PRE-TUNING! +define build_system +$1/moses.ini.0 + + +makefile: + $(info $(call add_binary_phrase_table,0,0,5,${ptable},info)) + diff --git a/contrib/m4m/modules/obsolete/template.m4m b/contrib/m4m/modules/obsolete/template.m4m new file mode 100644 index 0000000000..55a3307244 --- /dev/null +++ b/contrib/m4m/modules/obsolete/template.m4m @@ -0,0 +1,66 @@ +# -*- Makefile -*- + +define setup = + echo 'experiments := ' >> $@_; \ + $(foreach p, ${PREPROC}, \ + echo '# NEW EXPERIMENT #####################################' >> $@_; \ + echo 'experiments += ${tag}' >> $@_; \ + echo 'ctr = $$(words $${experiments})' >> $@_; \ + echo '$: input-type = $(2)' >> $@_; \ + echo '${tag}: eval-sets = ${tag}.eval' >> $@_; \ + echo '${tag}: tune-src = input/${tag}.tune.tc' >> $@_; \ + echo '${tag}: tune-ref = ${tune-ref-ready}' >> $@_; \ + echo '${tag}: ${tag}.eval-src = input/${tag}.eval.$(if $(findstring 1,$(2),cfn,tc))' >> $@_; \ + echo '${tag}: ${tag}.eval-ref = ${eval-ref-ready}' >> $@_; \ + echo '${tag}: evaluation/$${ctr}/report' >> $@_; \ + $(foreach e, ${tag}.eval, \ + $(foreach m, ${eval-metrics}, \ + echo 'evaluation/$${ctr}/report: evaluation/$${ctr}/$e.$m' >> $@_;) \ + echo 'evaluation/$${ctr}/report: evaluation/$${ctr}/$e.analysis' >> $@_;) \ + echo >> $@_; \ + echo 'evaluation/$${ctr}/${tag}.eval.output: input = input/${tag}.eval.tc' >> $@_; \ + echo 'evaluation/$${ctr}/${tag}.eval.output: input/${tag}.eval.tc' >> $@_; \ + echo $(if $(findstring ini,${tuned_moses_ini}), \ + 'evaluation/$${ctr}/${tag}.eval.output: ${tuned_moses_ini}', \ + 'evaluation/$${ctr}/${tag}.eval.output: tuning/$${ctr}/moses.tuned.ini') >> $@_; \ + echo 'evaluation/$${ctr}/${tag}.eval.multi-bleu: $${${tag}.eval-ref}' >> $@_; \ + echo >> $@_;) + echo '.PHONY += $$(experiments)' >> $@_ + @mv $@_ $@ + @rm $@.lock/owner + @rmdir $@.lock + + +# $(1): system / input processing +# $(2): input type (cfn or text) +define setup_experiment = + echo 'experiments := ' >> $@_; \ + $(foreach p, ${PREPROC}, \ + echo '# NEW EXPERIMENT #####################################' >> $@_; \ + echo 'experiments += $(1)' >> $@_; \ + echo 'ctr = $$(words $${experiments})' >> $@_; \ + echo '$(1): input-type = $(2)' >> $@_; \ + echo '$(1): eval-sets = $(1).eval' >> $@_; \ + echo '$(1): tune-src = input/$(1).tune.tc' >> $@_; \ + echo '$(1): tune-ref = ${tune-ref-ready}' >> $@_; \ + echo '$(1): $(1).eval-src = input/$(1).eval.$(if $(findstring 1,$(2),cfn,tc))' >> $@_; \ + echo '$(1): $(1).eval-ref = ${eval-ref-ready}' >> $@_; \ + echo '$(1): evaluation/$${ctr}/report' >> $@_; \ + $(foreach e, $(1).eval, \ + $(foreach m, ${eval-metrics}, \ + echo 'evaluation/$${ctr}/report: evaluation/$${ctr}/$e.$m' >> $@_;) \ + echo 'evaluation/$${ctr}/report: evaluation/$${ctr}/$e.analysis' >> $@_;) \ + echo >> $@_; \ + echo 'evaluation/$${ctr}/$(1).eval.output: input = input/$(1).eval.tc' >> $@_; \ + echo 'evaluation/$${ctr}/$(1).eval.output: input/$(1).eval.tc' >> $@_; \ + echo $(if $(findstring ini,${tuned_moses_ini}), \ + 'evaluation/$${ctr}/$(1).eval.output: ${tuned_moses_ini}', \ + 'evaluation/$${ctr}/$(1).eval.output: tuning/$${ctr}/moses.tuned.ini') >> $@_; \ + echo 'evaluation/$${ctr}/$(1).eval.multi-bleu: $${$(1).eval-ref}' >> $@_; \ + echo >> $@_;) + echo '.PHONY += $$(experiments)' >> $@_ + @mv $@_ $@ + @rm $@.lock/owner + @rmdir $@.lock + +endef diff --git a/contrib/m4m/modules/obsolete/tune.m4m b/contrib/m4m/modules/obsolete/tune.m4m new file mode 100644 index 0000000000..1087de072c --- /dev/null +++ b/contrib/m4m/modules/obsolete/tune.m4m @@ -0,0 +1,45 @@ +# -*- Makefile -*- +# make module for tuning a system + +#tune.input ?= $(error missing +#tuned_moses_ini ?= tuning/moses.ini.${run_id} +#$(tuned_moses_ini): | ${untuned_moses_ini} +#$(tuned_moses_ini): | ${untuned_moses_ini} + +# make sure that all necessary variables are set +untuned_moses_ini ?= $(error Fatal error: the required variable untuned_moses_ini is not set) +tuning_input ?= $(error Fatal error: the required variable tuning_input is not set) +tuning_reference ?= $(error Fatal error: the required variable tuning_reference is not set) +tuning_itype ?= $(error Fatal error: the required variable tuning_itype is not set) +tuning_wdir ?= $(error Fatal error: the required variable tuning_wdir is not set) + +$tuning_root_dir ?= ${MOSES_ROOT} + + + +# default tuning parameters +mert.nbest ?= 100 +mert.decoder-threads ?= 4 +tuning/%/tmp/moses.ini: mertcmd = +tuning/%/tmp/moses.ini: mert_flags += --working-dir $(CURDIR)/tuning/$*/tmp +tuning/%/tmp/moses.ini: mert_flags += --decoder-flags "${mert.decoder_flags} -inputtype ${input-type}" +tuning/%/tmp/moses.ini: mert_flags += --rootdir ${MOSES_ROOT}/scripts +tuning/%/tmp/moses.ini: mert_flags += --mertdir ${MOSES_BIN} +tuning/%/tmp/moses.ini: mert_flags += ${mert.options} +tuning/%/tmp/moses.ini: ${untuned_moses_ini} + $(info TUNING: ${tune} ${tune-src} ${tune-ref} ${decode} ${untuned_moses_ini} ${mert_flags}) + @mkdir -p $(@D) + @mkdir $@.lock + @echo $(call lockline) > $@.lock/owner + ${tune} ${mert_flags} ${tune-src} ${tune-ref} ${decode} ${untuned_moses_ini} + @rm $@.lock/owner + @rmdir $@.lock + +tuning/%/moses.tuned.ini: tuning/%/tmp/moses.ini + @mkdir -p $(@D) + @mkdir $@.lock + @echo $(call lockline) > $@.lock/owner + ${apply-weights} tuning/$*/tmp/moses.ini < ${untuned_moses_ini} > $@_ + @mv $@_ $@ + @rm $@.lock/owner + @rmdir $@.lock diff --git a/contrib/m4m/modules/phrase-table.m4m b/contrib/m4m/modules/phrase-table.m4m new file mode 100644 index 0000000000..46b37ca942 --- /dev/null +++ b/contrib/m4m/modules/phrase-table.m4m @@ -0,0 +1,296 @@ +# -*- makefile -*- + +# Makefile for building a Moses system from a word-aligned corpus +# (c) 2011 - 2012 Ulrich Germann + +# by default, we use good-turing smoothing for phrase tables +# (is that actually worth it?) + +# the following variables should be defined in moses-parameters.make: +# ptable.max-phrase-length +# ptable.smoothing +# ptable.source-factors +# ptable.target-factors + +word-alignment ?= fast +pll.txt1 = ${WDIR}/crp/trn/aln/${word-alignment}/${L1}.txt.gz +pll.txt2 = ${WDIR}/crp/trn/aln/${word-alignment}/${L2}.txt.gz +pll.aln = ${WDIR}/crp/trn/aln/${word-alignment}/${L1}-${L2}.symal.gz + +define phrase_extract_cmd +${moses.extract-phrases} ${moses.extract} $(1:.aln.gz=) ${L1} ${L2} \ +-l ${ptable.max-phrase-length} -m $2 +endef + +################################################################################# +# $1: stem of phrase extractions +# $2: L1 text +# $3: L2 text +# $4: symal file +# normally, $2 ... $4 are default values ${pll.txt1} ${pll.txt2} ${pll.aln} + +define extract_phrases + +SHARDS = $$(foreach x, $${L1} $${L2} aln, $1.shards/$$x-DONE) + +$1.shards/${L1}-DONE: $(if $2,$2,$$(pll.txt1)) + $$(lock) + zcat -f $$< \ + | ${parallel} --pipe -k -N ${SHARDSIZE} "gzip > $${@D}/{#}.${L1}.gz" + touch $$@ + $$(unlock) + +$1.shards/${L2}-DONE: $(if $3,$3,$$(pll.txt2)) + $$(lock) + zcat -f $$< \ + | ${parallel} --pipe -k -N ${SHARDSIZE} "gzip > $${@D}/{#}.${L2}.gz" + $$(unlock) + +$1.shards/aln-DONE: $(if $4,$4,$$(pll.aln)) + $$(lock) + zcat -f $$< \ + | ${parallel} --pipe -k -N ${SHARDSIZE} "gzip > $${@D}/{#}.aln.gz" + $$(unlock) + +$1.shards/extract.batch: $$(SHARDS) + $$(info SHARDS $1 $$(shell ls $${@D}/*.aln.gz)) + $$(lock) + echo -n '' > $$@_ + $$(foreach x, $$(shell ls $${@D}/*.aln.gz 2>/dev/null),\ + echo "$$(call phrase_extract_cmd,$$x,$$(word 1,$${dmodels}))" >> $$@_;\ + $$(foreach i, $$(shell seq 2 $$(words $${dmodels})),\ + echo "$$(call phrase_extract_cmd,$$x,$$(word $$i,$${dmodels})) -x" >> $$@_)) + mv $$@_ $$@; + $$(unlock) + +$1.shards/extract.done: $1.shards/extract.batch + $$(lock) + ${parallel} -j$(shell echo $$((${NUMCORES}/4))) < $1.shards/extract.batch + touch $$@ + $$(unlock) + +endef + + +################################################################################# +# create_phrase_table: add rules to create a standard phrase table +# ADD RULES TO CREATE A STANDARD PHRASE TABLE FROM +# $(pll.txt1),$(pll.txt2),$(pll.aln) that are specified as target-specific +# variables like this: +# $1.txt.gz: pll.txt1 = ... +# $1.txt.gz: pll.txt2 = ... +# $1.txt.gz: pll.aln = ... +# This function is normally called indirectly via $(eval $(call add_bin_pt,...)) +# +# Note: this section should be improved: +# - split into shards +# - create bash file with jobs +# - run batch file in parallel +#-------------------------------------------------------------------------------- +define create_phrase_table + +$(call extract_phrases,$1,$${pll.txt1},$${pll.txt2},$${pll.aln}) + +ptable: $1.txt.gz +$1.txt.gz: | ${merge-sorted} +$1.txt.gz: | ${MOSES_BIN}/consolidate +$1.txt.gz: | $1.tmp/fwd.scored.gz +$1.txt.gz: | $1.tmp/bwd/scoring.done + $$(lock) + ${MOSES_BIN}/consolidate \ + <(zcat -f $1.tmp/fwd.scored.gz) \ + <(${merge-sorted} $1.tmp/bwd/scored.*.gz) /dev/stdout \ + $(if $(ptable.smoothing), $(ptable.smoothing) $1.tmp/fwd.coc) \ + | gzip > $$@_ + mv $$@_ $$@ + $$(unlock) + +$1.tmp/fwd.scored.gz: | $(merge-sorted) +$1.tmp/fwd.scored.gz: | $1.shards/extract.done +$1.tmp/fwd.scored.gz: | $1.${L1}-given-${L2}.lex.gz + $$(lock) + $(merge-sorted) $1.shards/*.fwd.gz \ + | $(moses.score-phrases) ${MOSES_BIN}/score - $1.${L1}-given-${L2}.lex.gz \ + $${@D}/fwd $(ptable.smoothing) && mv $$@_ $$@ + $$(unlock) + +$1.tmp/bwd/scoring.done: | $1.shards/extract.done +$1.tmp/bwd/scoring.done: | $1.${L2}-given-${L1}.lex.gz + $$(lock) + $(merge-sorted) $1.shards/*.bwd.gz \ + | ${moses.score-phrases} ${MOSES_BIN}/score - $1.${L2}-given-${L1}.lex.gz \ + $${@D}/scored $(ptable.smoothing) --Inverse && touch $$@ + $$(unlock) + +# reminder: $2,$3,$4 = L1text, L2text, alignment +$1.${L2}-given-${L1}.lex.gz: | $1.${L1}-given-${L2}.lex.gz +$1.${L1}-given-${L2}.lex.gz: | $(if $2,$2,$$(pll.txt1)) +$1.${L1}-given-${L2}.lex.gz: | $(if $3,$3,$$(pll.txt2)) +$1.${L1}-given-${L2}.lex.gz: | $(if $4,$4,$$(pll.aln)) + $$(lock) + $(moses.make-lex) \ + $(if $2,$2,$$(pll.txt1)) \ + $(if $3,$3,$$(pll.txt2)) \ + $(if $4,$4,$$(pll.aln)) \ + $1.${L1}-given-${L2}.lex.gz \ + $1.${L2}-given-${L1}.lex.gz + $$(unlock) + +endef +# end of create_phrase_table +################################################################################# + +################################################################################# +# $1: input factor(s) +# $2: output factor(s) +# $3: number of features +# $4: stem of phrase table + +define add_binary_phrase_table + +$(call create_phrase_table,$4) +mystem := $(strip $4) +ffname := TranslationModel$(words ${PTABLE_ENTRIES}) +MY_ENTRY := PhraseDictionaryBinary +MY_ENTRY += name=$$(ffname) +MY_ENTRY += num-features=$(strip $3) +MY_ENTRY += input-factor=$(strip $1) +MY_ENTRY += output-factor=$(strip $2) +MY_ENTRY += path=$(abspath $(strip $4)) +$(if ${moses.ini_ttable-limit},MY_ENTRY += table-limit=${moses.ini_ttable-limit}) +PTABLE_ENTRIES += $$(subst $$(space),;,$${MY_ENTRY}) +PTABLES += $(strip $4).binphr.idx + +$(strip $4).binphr.idx: infactor=$1 +$(strip $4).binphr.idx: outfactor=$2 +$(strip $4).binphr.idx: nscores=$3 + +endef +################################################################################# + +%.binphr.idx: %.txt.gz | ${MOSES_BIN}/processPhraseTable + $(lock) + zcat -f $*.txt.gz | ${MOSES_BIN}/processPhraseTable \ + -ttable $(infactor) $(outfactor) - -nscores $(nscores) -out $@.lock/$(notdir $*) + mv $@.lock/$(notdir $*).* ${@D} + $(unlock) + + + +################################################################################# +# $1: input factor(s) +# $2: output factor(s) +# $3: number of features +# $4: stem of phrase table + +define add_text_phrase_table + +$(call create_phrase_table,$4) + +ffname := TranslationModel$(words ${PTABLE_ENTRIES}) +MY_ENTRY := PhraseDictionaryMemory +MY_ENTRY += name=$$(ffname) +MY_ENTRY += num-features=$(strip $3) +MY_ENTRY += input-factor=$(strip $1) +MY_ENTRY += output-factor=$(strip $2) +MY_ENTRY += path=$(abspath $4).txt.gz +$(if ${moses.ini_ttable-limit},MY_ENTRY += table-limit=${moses.ini_ttable-limit}) +PTABLE_ENTRIES += $$(subst $$(space),;,$${MY_ENTRY}) +PTABLES += $(strip $4).txt.gz + +endef +################################################################################# + +# .SECONDEXPANSION: +################################################################################# +define create_lexical_reordering_table + +mystem := $(strip $1).$(strip $2) +$${mystem}.gz: dmshards = $$(shell ls $3.shards/*.dst.gz 2>/dev/null) +$${mystem}.gz: dm.type=$(word 1,$(subst -, ,$2)) +$${mystem}.gz: dm.orient=$(word 2,$(subst -, ,$2)) +$${mystem}.gz: ${strip $3}.shards/extract.done + $$(lock) + ${moses.score-reordering} \ + <(${merge-sorted} \ + $$(if $${dmshards},$${dmshards},$$(warning No dst shards found!))) \ + ${dmodel.smooth} $$@.lock/$$(notdir $(strip $1)). --model "$${dm.type} $${dm.orient} $2" + mv $$@.lock/$$(notdir $(strip $1).$(strip $2)).gz $${@D} + $$(unlock) + +endef + +################################################################################# +define add_binary_reordering_table + +$(call create_lexical_reordering_table,$5,$4,$6) + +mystem := $(strip $5).$(strip $4) +ffname := LexicalReordering$(words ${DTABLE_ENTRIES}) +MY_ENTRY := LexicalReordering +MY_ENTRY += name=$$(ffname) +MY_ENTRY += input-factor=$(strip $1) +MY_ENTRY += output-factor=$(strip $2) +MY_ENTRY += num-features=$(strip $3) +MY_ENTRY += type=$(strip $4) +MY_ENTRY += path=$$(abspath $${mystem}) +DTABLE_ENTRIES += $$(subst $$(space),;,$${MY_ENTRY}) +DTABLES += $(strip $5).$(strip $4).binlexr.idx + +endef + +%.binlexr.idx :| %.gz + $(lock) + ${MOSES_BIN}/processLexicalTable \ + -in <(zcat -f $*.gz) -out $@.lock/$(notdir $*) + mv $@.lock/$(notdir $*).* ${@D} + $(unlock) + + +################################################################################# +# add_dynsa_pt: add a dynamic suffix array phrase table +# $1,$2,$3: source and target factors, number of features +# $4,$5,$6: source and target text (gzipped), wrd-aln. in gzipped symal format +#-------------------------------------------------------------------------------- +define add_dynsa_phrase_table + +ffname := TranslationModel$(words ${PTABLE_ENTRIES}) +MY_ENTRY := PhraseDictionaryDynSuffixArray +MY_ENTRY += name=$$(ffname) +MY_ENTRY += input-factor=$(strip $1) +MY_ENTRY += output-factor=$(strip $2) +MY_ENTRY += num-features=$(strip $3) +MY_ENTRY += source=$(abspath $4) +MY_ENTRY += target=$(abspath $5) +MY_ENTRY += alignment=$(strip $6) +MOSES_INI_PREREQ += $4 $5 $6 +PTABLE_ENTRIES += $$(subst $$(space),;,$${MY_ENTRY}) +PTABLES += $(strip $4) $(strip $5) $(strip $6) + +endef +################################################################################# + +# $1: input factor +# $2: output factor +# $3: num-features +# $4: path to mmapped data +# $5: path to text data +# $6: path and basename of dynamic data +define add_mmsapt + +$(call mmap_bitext,$(strip $5),$(strip $4)) +ffname := PT$(words ${PTABLE_ENTRIES}) +MY_ENTRY := Mmsapt +MY_ENTRY += name=$$(ffname) +MY_ETNRY += input-factor=$(strip $1) +MY_ENTRY += output-factor=$(strip $2) +MY_ENTRY += num-features=$(strip $3) +MY_ENTRY += base=$(abspath $4)/ L1=${L1} L2=${L2} +PTABLE_ENTRIES += $$(subst $$(space),;,$${MY_ENTRY}) + +MOSES_INI_PREREQ += $(addprefix $(strip $4)/${L1},.mct .tdx .sfa) +MOSES_INI_PREREQ += $(addprefix $(strip $4)/${L2},.mct .tdx .sfa) +MOSES_INI_PREREQ += $(strip $4)/${L1}-${L2}.mam +MOSES_INI_PREREQ += $(strip $4)/${L1}-${L2}.lex + +endef diff --git a/contrib/m4m/modules/prepare-corpus.m4m b/contrib/m4m/modules/prepare-corpus.m4m new file mode 100644 index 0000000000..2c064c9c7d --- /dev/null +++ b/contrib/m4m/modules/prepare-corpus.m4m @@ -0,0 +1,173 @@ +# -*- Makefile -*- +# This module deals with corpus preprocessing. +# +# Processing order: +# 1. tokenize (raw -> tok) +# 2. truecase or lowercase (tok -> cased) +# 3. clean for alignment, i.e., filter out undesirable sentence pairs (cased -> clean) + +max-sentence-length ?= 80 +casing.${L1} ?= truecase +casing.${L2} ?= truecase +MAX_NUM_REFS ?= 4 +# tok-mno: monolingual resources +# tok-pll: parallel resources +trn.raw-mno = $(notdir $(wildcard ${WDIR}/crp/trn/mno/raw/*.$1.gz)) +trn.tok-mno = $(addprefix ${WDIR}/crp/trn/mno/tok/, $(call trn.raw-mno,$1)) +trn.cased-mno = $(addprefix ${WDIR}/crp/trn/mno/cased/, $(call trn.raw-mno,$1)) + +trn.raw-pll = $(notdir $(wildcard ${WDIR}/crp/trn/pll/raw/*.$1.gz)) +trn.tok-pll = $(addprefix ${WDIR}/crp/trn/pll/tok/, $(call trn.raw-pll,$1)) +trn.cased-pll = $(addprefix ${WDIR}/crp/trn/pll/cased/, $(call trn.raw-pll,$1)) + + + +define tokenize + +$2/tok/%.$3.gz: | $2/raw/%.$3.gz + $$(lock) + zcat $$(word 1,$$|) | ${pre-tokenize.$1} \ + | ${parallel} -j4 --pipe -k ${tokenize.$1} \ + | gzip > $$@_ + mv $$@_ $$@ + $$(unlock) + +endef + +########################################################################### +# functions that define dependencies and rules for true- or lowercasing +########################################################################### +define truecase + +$2/cased/%.$3.gz: caser = ${run-truecaser} +$2/cased/%.$3.gz: caser += -model ${WDIR}/auxiliary/truecasing-model.$1 +$2/cased/%.$3.gz: | $2/tok/%.$3.gz ${WDIR}/auxiliary/truecasing-model.$1 + $$(lock) + zcat $$(word 1, $$|) | ${parallel} --pipe -k $${caser} | gzip > $$@_ + mv $$@_ $$@ + $$(unlock) +$2/cased/%.$3: | $2/cased/%.$3.gz + $$(lock) + gzip -d < $$(word 1, $$|) > $$@_ + mv $$@_ $$@ + $$(unlock) + +endef + +define lowercase + +$2/cased/%.$3.gz: caser = ${run-lowercaser} +$2/cased/%.$3.gz: | $2/tok/%.$3.gz + $$(lock) + zcat $$| | ${parallel} -j4 --pipe -k $${caser} | gzip > $$@_ + mv $$@_ $$@ + $$(unlock) + +$2/cased/%.$3: | $2/cased/%.$3.gz + $$(lock) + gzip -d < $$(word 1, $$|) > $$@_ + mv $$@_ $$@ + $$(unlock) + +endef + +define skipcasing +$1/cased/%.$2.gz: | $1/tok/%.$2.gz + $$(lock) + ln -s ../tok/$$*.$2.gz $$(@D) + $$(unlock) +$1/cased/%.$2: | $1/tok/%.$2.gz + $$(lock) + gzip -d <../tok/$$*.$2.gz > $$@_ && mv $$@_ $$@ + $$(unlock) +endef + +pllshards := $(notdir $(patsubst %.${L1}.gz,%,\ + $(wildcard ${WDIR}/crp/trn/pll/raw/*.${L1}.gz))) + +.PHONY: pll-ready +pll-clean = $(addprefix ${WDIR}/crp/trn/pll/clean/, $(pllshards)) +pll-ready: $(foreach l,${L1} ${L2}, $(addsuffix .$l.gz,${pll-clean})) + echo MAKEFLAGS = $(filter -n, ${MAKEFLAGS}) + +define clean_corpus + +# .INTERMEDIATE: $1/clean/$2.${L1}.gz +# .INTERMEDIATE: $1/clean/$2.${L2}.gz +# .INTERMEDIATE: $1/clean/$2.clean.log +# .SECONDARY: $1/clean/$2.${L1}.gz +# .SECONDARY: $1/clean/$2.${L2}.gz +# .SECONDARY: $1/clean/$2.clean.log +$1/clean/$2.${L2}.gz: | $1/clean/$2.clean.log + $$(lock) + gzip < $$(@D)/_$2.${L2} > $$@_ && rm $$(@D)/_$2.${L2} + mv $$@_ $$@ + $$(unlock) + +$1/clean/$2.${L1}.gz: | $1/clean/$2.clean.log + $$(lock) + gzip < $$(@D)/_$2.${L1} > $$@_ && rm $$(@D)/_$2.${L1} + mv $$@_ $$@ + $$(unlock) + +$1/clean/$2.clean.log: | $1/cased/$2.${L1}.gz $1/cased/$2.${L2}.gz + $$(lock) + ${MOSES_SCRIPTS}/training/clean-corpus-n.perl \ + ${WDIR}/crp/trn/pll/cased/$2 ${L1} ${L2} $$(@D)/_$2 1 $(max-sentence-length) $$@_ + mv $$@_ $$@ + $$(unlock) + +endef + +############################################################################ +# Truecasing models # +############################################################################ +# .INTERMEDIATE: $(call trn.tok-mno,${L1}) $(call trn.tok-pll,${L1}) +# .INTERMEDIATE: $(call trn.tok-mno,${L2}) $(call trn.tok-pll,${L2}) +# .SECONDARY: $(call trn.tok-mno,${L1}) $(call trn.tok-pll,${L1}) +# .SECONDARY: $(call trn.tok-mno,${L2}) $(call trn.tok-pll,${L2}) + +#${WDIR}/auxiliary/truecasing-model.${L1}: | $(call trn.tok-mno,${L1}) $(call trn.tok-pll,${L1}) +${WDIR}/auxiliary/truecasing-model.${L1}: | $(call trn.tok-mno,${L1}) + $(lock) + $(if $|,,$(error Can't find training data for $@!))#' + ${train-truecaser} -model $@_ -corpus <(echo $| | xargs zcat -f) + test -s $@_ || (echo "Truecasing model $@ is empty!" && exit 1) + mv $@_ $@ + $(unlock) + +#${WDIR}/auxiliary/truecasing-model.${L2}: | $(call trn.tok-mno,${L2}) $(call trn.tok-pll,${L2}) +${WDIR}/auxiliary/truecasing-model.${L2}: | $(call trn.tok-mno,${L2}) + $(lock) + $(if $|,,$(error Can't find training data for $@!))#' + ${train-truecaser} -model $@_ -corpus <(echo $| | xargs zcat -f) + test -s $@_ || (echo "Truecasing model $@ is empty!" && exit 1) + mv $@_ $@ + $(unlock) + + +############################################################################ +# Generate rules # +############################################################################ + +all_data_dirs := $(addprefix ${WDIR}/crp/,trn/mno trn/pll dev tst dev+tst) + +# add rules for tokenization and casing +snippet := $(foreach d,$(all_data_dirs),\ +$(call tokenize,${L1},$d,${L1})$(call ${casing.${L1}},${L1},$d,${L1})) + +snippet += $(foreach d,$(all_data_dirs),\ +$(foreach l,${L2} $(addprefix ${L2},$(shell seq 0 ${MAX_NUM_REFS})),\ +$(call tokenize,${L2},$d,$l)$(call ${casing.${L2}},${L2},$d,$l))) + +MY_EXPERIMENT += $(snippet) +#$(info $(snippet)) +$(eval $(snippet)) + +# add rules for cleaning parallel data prior to word alignment +snippet := $(foreach s,${pllshards},$(call clean_corpus,${WDIR}/crp/trn/pll,$s)) + +MY_EXPERIMENT += $(snippet) +#$(info $(snippet)) +$(eval $(snippet)) + diff --git a/contrib/m4m/modules/tools.m4m b/contrib/m4m/modules/tools.m4m new file mode 100644 index 0000000000..ca5995b6d1 --- /dev/null +++ b/contrib/m4m/modules/tools.m4m @@ -0,0 +1,73 @@ +# -*- Makefile -*- +# This module specifies the locations of required scripts and programs + +# Moses directories: +# MOSES_ROOT: root directory of the distribution +# MOSES_BIN: where compiled binaries are kept +# MGIZA_ROOT: root directory of the mgiza installation +MOSES_ROOT ?= ${HOME}/accept/exp/journal-paper/moses +MOSES_BIN ?= ${MOSES_ROOT}/bin +MGIZA_ROOT ?= ${MOSES_ROOT} + +# default location (unless specified otherwise above) +MOSES_BIN ?= ${MOSES_ROOT}/bin +MOSES_SCRIPTS ?= ${MOSES_ROOT}/scripts +MERT_BIN ?= ${MOSES_BIN} + +M4M_SCRIPTS ?= ${m4mdir}scripts + +# default locations of scripts and executables + +# utilities +parallel ?= $(shell which parallel) --gnu +$(if ${parallel},,$(error GNU parallel utility not found!)) + +# corpus preprocessing +pre-tokenize.${L1} ?= ${MOSES_SCRIPTS}/tokenizer/pre-tokenizer.perl -l ${L1} +pre-tokenize.${L2} ?= ${MOSES_SCRIPTS}/tokenizer/pre-tokenizer.perl -l ${L2} + +tokenize.${L1} ?= ${MOSES_SCRIPTS}/tokenizer/tokenizer.perl -q -a -l ${L1} -no-escape +tokenize.${L2} ?= ${MOSES_SCRIPTS}/tokenizer/tokenizer.perl -q -a -l ${L2} -no-escape +train-truecaser ?= ${MOSES_SCRIPTS}/recaser/train-truecaser.perl +run-truecaser ?= ${MOSES_SCRIPTS}/recaser/truecase.perl +run-detruecaser ?= ${MOSES_SCRIPTS}/recaser/detruecase.perl +run-lowercaser ?= ${MOSES_SCRIPTS}/tokenizer/lowercase.perl + +# lm construction +kenlm.build ?= ${MOSES_BIN}/lmplz +kenlm.binarize ?= ${MOSES_BIN}/build_binary + +# word alignment with mgiza +giza.txt2snt.sh ?= ${M4M_SCRIPTS}/giza.txt2snt.sh +giza2bal.pl ?= ${MOSES_SCRIPTS}/training/giza2bal.pl +mgiza.merge ?= ${MGIZA_ROOT}/scripts/merge_alignment.py +mgiza ?= ${MGIZA_ROOT}/bin/mgiza +snt2cooc ?= ${MGIZA_ROOT}/bin/snt2cooc +plain2snt ?= ${MGIZA_ROOT}/bin/plain2snt +mkcls ?= ${MGIZA_ROOT}/bin/mkcls +symal ?= ${MOSES_BIN}/symal +merge-sorted ?= ${MOSES_BIN}/merge-sorted + +# word alignment with fast_align +fast_align ?= ${HOME}/bin/fast_align + +# phrase and distortion table constuction +# moses.make-lex: extracts word translation lexicon from a word-aligned corpus +# in text format +moses.make-lex ?= ${M4M_SCRIPTS}/moses.make-lex.py +moses.extract-phrases ?= ${M4M_SCRIPTS}/moses.phrase-extract.sh +moses.score-phrases ?= ${M4M_SCRIPTS}/moses.score-phrases.sh +moses.score-reordering ?= ${MOSES_BIN}/lexical-reordering-score +moses.extract ?= ${MOSES_BIN}/extract + +# translation +moses ?= ${MOSES_BIN}/moses + +# tuning and evaluation +mert ?= ${MOSES_SCRIPTS}/training/mert-moses.pl +clean-decoder-output ?= ${MOSES_SCRIPTS}/ems/support/remove-segmentation-markup.perl +detruecase ?= ${MOSES_SCRIPTS}/recaser/detruecase.perl +multi-bleu ?= ${MOSES_SCRIPTS}/generic/multi-bleu.perl +analyze ?= ${MOSES_SCRIPTS}/ems/support/analysis.perl +report ?= ${MOSES_SCRIPTS}/ems/support/report-experiment-scores.perl +apply-weights ?= ${MOSES_SCRIPTS}/ems/support/substitute-weights.perl diff --git a/contrib/m4m/modules/tune-moses.m4m b/contrib/m4m/modules/tune-moses.m4m new file mode 100644 index 0000000000..a5c8ef8d44 --- /dev/null +++ b/contrib/m4m/modules/tune-moses.m4m @@ -0,0 +1,94 @@ +# -*- Makefile -*- + +# unless specified elsewhere, we assume that the moses.ini file for the untuned +# system is model/mose.ini.0 + +untuned_model ?= model/moses.ini.0 +tune.dir ?= ${basedir}/tune + +# FUNCTIONS FOR COMPUTING REFERENCE FILE DEPENDENCIES +# AND INPUT TYPE FROM INPUT FILE PATH FOR TUNING AND EVAL + +# get basenames (with path) of all files belonging +# to a particular set (e.g. dev / tst) +get_set = $(addprefix $(patsubst %/,%,$1)/,\ +$(shell find -L $(patsubst %/,%,$(dir $1)) -regex '.*${L1}\(.gz\)?'\ +| perl -pe 's/.*\/(.*?).${L1}(\.gz)?$$/$$1/' | sort | uniq)) + +# $1: moses input file +# ->: base name of corresponding reference files +refbase = $(notdir $(patsubst %.${L1},%.${L2},%,$(patsubst %.gz,%,$1))) + +# $1: moses input file +# $2: root of directory tree for search +# ->: list of full paths to reference files +reffiles = $(addprefix $(patsubst %/,%,$2)/cased/,\ +$(shell find -L $2 -regex '.*$(call refbase,$1)[0-9]*\(.gz\)?'\ +| perl -pe 's/.*\/(.*?)(\.gz)?$$/$$1/' | sort | uniq)) + +# $1: moses input file +# ->: 0 for plain text, 1 for confusion network +guess-inputtype = $(if $(findstring /cfn,$1),1,0) + +############################################################################ +# TUNE SYSTEM +# +# $1: untuned moses.ini +# $2: tuned moses.ini +# $3: moses input (ref files and input type are computed automatically) +# ->: Makefile snippet for tuning system on input file given +# +define tune_system + +TUNED_SYSTEMS += $(strip $2) +tune.reffiles = $$(call reffiles,$3,$(dir $(patsubst %/,%,$(dir $3)))) +#.INTERMEDIATE: $1 +$(strip $2): $${PTABLES} $${DTABLES} $${LMODELS} $${MOSES_INI_PREREQ} +$(strip $2): mert.wdir = $(dir $(abspath $2))tmp +$(strip $2): tune.src = $3 +$(strip $2): tune.ref = $$(shell echo $(patsubst %.${L1},%.${L2},$3) | perl -pe 's?/cfn[^/]+/?/cased/?') +$(strip $2): tune.itype = $$(call guess-inputtype,$3) +$(strip $2): | $1 $3 $${tune.reffiles} +$(strip $2): + $$(lock) + $$(info REFFILES = $${tune.reffiles}) + mkdir -p $${mert.wdir} + $(if $(findstring -continue,${mert.extra-flags}),,rm -f $${mert.wdir}/*) + ${mert} ${mert.extra-flags} \ + --nbest ${mert.nbest} \ + --mertdir ${MOSES_BIN} \ + --rootdir ${MOSES_SCRIPTS} \ + --working-dir $${mert.wdir} \ + --decoder-flags "$${mert.decoder-flags}" \ + --inputtype $${tune.itype} \ + $${tune.src} $${tune.ref} $${moses} $1 + ${apply-weights} $1 $${mert.wdir}/moses.ini $$@_ && mv $$@_ $$@ + $$(unlock) + +endef + +define copy_weights + +TUNED_SYSTEMS += $(strip $3) +$(strip $3): $1 $2 + $$(lock) + ${apply-weights} $1 $2 $$@_ && mv $$@_ $$@ + $$(unlock) + +endef + +tune.sets ?= $(patsubst %.${L1}.gz,%,$(subst /raw/,/cased/,$(wildcard ${WDIR}/crp/dev/raw/*.${L1}.gz))) + +ifdef tune.runs +define tune_all_systems + +$(foreach system,${SYSTEMS},\ +$(foreach tuneset, ${tune.sets},\ +$(foreach run,$(shell seq ${tune.runs}),\ + $(eval $(call tune_system,${system}/moses.ini.0,\ + ${system}/tuned/$(notdir ${tuneset})/${run}/moses.ini,\ + ${tuneset}.${L1},${tuneset}.${L2},0))))) + +endef +endif + diff --git a/contrib/m4m/scripts/fast-align2bal.py b/contrib/m4m/scripts/fast-align2bal.py new file mode 100755 index 0000000000..1408d20030 --- /dev/null +++ b/contrib/m4m/scripts/fast-align2bal.py @@ -0,0 +1,31 @@ +#!/usr/bin/env python +# Auxiliary script to convert fast_align output to the "bal" input format +# that symal requires. +# Script by Ulrich Germann. + +# command line args: +# +# +# TO DO: - proper argument parsing with getopt +# - help text + +import sys,os + +(T1,T2,fwd,bwd) = [open(x) for x in sys.argv[1:]] + +def alnvec(slen,alinks,mode): + d = dict([[int(x[mode]),int(x[(mode+1)%2])+1] for x + in [y.split('-') for y in alinks]]) + return [d.get(i,0) for i in xrange(slen)] + +ctr = 0 +for t1 in T1: + t1 = t1.strip().split() + t2 = T2.readline().strip().split() + a1 = alnvec(len(t1),bwd.readline().split(),0) + a2 = alnvec(len(t2),fwd.readline().split(),1) + print 1 + print len(t2), " ".join(t2), '#', " ".join(["%d"%x for x in a2]) + print len(t1), " ".join(t1), '#', " ".join(["%d"%x for x in a1]) + ctr += 1 + pass diff --git a/contrib/m4m/scripts/giza.txt2snt.sh b/contrib/m4m/scripts/giza.txt2snt.sh new file mode 100755 index 0000000000..c12359933f --- /dev/null +++ b/contrib/m4m/scripts/giza.txt2snt.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# Wrapper script around plain2snt that allows us to generate the numberized +# files from gzipped text files via named pipes. (c) 2011-2012 Ulrich Germann + +fail() +{ + echo $@ + exit 1 +} + +on_term() +{ + rm $odir/${L1} + rm $odir/${L2} +} + +trap 'on_term' TERM EXIT QUIT INT 0 + +if [ $# -lt 4 ]; then + fail "usage: $0 " +fi + +txtdir=$1 +L1=$2 +L2=$3 +odir=$4 + +mkdir -p $odir +mkfifo $odir/${L1} || exit 1 +mkfifo $odir/${L2} || exit 1 + +find -L ${txtdir} -name "*.${L1}" -or -name "*.${L1}.gz" | sort | xargs zcat -f > $odir/${L1} & +find -L ${txtdir} -name "*.${L2}" -or -name "*.${L2}.gz" | sort | xargs zcat -f > $odir/${L2} & + +pushd $odir +plain2snt ${L1} ${L2} +wait +mv ${L1}_${L2}.snt ${L1}-${L2}.snt +mv ${L2}_${L1}.snt ${L2}-${L1}.snt +wait +popd diff --git a/contrib/m4m/scripts/moses.extract-phrases.sh b/contrib/m4m/scripts/moses.extract-phrases.sh new file mode 100755 index 0000000000..5f95fbc553 --- /dev/null +++ b/contrib/m4m/scripts/moses.extract-phrases.sh @@ -0,0 +1,63 @@ +#!/bin/bash +# helper script for phrase extraction +# (c) 2011-2012 Ulrich Germann +# txtdir - directory with gzipped plain text files +# sntdir - directory with files in Giza's .snt format, also including the .OK files +# produced by giza.txt2snt.sh +# gizdir - directory where aligned corpus resides +# L1,L2 - language tags for L1,L2 +# plmax - max phrase length to be extraced + +extractor=$1 +L1_text=$2 +L2_text=$3 +aln=$4 +odir=$5 +max_plen=$6 +dmodel=$7 + + +echo $# +if [ $# -lt 6 ] ; then + echo < " +EOF +exit 1 +fi + +fifo=$odir/fifo.$$ + +cleanup() +{ + if [ -e $fifo ] ; then rm $fifo; fi + if [ -e $fifo.inv ] ; then rm $fifo.inv; fi + if [ -e $fifo.o ] ; then rm $fifo.o; fi +} + +trap 'cleanup' 0 +export LC_ALL=C +mkdir -p $odir/fwd $odir/bwd $odir/dst +mkfifo $fifo +parallel < $fifo -j6 --pipe --blocksize 250M "sort -S 5G | gzip > $odir/fwd/part.{#}.gz" & +mkfifo $fifo.inv +parallel < $fifo.inv -j6 --pipe --blocksize 250M "sort -S 5G | gzip > $odir/bwd/part.{#}.gz" & +if [ "$dmodel" != "" ] ; then + mkfifo $fifo.o + parallel < $fifo.o -j6 --pipe --blocksize 250M "sort -S 5G | gzip > $odir/dst/part.{#}.gz" & + dmodel="orientation --model $dmodel" +fi +#echo "($extractor <(zcat -f $L2_text) <(zcat -f $L1_text) <(zcat -f $aln) $fifo $max_plen $dmodel) || exit 1" +($extractor <(zcat -f $L2_text) <(zcat -f $L1_text) <(zcat -f $aln) $fifo $max_plen $dmodel) || exit 1 + +wait + +# for part in fwd bwd dst; do +# echo -n '' > $odir/${part}/sort.batch +# for f in $odir/${part}/part.[0-9][0-9][0-9][0-9].gz; do +# g=`echo $f | sed 's/.gz$//'` +# # echo "f=$g; if [ -e \$f.gz ] ; then zcat \$f.gz | LC_ALL=C sort | gzip > \$f.gz_ && mv \$f.gz_ \$f.sorted.gz && rm \$f.gz; fi" \ +# echo "f=$g; if [ -e \$f.gz ] ; then zcat \$f.gz | LC_ALL=C sort | gzip > \$f.gz_ && mv \$f.gz_ \$f.sorted.gz; fi" \ +# >> $odir/${part}/sort.batch +# done +# done + diff --git a/contrib/m4m/scripts/moses.make-lex.py b/contrib/m4m/scripts/moses.make-lex.py new file mode 100755 index 0000000000..686c65c4b3 --- /dev/null +++ b/contrib/m4m/scripts/moses.make-lex.py @@ -0,0 +1,86 @@ +#!/usr/bin/env python + +# Quick hack to extract lexica from Giza-Aligned corpus +# (c) 2011 Ulrich Germann + +import sys, os + +D = os.popen("zcat %s" % sys.argv[1]) +E = os.popen("zcat %s" % sys.argv[2]) +A = os.popen("zcat %s" % sys.argv[3]) +d_given_e = sys.argv[4] +e_given_d = sys.argv[5] + +try: + os.makedirs(os.path.dirname(d_given_e)) + os.makedirs(os.path.dirname(e_given_d)) +except: + pass + +WD = ["NULL","UNK"] +WE = ["NULL","UNK"] +VD = {} +VE = {} +JJ = [] +MD = [] +ME = [] + +def id(V,W,x): + i = V.setdefault(x,len(W)) + if i == len(W): W.append(x) + return i + +ctr = 0 +for dline in D: + ctr += 1 + #if ctr % 1000 == 0: sys.stderr.write('.') + eline = E.readline() + aline = A.readline() + d = [id(VD,WD,w) for w in dline.strip().split()] + e = [id(VE,WE,w) for w in eline.strip().split()] + a = [[int(y) for y in x.split('-')] for x in aline.split()] + + while len(MD) <= len(VD) + 2: + MD.append(0) + JJ.append({}) + pass + + while len(ME) <= len(VE) + 2: + ME.append(0) + pass + + fd = [0 for i in xrange(len(d))] + fe = [0 for i in xrange(len(e))] + for x,y in a: + fd[x] += 1 + fe[y] += 1 + MD[d[x]] += 1 + ME[e[y]] += 1 + JJ[d[x]][e[y]] = JJ[d[x]].setdefault(e[y],0) + 1 + # print WD[d[x]],WE[e[y]],JJ[d[x]][e[y]] + pass + for i in [d[k] for k in xrange(len(d)) if fd[k] == 0]: + ME[0] += 1 + MD[i] += 1 + JJ[i][0] = JJ[i].setdefault(0,0) + 1 + pass + for i in [e[k] for k in xrange(len(e)) if fe[k] == 0]: + ME[i] += 1 + MD[0] += 1 + JJ[0][i] = JJ[0].setdefault(i,0) + 1 + pass + pass + +ED = os.popen("gzip > %s" % e_given_d, 'w') +DE = os.popen("gzip > %s" % d_given_e, 'w') + +for d in xrange(len(JJ)): + T = JJ[d] + for e,jj in T.items(): + print >>ED, WE[e], WD[d], float(jj)/MD[d] + print >>DE, WD[d], WE[e], float(jj)/ME[e] + pass + pass + +ED.close() +DE.close() diff --git a/contrib/m4m/scripts/moses.phrase-extract.sh b/contrib/m4m/scripts/moses.phrase-extract.sh new file mode 100755 index 0000000000..aac0fae7b9 --- /dev/null +++ b/contrib/m4m/scripts/moses.phrase-extract.sh @@ -0,0 +1,110 @@ +#!/bin/bash +# Helper script for phrase extraction from a single corpus shard. +# Written by Ulrich Germann. + +# to be added: built-in factor filtering for factored models + +cleanup() +{ + if [ -e $fifo ] ; then rm $fifo; fi + if [ -e $fifo.inv ] ; then rm $fifo.inv; fi + if [ -e $fifo.o ] ; then rm $fifo.o; fi +} + +usage() +{ + echo + echo "$0: wrapper script to extract phrases from word-aligned corpus" + echo -e "usage:\n $0 [-x] " + echo "options:" + echo "-l: maximum phrase length ($plen)" + echo "-m: distortion model specification" + echo "-o: base name for output files .fwd.gz .bwd.gz [..dst.gz]" + echo "-x: (no argument) don't create .fwd.gz and .bwd.gz" + echo + echo "required input files: ..gz ibase..gz ibase..gz" +} + +plen=7 +nottable= +dmodel= +dspec= +pargs= +sfactors= +tfactors= +while [ $# -gt 0 ]; do + case $1 in + -l*) plen=${1#-l} + plen=${plen#=} + if [ -z $plen ] ; then + shift + plen=$1 + fi + ;; + -m*) dmodel=${1#-m} + dmodel=${dmodel#=} + if [ -z $dmodel ] ; then + shift + dmodel="$1" + fi + ;; + -o*) obase=${1#-o} + obase=${obase#=} + if [ -z $obase ] ; then + shift + obase=$1 + fi + ;; + -s*) sfactors=${1#-s} + sfactors=${sfactors#=} + if [ -z $sfactors ] ; then + shift + sfactors = $1 + fi + ;; + -t*) tfactors=${1#-t} + tfactors=${tfactors#=} + if [ -z $tfactors ] ; then + shift + sfactors = $1 + fi + ;; + -x) nottable=1;; + -h) usage; exit 0;; + *) pargs=(${pargs[*]} $1);; + esac + shift +done + +if [ -n "$sfactors" ] || [ -n "$tfactors" ] ; then + echo "Factor filtering is not implemented yet!" + exit 2 +fi + +extract=${pargs[0]} +ibase=${pargs[1]} +L1tag=${pargs[2]} +L2tag=${pargs[3]} +obase=${obase:=$ibase} + +fifo=$obase.$$ +trap 'cleanup' 0 + +export LC_ALL=C +if [ -z "$nottable" ] ; then +mkfifo $fifo; sort -S 5G < $fifo | gzip > $obase.fwd.gz & +mkfifo $fifo.inv; sort -S 5G < $fifo.inv | gzip > $obase.bwd.gz & +fi +if [ -n "$dmodel" ] ; then + mkfifo $fifo.o + sort -S 5G < $fifo.o | gzip > $obase.dst.gz & + dspec="orientation --model " + dspec+=`echo $dmodel | perl -pe 's/((hier|phrase|wbe)-(msd|msrl|mono)).*/$1/;'` +fi + +txt1=${ibase}.${L1tag}.gz +txt2=${ibase}.${L2tag}.gz +aln=${ibase}.aln.gz +echo "($extract <(zcat -f $txt1) <(zcat -f $txt2) <(zcat -f $aln) $fifo $plen $dspec) || exit 1" +($extract <(zcat -f $txt2) <(zcat -f $txt1) <(zcat -f $aln) $fifo $plen $dspec) || exit 1 +wait diff --git a/contrib/m4m/scripts/moses.score-phrases.sh b/contrib/m4m/scripts/moses.score-phrases.sh new file mode 100755 index 0000000000..abad3175a1 --- /dev/null +++ b/contrib/m4m/scripts/moses.score-phrases.sh @@ -0,0 +1,41 @@ +#!/bin/bash +# Wrapper script around the moses phrase scoring utility. +# Script by Ulrich Germann. Called from within M4M. +# +# lexicon given should be +# de-given-en for fwd +# en-given-de for bwd + +binary=$1 +phrases=$2 +lex=$3 +obase=$4 +smoothing=$5 +inv=$6 + +cleanup() +{ + if [ -e $obase.$$ ] ; then rm $obase.$$; fi + if [ -e $obase.$$.coc ] ; then mv $obase.$$.coc $obase.coc; fi +} + +mkfifo $obase.$$ || exit 1 + +trap 'cleanup' 0 + +export LC_ALL=C +if [[ "$inv" == "--Inverse" ]] ; then + parallel --gnu < $obase.$$ -j10 --pipe --blocksize 250M "sort -S 10G | gzip > $obase.{#}.gz" & +else + gzip < $obase.$$ > $obase.scored.gz_ & +fi + +if [[ $phrases != "-" && $phrases != "/dev/stdin" ]] ; then + $binary $phrases <(zcat -f $lex) $obase.$$ $smoothing $inv || exit 1 +else + $binary /dev/stdin <(zcat -f $lex) $obase.$$ $smoothing $inv || exit 1 +fi + +if [ $? ] ; then exit $?; fi +wait +exit $?; diff --git a/contrib/m4m/scripts/moses.transfer-weights.py b/contrib/m4m/scripts/moses.transfer-weights.py new file mode 100755 index 0000000000..0b5bc68999 --- /dev/null +++ b/contrib/m4m/scripts/moses.transfer-weights.py @@ -0,0 +1,61 @@ +#!/usr/bin/env python + +# Combines the system definition from one .ini file with the weights contained +# in another. Works for the new moses.ini format with fully named feature +# functions. Writes the new .ini file to stdout +# Script by Ulrich Germann. + +import re,sys,os +from optparse import OptionParser + +SectionHeaderPattern = re.compile(r'^\[(.*)\]\s*$') +def read_ini(filename): + ''' + Reads a moses.ini file and returns a dictionary mapping + from section names to a list of lines contained in that section. + ''' + AllSections = {} + CurSection = AllSections.setdefault('',[]) + for line in open(filename): + line = line.strip() + m = SectionHeaderPattern.match(line) + if m: + CurSection = AllSections.setdefault(m.group(1),[]) + elif len(line): + CurSection.append(line) + pass + pass + return AllSections + +parser = OptionParser() +parser.add_option("-s", "--system", dest = "system", + help = "moses.ini file defining the system") +parser.add_option("-w", "--weights", dest = "weight", + help = "moses.ini file defining the system") + +opts,args = parser.parse_args() + +system = read_ini(opts.system) +weight = read_ini(opts.weight) + +for s in system: + if len(s) == 0 or s[0:6] == 'weight': continue + print "[%s]"%s + print "\n".join(system[s]) + print + pass + +if 'weight' in weight: + print '[weight]' + print "\n".join(weight['weight']) +else: + for s in weight: + if s[0:6] != 'weight': continue + print "[%s]"%s + print "\n".join(system[s]) + print + pass + pass + + + diff --git a/contrib/m4m/util/Jamfile b/contrib/m4m/util/Jamfile new file mode 100644 index 0000000000..21ae132f5c --- /dev/null +++ b/contrib/m4m/util/Jamfile @@ -0,0 +1,12 @@ +external-lib bzip2 ; +external-lib zlib ; + +exe merge-sorted : +merge-sorted.cc +$(TOP)/moses/TranslationModel/UG/mm//mm +$(TOP)/moses/TranslationModel/UG/generic//generic +$(TOP)//boost_iostreams +$(TOP)//boost_program_options +; + + diff --git a/contrib/mada/qsub-madamira.perl b/contrib/mada/qsub-madamira.perl new file mode 100755 index 0000000000..bb7ecd06b5 --- /dev/null +++ b/contrib/mada/qsub-madamira.perl @@ -0,0 +1,46 @@ +#!/usr/bin/env perl + +use warnings; +use strict; +use File::Slurp; +use File::Basename; +use Cwd 'abs_path'; + +my $splitDir = $ARGV[0]; +$splitDir = abs_path($splitDir); + +my @files = read_dir $splitDir; + +my $qsubDir=dirname($splitDir) ."/qsub"; +print STDERR "qsubDir=$qsubDir\n"; +`mkdir -p $qsubDir`; + +my $out2Dir=dirname($splitDir) ."/out2"; +print STDERR "out2Dir=$out2Dir\n"; +`mkdir -p $out2Dir`; + +for my $file ( @files ) { + print STDERR "$file "; + + my $qsubFile = "$qsubDir/$file.sh"; + open(RUN_FILE, ">$qsubFile"); + + print RUN_FILE "#!/usr/bin/env bash\n" + ."#PBS -d/scratch/hh65/workspace/experiment/ar-en \n" + ."#PBS -l mem=5gb \n\n" + ."export PATH=\"/scratch/statmt/bin:/share/apps/NYUAD/perl/gcc_4.9.1/5.20.1/bin:/share/apps/NYUAD/jdk/1.8.0_31/bin:/share/apps/NYUAD/zlib/gcc_4.9.1/1.2.8/bin:/share/apps/NYUAD/cmake/gcc_4.9.1/3.1.0-rc3/bin:/share/apps/NYUAD/boost/gcc_4.9.1/openmpi_1.8.3/1.57.0/bin:/share/apps/NYUAD/openmpi/gcc_4.9.1/1.8.3/bin:/share/apps/NYUAD/python/gcc_4.9.1/2.7.9/bin:/share/apps/NYUAD/gcc/binutils/2.21/el6/bin:/share/apps/NYUAD/gcc/gcc/4.9.1/el6/bin:/usr/lib64/qt-3.3/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/bio/ncbi/bin:/opt/bio/mpiblast/bin:/opt/bio/EMBOSS/bin:/opt/bio/clustalw/bin:/opt/bio/tcoffee/bin:/opt/bio/hmmer/bin:/opt/bio/phylip/exe:/opt/bio/mrbayes:/opt/bio/fasta:/opt/bio/glimmer/bin:/opt/bio/glimmer/scripts:/opt/bio/gromacs/bin:/opt/bio/gmap/bin:/opt/bio/tigr/bin:/opt/bio/autodocksuite/bin:/opt/bio/wgs/bin:/opt/ganglia/bin:/opt/ganglia/sbin:/opt/bin:/usr/java/latest/bin:/opt/pdsh/bin:/opt/rocks/bin:/opt/rocks/sbin:/opt/torque/bin:/opt/torque/sbin:/home/hh65/bin:/home/hh65/bin\" \n" + + ."module load NYUAD/2.0 \n" + ."module load gcc python/2.7.9 openmpi/1.8.3 boost cmake zlib jdk perl expat \n" + + ."cd /scratch/statmt/MADAMIRA-release-20140709-1.0 \n"; + print RUN_FILE "java -Xmx2500m -Xms2500m -XX:NewRatio=3 -jar /scratch/statmt/MADAMIRA-release-20140709-1.0/MADAMIRA.jar " + ."-rawinput $splitDir/$file -rawoutdir $out2Dir -rawconfig /scratch/statmt/MADAMIRA-release-20140709-1.0/samples/sampleConfigFile.xml \n"; + + close(RUN_FILE); + + my $cmd = "qsub $qsubFile"; + `$cmd`; + +} + diff --git a/contrib/makemteval/makemteval.ini b/contrib/makemteval/makemteval.ini new file mode 100644 index 0000000000..5493464d70 --- /dev/null +++ b/contrib/makemteval/makemteval.ini @@ -0,0 +1,12 @@ +[set] +filein= +fileout= +settype= +srclang= +tstlang= +setid=SetID +refid=RefID +sysid=SysID +docid=DocID +genre=Genre + diff --git a/contrib/makemteval/makemteval.py b/contrib/makemteval/makemteval.py new file mode 100644 index 0000000000..7dc37c1d52 --- /dev/null +++ b/contrib/makemteval/makemteval.py @@ -0,0 +1,253 @@ +#! /usr/bin/env python +# -*- coding: utf8 -*- + +#=============================================================================== +# Author: Walapa Muangjeen +#=============================================================================== + + +__version__ = '2.0' + +import sys +import os +import codecs +import ConfigParser +from optparse import OptionParser +from copy import deepcopy + + +class makemteval: + + def __init__(self, config=None): + + if isinstance(config,dict): + self.config = deepcopy(config) + else: + self.config = { + 'filein': None, + 'fileout': None, + 'settype': None, + 'srclang': None, + 'tstlang': None, + 'setid': 'SetID', + 'refid': 'RefID', + 'sysid': 'SysID', + 'docid': 'DocID', + 'genre': 'Genre', + } + + + def parseini(self, config=None, inifile=None, section='set'): + + if inifile is None: + inifile = os.path.abspath(os.path.dirname(sys.argv[0])) + os.sep + os.path.splitext(os.path.basename(sys.argv[0]))[0] + '.ini' + + if config is None: + config = self.config + + cfgparser = ConfigParser.RawConfigParser() + + if not cfgparser.has_section(section): + cfgparser.add_section(section) + + for option in config: + cfgparser.set(section, option, config[option]) + + cfgparser.read(inifile) + + for option in cfgparser.options(section): + config[option] = cfgparser.get(section, option) + + return deepcopy(config) + + + def writesgm( self, config ): + + try: + filein = codecs.open(os.path.abspath(os.path.expanduser(config['filein'])), "r", 'utf-8-sig') + except IOError, ErrorMessage: + sys.stderr.write("\n: %s\n"%(ErrorMessage)) + sys.stderr.write(": End Program\n") + return True + + if __name__ == "__main__": + sys.stderr.write( ": opened \"%s\" for reading\n"%(os.path.basename( config['filein'] ))) + + lines = [l.replace('"','\"').replace(''','\'').replace('>','>').replace('<','<').replace('&','&') for l in filein.read().splitlines()] + filein.close() + lines = [l.replace('&','&').replace('<','<').replace('>','>').replace('\'',''').replace('\"','"') for l in lines] + + if __name__ == "__main__": + sys.stderr.write(": closed \"%s\"\n"%(os.path.basename( config['filein'] ))) + + try: + fileout = codecs.open(os.path.abspath(os.path.expanduser(config['fileout'])), "w", 'utf8') + except IOError, ErrorMessage: + sys.stderr.write("\n: %s\n"%(ErrorMessage)) + sys.stderr.write(": End Program\n") + return True + + if __name__ == "__main__": + sys.stderr.write(": opened \"%s\" for writing\n"%(os.path.basename( config['fileout'] ))) + + contents = [] + contents.append('') + contents.append('') + contents.append('') + + if config['settype'] == "srcset": + contents.append("<%(settype)s setid=\"%(setid)s\" srclang=\"%(srclang)s\">"%(config)) + + elif config['settype'] == "refset": + contents.append('<%(settype)s setid=\"%(setid)s\" srclang=\"%(srclang)s\" trglang=\"%(tstlang)s\" refid=\"%(refid)s\">'%(config)) + + elif config['settype'] == "tstset": + contents.append('<%(settype)s setid=\"%(setid)s\" srclang=\"%(srclang)s\" trglang=\"%(tstlang)s\" sysid=\"%(sysid)s\" sysbleu=\"%(sysbleu)s\" language=\"%(language)s\">'%(config)) + + else: + fileout.close() + os.unlink(os.path.abspath(os.path.expanduser(config['fileout']))) + sys.stderr.write("\n: Invalid \"settype\" value %s\n"%(config['settype'])) + sys.stderr.write(": End Program\n") + return True + + contents.append(''%('' if config['settype'] == "srcset" else 'sysid=\"%s\" '%(config['sysid']),config['docid'],config['genre'])) + + if __name__ == "__main__": + sys.stderr.write(": added header\n") + + for i in range(len(lines)): + contents.append(' %s '%(i+1,lines[i])) + + if __name__ == "__main__": + sys.stderr.write(": added %d lines\n"%(i+1)) + + contents.append('') + contents.append(''%(config['settype'])) + contents.append('') + + if __name__ == "__main__": + sys.stderr.write(": added footer\n") + + fileout.write('%s\n'%('\n'.join(contents))) + ferror = fileout.close() + + if __name__ == "__main__": + sys.stderr.write(": closed \"" + os.path.basename( config['fileout'] ) + "\"\n") + + return ferror + + +def parsecmd( config = {} ): + + optparser = OptionParser() + + optparser.add_option( + "-i", "--filein", dest = "filein", default = config["filein"], + help = "UNC path to tokenized input file (required)") + + optparser.add_option( + "-o", "--fileout", dest = "fileout", default = config["fileout"], + help = "UNC path of fileout file (required)") + + optparser.add_option( + "-s", "--srclang", dest = "srclang", default = config["srclang"], + help = "2-letter code for source language (required)") + + optparser.add_option( + "-t", "--tstlang", dest = "tstlang", default = config["tstlang"], + help = "2-letter code for test language (required)") + + optparser.add_option( + "-T", "--settype", dest = "settype", default = config["settype"], + help = "Use XML tag: srcset, tstset or refset (required)") + + optparser.add_option( + "-e", "--setid", dest = "setid", default = config["setid"], + help = "Test set ID (default \""+config["setid"]+"\")") + + optparser.add_option( + "-d", "--docid", dest = "docid", default = config["docid"], + help = "Document ID (default \""+config["docid"]+"\")") + + optparser.add_option( + "-r", "--refid", dest = "refid", default = config["refid"], + help = "Reference ID (default \""+config["refid"]+"\")") + + optparser.add_option( + "-S", "--sysid", dest = "sysid", default = config["sysid"], + help = "System ID used to make the test set (default \""+config["sysid"]+"\")") + + optparser.add_option( + "-g", "--genre", dest = "genre", default = config["genre"], + help = "Genre of the test set and system ID (default \""+config["genre"]+"\")") + + options, commands = optparser.parse_args() + + missing = [] + for k,v in { "Error: missing --filein" : options.filein, + "Error: missing --fileout": options.fileout, + "Error: missing --settype": options.settype, + "Error: missing --srclang": options.srclang, + "Error: missing --tstlang": options.tstlang + }.items(): + if not v: + missing.append(k) + + if missing: + for msg in missing: + sys.stderr.write('%s\n'%(msg)) + optparser.print_help() + exit(1) + + config['filein'] = options.filein + config['fileout'] = options.fileout + config['settype'] = options.settype + config['setid'] = options.setid + config['srclang'] = options.srclang + config['tstlang'] = options.tstlang + config['refid'] = options.refid + config['sysid'] = options.sysid + config['docid'] = options.docid + config['genre'] = options.genre + + sys.stderr.write(": Configuration complete\n") + + return + + +licensetxt=u'''CorpusFiltergraphâ„¢ +Copyright © 2010-2014 Precision Translation Tools Co., Ltd. + +This module is free software: you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation, either version 2.1 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with this program. If not, see http://www.gnu.org/licenses/. + +For more information, please contact Precision Translation Tools Pte +at: http://www.precisiontranslationtools.com''' + + +def main(): + + mksgm = makemteval() + + mksgm.parseini(mksgm.config) + + parsecmd(mksgm.config) + + mksgm.writesgm(mksgm.config) + + return 0 + + +if __name__ == "__main__": + sys.exit(main()) diff --git a/contrib/mert-sge-nosync/README b/contrib/mert-sge-nosync/README new file mode 100644 index 0000000000..85b95ec311 --- /dev/null +++ b/contrib/mert-sge-nosync/README @@ -0,0 +1,29 @@ +MERT-sge-nosync +Raymond Ng, University of Sheffield. +Apr, 2014. + +The parallel MERT tuning scripts in moses cannot run in the SGE "no-sync" mode (where job submission is done in one go, after which user can go offline while leaving the SGE to manage the whole process). Scripts provided in this site are for parallel MERT in SGE no-sync mode. You will need to have SSH support in perl (Step 2), and set up public ssh-keys between the running hosts and the submission hosts (Step 3). + +1. Untar the scipts in ${MOSES}/scripts/ + +2. Download and install OpenSSH packages for perl: +Net-OpenSSH-Compat (http://search.cpan.org/CPAN/authors/id/S/SA/SALVA/Net-OpenSSH-Compat-0.06.tar.gz) +$ cd Net-OpenSSH-Compat-0.06 +$ perl Makefile.PL +(You may have dependency issue and need to install IO-Tty and Net-OpenSSH in advance) +IO-Tty-1.10 (http://search.cpan.org/CPAN/authors/id/T/TO/TODDR/IO-Tty-1.10.tar.gz) +Net-OpenSSH-0.60 (http://search.cpan.org/CPAN/authors/id/S/SA/SALVA/Net-OpenSSH-0.60.tar.gz) + +3. Set up public ssh-keys for accessing the submithost (machine from which qsub is executed) from the running hosts (machines which actually runs the scripts) +http://www.linuxproblem.org/art_9.html + +4. Run parallel MERT by +nohup nice ${MOSES}/scripts/training/mert-moses-sge-nosync.pl ${TM_DEVTEXT_SOURCE} \ +--threads 20 --jobs 20 \ +--queue-flags='-q normal.q -P project' \ +--submithost='squeal' \ +${TM_DEVTEXT_TARGET} ${MOSES}/dist/bin/moses ${WORKINGDIR}/train/model/moses.ini \ +--mertdir ${MOSES}/dist/bin/ >& ${WORKINGDIR}/mert.out + + +(tested on moses version Built Apr 2012 version) diff --git a/contrib/mert-sge-nosync/generic/moses-parallel-sge-nosync.pl b/contrib/mert-sge-nosync/generic/moses-parallel-sge-nosync.pl new file mode 100755 index 0000000000..dc9d695713 --- /dev/null +++ b/contrib/mert-sge-nosync/generic/moses-parallel-sge-nosync.pl @@ -0,0 +1,1388 @@ +#! /usr/bin/perl + +# $Id$ +####################### +# Revision history +# +# 02 Aug 2006 added strict requirement +# 01 Aug 2006 fix bug about inputfile parameter +# fix bug about suffix index generation +# 31 Jul 2006 added parameter for reading queue parameters +# 29 Jul 2006 added code to handling consfusion networks +# 28 Jul 2006 added a better policy for removing jobs from the queue in case of killing signal (CTRL-C) +# added the parameter -qsub-prefix which sets the prefix for the name of submitted jobs +# 27 Jul 2006 added safesystem() function and other checks to handle with process failure +# added checks for existence of decoder and configuration file +# 26 Jul 2006 fix a bug related to the use of absolute path for srcfile and nbestfile + +use strict; +use Net::OpenSSH::Compat::Perl; + + +####################### +#Customizable parameters + +#parameters for submiiting processes through Sun GridEngine +my $submithost = undef; +my $queueparameters=""; +my $batch_and_join = undef; +my $processid="$$"; + +# look for the correct pwdcmd +my $pwdcmd = getPwdCmd(); + +my $workingdir = `$pwdcmd`; chomp $workingdir; +my $tmpdir="$workingdir/tmp$$"; +my $splitpfx="split$$"; + + +$SIG{'INT'} = \&kill_all_and_quit; # catch exception for CTRL-C + +####################### +#Default parameters +my $jobscript="$workingdir/job$$"; +my $qsubout="$workingdir/out.job$$"; +my $qsuberr="$workingdir/err.job$$"; + +my $mosesparameters=""; +my $feed_moses_via_stdin = 0; + # a workaround, for a reason, the default "-input-file X" blocks + # my moses, while "< X" works fine. +my $cfgfile=""; #configuration file + +my $version=undef; +my $help=0; +my $dbg=0; +my $jobs=4; +my $mosescmd="$ENV{MOSESBIN}/moses"; #decoder in use +my $inputlist=undef; +my $inputfile=undef; +my $inputtype=0; +my @nbestlist=(); +my $nbestlist=undef; +my $nbestfile=undef; +my $oldnbestfile=undef; +my $oldnbest=undef; +my $nbestflag=0; +my @wordgraphlist=(); +my $wordgraphlist=undef; +my $wordgraphfile=undef; +my $wordgraphflag=0; +my $robust=5; # resubmit crashed jobs robust-time +my $alifile=undef; +my $outnbest=undef; +my $logfile=""; +my $logflag=""; +my $searchgraphlist=""; +my $searchgraphfile=""; +my $searchgraphflag=0; +my $qsubname="MOSES"; +my $qsubwrapper=undef; +my $qsubwrapper_exit=undef; +my $old_sge = 0; # assume old Sun Grid Engine (<6.0) where qsub does not + # implement -sync and -b +my $___LATTICE_SAMPLES = 0; +my $___DECODER_FLAGS = ""; # additional parameters to pass to the decoder +my $___N_BEST_LIST_SIZE = 100; +my $___RANGES = undef; +my $___WORKING_DIR = undef; +my $SCRIPTS_ROOTDIR = undef; +my $postdecodecmd = undef; +my $postdecodeargs = undef; + + +my $run = 0; +my $jobid = -1; +my $prevjid = undef; +my $need_to_normalize = 1; + +####################### +# Command line options processing +sub init(){ + + + + use Getopt::Long qw(:config pass_through no_ignore_case permute); + GetOptions('version'=>\$version, + 'help'=>\$help, + 'debug'=>\$dbg, + 'jobs=i'=>\$jobs, + 'decoder=s'=> \$mosescmd, + 'robust=i' => \$robust, + 'script-rootdir=s' => \$SCRIPTS_ROOTDIR, + 'lattice-samples=i' => \$___LATTICE_SAMPLES, + 'decoder-flags=s' => \$___DECODER_FLAGS, + 'feed-decoder-via-stdin'=> \$feed_moses_via_stdin, + 'logfile=s'=> \$logfile, + 'i|inputfile|input-file=s'=> \$inputlist, + 'n-best-list-size=s'=> \$___N_BEST_LIST_SIZE, + 'n-best-file=s'=> \$oldnbestfile, + 'n-best-size=i'=> \$oldnbest, + 'output-search-graph|osg=s'=> \$searchgraphlist, + 'output-word-graph|owg=s'=> \$wordgraphlist, + 'alignment-output-file=s'=> \$alifile, + 'submithost=s'=> \$submithost, + 'queue-parameters=s'=> \$queueparameters, + 'inputtype=i'=> \$inputtype, + 'config|f=s'=>\$cfgfile, + 'ranges=s@'=> \$___RANGES, + 'old-sge' => \$old_sge, + 'run=i' => \$run, + 'need-to-normalize' => \$need_to_normalize, + 'working-dir=s' => \$___WORKING_DIR, + 'qsubwrapper=s' => \$qsubwrapper, + 'qsubwrapper-exit=s' => \$qsubwrapper_exit + ) or exit(1); + +# 'decoder-parameters=s'=> \$mosesparameters, +# 'n-best-list=s'=> \$nbestlist, +# 'qsub-prefix=s'=> \$qsubname, +} + +sub init_secondpart() { + getNbestParameters(); + + getSearchGraphParameters(); + + getWordGraphParameters(); + + getLogParameters(); + + chomp(my $my_username = `whoami`); + # $submithost = "squeal"; + + print STDERR "submithost is $submithost\n"; + + my $prevjid = undef; + my $jobid = undef; + +#print_parameters(); +#print STDERR "nbestflag:$nbestflag\n"; +#print STDERR "searchgraphflag:$searchgraphflag\n"; +print STDERR "wordgraphflag:$wordgraphflag\n"; +#print STDERR "inputlist:$inputlist\n"; + + chomp($inputfile=`basename $inputlist`) if defined($inputlist); + + # $mosesparameters.="@ARGV -config $cfgfile -inputtype $inputtype"; + # $mosesparameters = "@ARGV -config $cfgfile -inputtype $inputtype "; + # $mosesparameters .= "@ARGV -config $cfgfile -inputtype $inputtype "; + $mosesparameters .= " -config $cfgfile -inputtype $inputtype "; + +} + + +####################### +##print version +sub version(){ +# print STDERR "version 1.0 (15-07-2006)\n"; +# print STDERR "version 1.1 (17-07-2006)\n"; +# print STDERR "version 1.2 (18-07-2006)\n"; +# print STDERR "version 1.3 (21-07-2006)\n"; +# print STDERR "version 1.4 (26-07-2006)\n"; +# print STDERR "version 1.5 (27-07-2006)\n"; +# print STDERR "version 1.6 (28-07-2006)\n"; +# print STDERR "version 1.7 (29-07-2006)\n"; +# print STDERR "version 1.8 (31-07-2006)\n"; +# print STDERR "version 1.9 (01-08-2006)\n"; +# print STDERR "version 1.10 (02-08-2006)\n"; +# print STDERR "version 1.11 (10-10-2006)\n"; +# print STDERR "version 1.12 (27-12-2006)\n"; +# print STDERR "version 1.13 (29-12-2006)\n"; + print STDERR "version 1.13b (01-04-2014)\n"; + exit(1); +} + +#usage +sub usage(){ + print STDERR "moses-parallel.pl [parallel-options] [moses-options]\n"; + print STDERR "Options marked (*) are required.\n"; + print STDERR "Parallel options:\n"; + print STDERR "* -decoder Moses decoder to use\n"; + print STDERR "* -i|inputfile|input-file the input text to translate\n"; + print STDERR "* -jobs number of required jobs\n"; + print STDERR " -logfile file where storing log files of all jobs\n"; + print STDERR " -queue-parameters specific requirements for queue\n"; + print STDERR " -old-sge Assume Sun Grid Engine < 6.0\n"; + print STDERR " -debug debug\n"; + print STDERR " -version print version of the script\n"; + print STDERR " -help this help\n"; + print STDERR "Moses options:\n"; + print STDERR " -inputtype <0|1|2> 0 for text, 1 for confusion networks, 2 for lattices\n"; + print STDERR " -output-search-graph (osg) : Output connected hypotheses of search into specified filename\n"; + print STDERR " -output-word-graph (osg) ' <0|1>': Output stack info as word graph. Takes filename, 0=only hypos in stack, 1=stack + nbest hypos\n"; + print STDERR " IMPORTANT NOTE: use single quote to group parameters of -output-word-graph\n"; + print STDERR " This is different from standard moses\n"; + print STDERR " -lattice-samples : how many lattice samples (Chatterjee & Cancedda, emnlp 2010) (added option in moses-parallel-sge-nosync)\n"; + print STDERR " -n-best-list-size : size of nbest lists (added option in moses-parallel-sge-nosync)\n"; + print STDERR " NOTE: -n-best-file-n-best-size are passed to the decoder as \"-n-best-list \"\n"; + print STDERR " -decoder-flags : (added option is moses-parallel-sge-nosync)\n"; + print STDERR " -ranges : (added option is moses-parallel-sge-nosync)\n"; + print STDERR " -run : (add option in moses-parallel-sge-nosync)\n"; + print STDERR "* -config (f) configuration file\n"; + print STDERR "All other options are passed to Moses\n"; + print STDERR " (This way to pass parameters is maintained for back compatibility\n"; + print STDERR " but preferably use -decoder-parameters)\n"; + exit(1); +} + + + + + +#printparameters +sub print_parameters(){ + print STDERR "Inputfile: $inputlist\n"; + print STDERR "Configuration file: $cfgfile\n"; + print STDERR "Decoder in use: $mosescmd\n"; + print STDERR "Number of jobs:$jobs\n"; + print STDERR "Nbest list: $nbestlist\n" if ($nbestflag); + print STDERR "Output Search Graph: $searchgraphlist\n" if ($searchgraphflag); + print STDERR "Output Word Graph: $wordgraphlist\n" if ($wordgraphflag); + print STDERR "LogFile:$logfile\n" if ($logflag); + print STDERR "Qsub name: $qsubname\n"; + print STDERR "Queue parameters: $queueparameters\n"; + print STDERR "Inputtype: text\n" if $inputtype == 0; + print STDERR "Inputtype: confusion network\n" if $inputtype == 1; + print STDERR "Inputtype: lattices\n" if $inputtype == 2; + + print STDERR "parameters directly passed to Moses: $mosesparameters\n"; +} + +#get parameters for log file +sub getLogParameters(){ + if ($logfile){ $logflag=1; } +} + +#get parameters for nbest computation (possibly from configuration file) +sub getNbestParameters(){ + if (!$nbestlist){ + open (CFG, "$cfgfile"); + while (chomp($_=)){ + if (/^\[n-best-list\]/){ + my $tmp; + while (chomp($tmp=)){ + last if $tmp eq "" || $tmp=~/^\[/; + $nbestlist .= "$tmp "; + } + last; + } + } + close(CFG); + } + + if ($nbestlist){ + if ($oldnbestfile){ + print STDERR "There is a conflict between NEW parameter -n-best-list and OBSOLETE parameter -n-best-file\n"; + print STDERR "Please use only -nbest-list ' [distinct]\n"; + exit; + } + } + else{ + if ($oldnbestfile){ + print STDERR "You are using the OBSOLETE parameter -n-best-file\n"; + print STDERR "Next time please use only -n-best-list ' [distinct]\n"; + $nbestlist="$oldnbestfile"; + if ($oldnbest){ $nbestlist.=" $oldnbest"; } + else { $nbestlist.=" 1"; } + } + } + + if ($nbestlist){ + my @tmp=split(/[ \t]+/,$nbestlist); + @nbestlist = @tmp; + + if ($nbestlist[0] eq '-'){ $nbestfile="nbest"; } + else{ chomp($nbestfile=`basename $nbestlist[0]`); } + $nbestflag=1; + } + print STDERR "getNbest\n"; + print STDERR "nbestflag = $nbestflag\n"; + print STDERR "nbestfile = $nbestfile\n"; + + +} + +#get parameters for search graph computation (possibly from configuration file) +sub getSearchGraphParameters(){ + if (!$searchgraphlist){ + open (CFG, "$cfgfile"); + while (chomp($_=)){ + if (/^\[output-search-graph\]/ || /^\[osg\]/){ + my $tmp; + while (chomp($tmp=)){ + last if $tmp eq "" || $tmp=~/^\[/; + $searchgraphlist = "$tmp"; + } + last; + } + } + close(CFG); + } + if ($searchgraphlist){ + if ($searchgraphlist eq '-'){ $searchgraphfile="searchgraph"; } + else{ chomp($searchgraphfile=`basename $searchgraphlist`); } + $searchgraphflag=1; + } +} + +#get parameters for word graph computation (possibly from configuration file) +sub getWordGraphParameters(){ + if (!$wordgraphlist){ + open (CFG, "$cfgfile"); + while (chomp($_=)){ + if (/^\[output-word-graph\]/ || /^\[owg\]/){ + my $tmp; + while (chomp($tmp=)){ + last if $tmp eq "" || $tmp=~/^\[/; + $wordgraphlist .= "$tmp "; + } + last; + } + } + close(CFG); + } + if ($wordgraphlist){ + my @tmp=split(/[ \t]+/,$wordgraphlist); + @wordgraphlist = @tmp; + + if ($wordgraphlist[0] eq '-'){ $wordgraphfile="wordgraph"; } + else{ chomp($wordgraphfile=`basename $wordgraphlist[0]`); } + $wordgraphflag=1; + } +} + +sub sanity_check_order_of_lambdas { + my $featlist = shift; + my $filename_or_stream = shift; + + my @expected_lambdas = @{$featlist->{"names"}}; + my @got = get_order_of_scores_from_nbestlist($filename_or_stream); + die "Mismatched lambdas. Decoder returned @got, we expected @expected_lambdas" + if "@got" ne "@expected_lambdas"; +} + + + + +####################### +#Script starts here + +init(); + +print "I have started parallel moses!!"; + +# moses.ini file uses FULL names for lambdas, while this training script +# internally (and on the command line) uses ABBR names. +my @ABBR_FULL_MAP = qw(d=weight-d lm=weight-l tm=weight-t w=weight-w + g=weight-generation lex=weight-lex I=weight-i); +my %ABBR2FULL = map {split/=/,$_,2} @ABBR_FULL_MAP; +my %FULL2ABBR = map {my ($a, $b) = split/=/,$_,2; ($b, $a);} @ABBR_FULL_MAP; + + + + +version() if $version; +usage() if $help; + +####################################### +# incorporate run_decoder() here + +### moved to below +# my $qsubname = mert$run; +# $mosesparameters = "$___DECODER_FLAGS $decoder_config"; +# $nbestlist = "$filename $___N_BEST_LIST_SIZE"; + + +my $featlist = get_featlist_from_moses("./run$run.moses.ini"); +$featlist = insert_ranges_to_featlist($featlist, $___RANGES); + + +## sub run_decoder { +# my ($featlist, $run, $need_to_normalize) = @_; +my $filename_template = "run%d.best$___N_BEST_LIST_SIZE.out"; +my $filename = sprintf($filename_template, $run); +my $lsamp_filename = undef; +if ($___LATTICE_SAMPLES) { + my $lsamp_filename_template = "run%d.lsamp$___LATTICE_SAMPLES.out"; + $lsamp_filename = sprintf($lsamp_filename_template, $run); +} + +# user-supplied parameters +print STDERR "params = $___DECODER_FLAGS\n"; + + +# parameters to set all model weights (to override moses.ini) +my @vals = @{$featlist->{"values"}}; +if ($need_to_normalize) { + print STDERR "Normalizing lambdas: @vals\n"; + my $totlambda=0; + grep($totlambda+=abs($_),@vals); + grep($_/=$totlambda,@vals); +} + + +######################################## + + # parameters to set all model weights (to override moses.ini) + my @vals = @{$featlist->{"values"}}; + if ($need_to_normalize) { + print STDERR "Normalizing lambdas: @vals\n"; + my $totlambda=0; + grep($totlambda+=abs($_),@vals); + grep($_/=$totlambda,@vals); + } + # moses now does not seem accept "-tm X -tm Y" but needs "-tm X Y" + my %model_weights; + for(my $i=0; $i{"names"}}); $i++) { + my $name = $featlist->{"names"}->[$i]; + $model_weights{$name} = "-$name" if !defined $model_weights{$name}; + $model_weights{$name} .= sprintf " %.6f", $vals[$i]; + } + my $decoder_config = join(" ", values %model_weights); + $decoder_config .= " -weight-file run$run.sparse-weights" if -e "run$run.sparse-weights"; + print STDERR "DECODER_CFG = $decoder_config\n"; + print "decoder_config = $decoder_config\n"; + + + + +######################################### + +# moses now does not seem accept "-tm X -tm Y" but needs "-tm X Y" +my %model_weights; +for(my $i=0; $i{"names"}}); $i++) { + my $name = $featlist->{"names"}->[$i]; + $model_weights{$name} = "-$name" if !defined $model_weights{$name}; + $model_weights{$name} .= sprintf " %.6f", $vals[$i]; +} +my $decoder_config = join(" ", values %model_weights); +$decoder_config .= " -weight-file run$run.sparse-weights" if -e "run$run.sparse-weights"; +print STDERR "DECODER_CFG = $decoder_config\n"; +print STDERR "decoder_config = $decoder_config\n"; + +####### moved here??? ########### +$qsubname = "dec$run"; +# $mosesparameters = "$___DECODER_FLAGS $decoder_config"; +$mosesparameters = "$___DECODER_FLAGS $decoder_config "; + +print STDERR "moses parameter with ___DECODER_FLAGS $___DECODER_FLAGS decoder_config $decoder_config and $qsubname\n"; +print STDERR "$mosesparameters\n"; + +$nbestlist = "$filename $___N_BEST_LIST_SIZE"; + +print STDERR "to output -n-best-list $nbestlist\n"; + +init_secondpart(); +################################# + + +# run the decoder +my $decoder_cmd; +my $lsamp_cmd = ""; +if ($___LATTICE_SAMPLES) { + $lsamp_cmd = " -lattice-samples $lsamp_filename $___LATTICE_SAMPLES "; +} + + +if (!defined $inputlist || !defined $mosescmd || ! defined $cfgfile) { + print STDERR "Please specify -input-file, -decoder and -config\n"; + usage(); +} + +#checking if inputfile exists +if (! -e ${inputlist} ){ + print STDERR "Inputfile ($inputlist) does not exists\n"; + usage(); +} + +#checking if decoder exists +if (! -e $mosescmd) { + print STDERR "Decoder ($mosescmd) does not exists\n"; + usage(); +} + +#checking if configfile exists +if (! -e $cfgfile) { + print STDERR "Configuration file ($cfgfile) does not exists\n"; + usage(); +} + + +print_parameters(); # so that people know +exit(1) if $dbg; # debug mode: just print and do not run + + +#splitting test file in several parts +#$decimal="-d"; #split does not accept this options (on MAC OS) +my $decimal=""; + +my $cmd; +my $sentenceN; +my $splitN; + +my @idxlist=(); +my $idxliststr=""; + +if ($inputtype==0){ #text input +#getting the number of input sentences (one sentence per line) + chomp($sentenceN=`wc -l ${inputlist} | awk '{print \$1}' `); + +#Reducing the number of jobs if less sentences to translate + if ($jobs>$sentenceN){ $jobs=$sentenceN; } + +#Computing the number of sentences for each files + if ($sentenceN % $jobs == 0){ $splitN=int($sentenceN / $jobs); } + else{ $splitN=int($sentenceN /$jobs) + 1; } + + if ($dbg){ + print STDERR "There are $sentenceN sentences to translate\n"; + print STDERR "There are at most $splitN sentences per job\n"; + } + + $cmd="split $decimal -a 2 -l $splitN $inputlist ${inputfile}.$splitpfx-"; + safesystem("$cmd") or die; +} +elsif ($inputtype==1){ #confusion network input + my $tmpfile="/tmp/cnsplit$$"; + $cmd="cat $inputlist | perl -pe 's/\\n/ _CNendline_ /g;' | perl -pe 's/_CNendline_ _CNendline_ /_CNendline_\\n/g;' > $tmpfile"; + safesystem("$cmd") or die; + +#getting the number of input CNs + chomp($sentenceN=`wc -l $tmpfile | awk '{print \$1}' `); + +#Reducing the number of jobs if less CNs to translate + if ($jobs>$sentenceN){ $jobs=$sentenceN; } + +#Computing the number of CNs for each files + if ($sentenceN % $jobs == 0){ $splitN=int($sentenceN / $jobs); } + else{ $splitN=int($sentenceN /$jobs) + 1; } + + if ($dbg){ + print STDERR "There are $sentenceN confusion networks to translate\n"; + print STDERR "There are at most $splitN sentences per job\n"; + } + + $cmd="split $decimal -a 2 -l $splitN $tmpfile $tmpfile-"; + safesystem("$cmd") or die; + + my @idxlist=(); + chomp(@idxlist=`ls $tmpfile-*`); + grep(s/.+(\-\S+)$/$1/e,@idxlist); + + foreach my $idx (@idxlist){ + $cmd="perl -pe 's/ _CNendline_ /\\n/g;s/ _CNendline_/\\n/g;'"; + safesystem("cat $tmpfile$idx | $cmd > ${inputfile}.$splitpfx$idx ; \\rm -f $tmpfile$idx;"); + } +} +elsif ($inputtype==2){ #confusion network input +#getting the number of input lattices (one lattice per line) + chomp($sentenceN=`wc -l ${inputlist} | awk '{print \$1}' `); + +#Reducing the number of jobs if less lattices to translate + if ($jobs>$sentenceN){ $jobs=$sentenceN; } + +#Computing the number of sentences for each files + if ($sentenceN % $jobs == 0){ $splitN=int($sentenceN / $jobs); } + else{ $splitN=int($sentenceN /$jobs) + 1; } + + if ($dbg){ + print STDERR "There are $sentenceN lattices to translate\n"; + print STDERR "There are at most $splitN lattices per job\n"; + } + + $cmd="split $decimal -a 2 -l $splitN $inputlist ${inputfile}.$splitpfx-"; + safesystem("$cmd") or die; +} +else{ #unknown input type + die "INPUTTYPE:$inputtype is unknown!\n"; +} + +chomp(@idxlist=`ls ${inputfile}.$splitpfx-*`); +grep(s/.+(\-\S+)$/$1/e,@idxlist); + +safesystem("mkdir -p $tmpdir") or die; + +preparing_script(); + + + +#launching process through the queue +my @sgepids =(); +my $splitdecodejid=""; + +my @idx_todo = (); +foreach (@idxlist) { push @idx_todo,$_; } + +# loop up to --robust times +my $max_robust = $robust; +my $robust_idx; +while ($robust && scalar @idx_todo) { + $robust--; + + my $failure=0; + + + foreach my $idx (@idx_todo){ + + if ($old_sge) { + # old SGE understands -b no as the default and does not understand 'yes' + $batch_and_join = "-j y"; + } else { + $batch_and_join = "-b yes -j yes"; # -b yes to submit bash script + } + + + ##### Replace the direct qsub command with submit_or_exec_thu_host() ############# + + my $split_decoder_cmd = "${jobscript}${idx}.bash"; + &submit_or_exec_thu_host($submithost,$run,$idx,$split_decoder_cmd,$batch_and_join,"decode$run$idx.out","decode$run$idx.err","decode$run$idx.id"); + chomp($jobid=`tail -n 1 decode$run$idx.id`); + print STDERR "JOBID for decoding sub-task decode$run$idx is $jobid\n"; + + ################################################################################### + + ##### # get jobid ################################################################# + push @sgepids, $jobid; + $splitdecodejid .= " $jobid"; + ################################################################################### + } + + ## clear temp file for this robust trial + foreach my $idx (@idx_todo){ + &exit_submit_thu_host($submithost,$run,$idx,"","decode$run$idx.out","decode$run$idx.err","decode$run$idx.id","decode$run$idx.id.pid",$splitdecodejid); + } + + ## WAIT JOB for robust iteration + $cmd = "date"; + $robust_idx = $max_robust - $robust; + &submit_or_exec_thu_host($submithost,$run,"R${robust_idx}.W",$cmd,"-sync y","decode${run}R${robust_idx}.W.out","decode${run}R${robust_idx}.W.err","decode${run}R${robust_idx}.W.id",$splitdecodejid); + # no need to harvest jobid as this is in sync mode + + # clear up tmp files + &exit_submit_thu_host($submithost,$run,"R${robust_idx}.W","","decode${run}R${robust_idx}.W.out","decode${run}R${robust_idx}.W.err","decode${run}R${robust_idx}.W.id","decode${run}R${robust_idx}.W.id.pid",$splitdecodejid); + + + + # check if some translations failed + my @idx_still_todo = check_translation(); + if ($robust) { + # if robust, redo crashed jobs + ##RESUBMIT_ANYWAY## if ((scalar @idx_still_todo) == (scalar @idxlist)) { + ##RESUBMIT_ANYWAY## # ... but not if all crashed + ##RESUBMIT_ANYWAY## print STDERR "everything crashed, not trying to resubmit jobs\n"; + ##RESUBMIT_ANYWAY## $robust = 0; + ##RESUBMIT_ANYWAY## kill_all_and_quit(); + ##RESUBMIT_ANYWAY## } + @idx_todo = @idx_still_todo; + } + else { + if (scalar (@idx_still_todo)) { + print STDERR "some jobs crashed: ".join(" ",@idx_still_todo)."\n"; + # kill_all_and_quit(); + } + + } + +} + + + +$idxliststr = join(" ",@idxlist); + + +$postdecodecmd = "$SCRIPTS_ROOTDIR/training/sge-nosync/moses-parallel-postdecode-sge-nosync.pl" if !defined $postdecodecmd; + +$postdecodeargs = "" if !defined $postdecodeargs; +$postdecodeargs = "$postdecodeargs --process-id $$ --idxliststr \"$idxliststr\""; +$postdecodeargs = "$postdecodeargs --nbestfile $nbestfile" if (defined $nbestfile); +$postdecodeargs = "$postdecodeargs --outnbest $outnbest" if (defined $outnbest); +$postdecodeargs = "$postdecodeargs --input-file $inputfile" if ($inputfile); + +my $cmd = "$postdecodecmd $postdecodeargs"; +&submit_or_exec_thu_host($submithost,$run,".CONCAT",$cmd,"","run$run.out","run$run.err","postdecode$run.id","$splitdecodejid"); + + +chomp($jobid=`tail -n 1 postdecode$run.id`); +$prevjid = $jobid; + +## clear up tmp +&exit_submit_thu_host($submithost,$run,".CONCAT","","run$run.out","run$run.err","postdecode$run.id","postdecode$run.id.pid",$prevjid); + + + +##### OVERALL WAIT JOB ########## + my $syncscript = "${jobscript}.waitall.sh"; + + open (OUT, ">$syncscript"); + my $scriptheader="\#\!/bin/bash\n\#\$ -S /bin/sh\n# Both lines are needed to invoke base\n#the above line is ignored by qsub, unless parameter \"-b yes\" is set!\n\n"; + $scriptheader .="uname -a\n\n"; + $scriptheader .="cd $___WORKING_DIR\n\n"; + print OUT $scriptheader; + print OUT "'date'"; + close(OUT); + + # safesystem("echo 'date' > $syncscript") or kill_all_and_quit(); + chmod(oct(755),"$syncscript"); + + # $cmd="qsub $queueparameters -o /dev/null -e /dev/null -N $qsubname.W -b y /bin/ls > $qsubname.W.log"; + $batch_and_join = "-j y"; + + &submit_or_exec_thu_host($submithost,$run,".W",$syncscript,$batch_and_join,"decode$run.W.out","decode$run.W.err","decode$run.W.id",$prevjid); + chomp($jobid=`tail -n 1 decode$run.W.id`); + print STDERR "JOBID for wait-job for all decoding sub-task is $jobid\n"; + $prevjid = $jobid; + + ## clear-up tmp + &exit_submit_thu_host($submithost,$run,".W",$batch_and_join,"decode$run.W.out","decode$run.W.err","decode$run.W.id","decode$run.W.id.pid",$prevjid); + +exit(); + + + + + +### ending scripts in run_decoder() ############## +sanity_check_order_of_lambdas($featlist, $filename); +return ($filename, $lsamp_filename); +################################################## + + + + +#script creation +sub preparing_script(){ + my $currStartTranslationId = 0; + + foreach my $idx (@idxlist){ + my $scriptheader=""; + $scriptheader.="\#\! /bin/bash\n\n"; + # !!! this is useless. qsub ignores the first line of the script. + # Pass '-S /bin/bash' to qsub instead. + $scriptheader.="uname -a\n\n"; + $scriptheader.="ulimit -c 0\n\n"; # avoid coredumps + $scriptheader.="cd $workingdir\n\n"; + + open (OUT, "> ${jobscript}${idx}.bash"); + print OUT $scriptheader; + my $inputmethod = $feed_moses_via_stdin ? "<" : "-input-file"; + + my $tmpnbestlist=""; + if ($nbestflag){ + $tmpnbestlist="$tmpdir/$nbestfile.$splitpfx$idx $nbestlist[1]"; + $tmpnbestlist = "$tmpnbestlist $nbestlist[2]" if scalar(@nbestlist)==3; + $tmpnbestlist = "-n-best-list $tmpnbestlist"; + } + + $outnbest=$nbestlist[0]; + if ($nbestlist[0] eq '-'){ $outnbest="nbest$$"; } + + print STDERR "n-best-list $tmpnbestlist\n"; + + + my $tmpalioutfile = ""; + if (defined $alifile){ + $tmpalioutfile="-alignment-output-file $tmpdir/$alifile.$splitpfx$idx"; + } + + my $tmpsearchgraphlist=""; + if ($searchgraphflag){ + $tmpsearchgraphlist="-output-search-graph $tmpdir/$searchgraphfile.$splitpfx$idx"; + } + + my $tmpwordgraphlist=""; + if ($wordgraphflag){ + $tmpwordgraphlist="-output-word-graph $tmpdir/$wordgraphfile.$splitpfx$idx $wordgraphlist[1]"; + } + + my $tmpStartTranslationId = ""; # "-start-translation-id $currStartTranslationId"; + + print OUT "$mosescmd $mosesparameters $tmpStartTranslationId $tmpalioutfile $tmpwordgraphlist $tmpsearchgraphlist $tmpnbestlist $inputmethod ${inputfile}.$splitpfx$idx > $tmpdir/${inputfile}.$splitpfx$idx.trans\n\n"; + print OUT "echo exit status \$\?\n\n"; + + if (defined $alifile){ + print OUT "\\mv -f $tmpdir/${alifile}.$splitpfx$idx .\n\n"; + print OUT "echo exit status \$\?\n\n"; + } + if ($nbestflag){ + print OUT "\\mv -f $tmpdir/${nbestfile}.$splitpfx$idx .\n\n"; + print OUT "echo exit status \$\?\n\n"; + } + if ($searchgraphflag){ + print OUT "\\mv -f $tmpdir/${searchgraphfile}.$splitpfx$idx .\n\n"; + print OUT "echo exit status \$\?\n\n"; + } + + if ($wordgraphflag){ + print OUT "\\mv -f $tmpdir/${wordgraphfile}.$splitpfx$idx .\n\n"; + print OUT "echo exit status \$\?\n\n"; + } + + print OUT "\\mv -f $tmpdir/${inputfile}.$splitpfx$idx.trans .\n\n"; + print OUT "echo exit status \$\?\n\n"; + close(OUT); + + #setting permissions of each script + chmod(oct(755),"${jobscript}${idx}.bash"); + + $currStartTranslationId += $splitN; + } +} + +sub concatenate_wordgraph(){ + my $oldcode=""; + my $newcode=-1; + my %inplength = (); + my $offset = 0; + + my $outwordgraph=$wordgraphlist[0]; + if ($wordgraphlist[0] eq '-'){ $outwordgraph="wordgraph$$"; } + + open (OUT, "> $outwordgraph"); + foreach my $idx (@idxlist){ + +#computing the length of each input file + my @in=(); + open (IN, "${inputfile}.${splitpfx}${idx}.trans"); + @in=; + close(IN); + $inplength{$idx} = scalar(@in); + + open (IN, "${wordgraphfile}.${splitpfx}${idx}"); + while (){ + + my $code=""; + if (/^UTTERANCE=/){ + ($code)=($_=~/^UTTERANCE=(\d+)/); + + print STDERR "code:$code offset:$offset\n"; + $code += $offset; + if ($code ne $oldcode){ + +# if there is a jump between two consecutive codes +# it means that an input sentence is not translated +# fill this hole with a "fictitious" list of wordgraphs +# comprising just one "_EMPTYSEARCHGRAPH_ + while ($code - $oldcode > 1){ + $oldcode++; + print OUT "UTTERANCE=$oldcode\n"; + print STDERR " to OUT -> code:$oldcode\n"; + print OUT "_EMPTYWORDGRAPH_\n"; + } + } + + $oldcode=$code; + print OUT "UTTERANCE=$oldcode\n"; + next; + } + print OUT "$_"; + } + close(IN); + $offset += $inplength{$idx}; + + while ($offset - $oldcode > 1){ + $oldcode++; + print OUT "UTTERANCE=$oldcode\n"; + print OUT "_EMPTYWORDGRAPH_\n"; + } + } + close(OUT); +} + + +sub concatenate_searchgraph(){ + my $oldcode=""; + my $newcode=-1; + my %inplength = (); + my $offset = 0; + + my $outsearchgraph=$searchgraphlist; + if ($searchgraphlist eq '-'){ $outsearchgraph="searchgraph$$"; } + + open (OUT, "> $outsearchgraph"); + foreach my $idx (@idxlist){ + +#computing the length of each input file + my @in=(); + open (IN, "${inputfile}.${splitpfx}${idx}.trans"); + @in=; + close(IN); + $inplength{$idx} = scalar(@in); + + open (IN, "${searchgraphfile}.${splitpfx}${idx}"); + while (){ + my ($code,@extra)=split(/[ \t]+/,$_); + $code += $offset; + if ($code ne $oldcode){ + +# if there is a jump between two consecutive codes +# it means that an input sentence is not translated +# fill this hole with a "fictitious" list of searchgraphs +# comprising just one "_EMPTYSEARCHGRAPH_ + while ($code - $oldcode > 1){ + $oldcode++; + print OUT "$oldcode _EMPTYSEARCHGRAPH_\n"; + } + } + $oldcode=$code; + print OUT join(" ",($oldcode,@extra)); + } + close(IN); + $offset += $inplength{$idx}; + + while ($offset - $oldcode > 1){ + $oldcode++; + print OUT "$oldcode _EMPTYSEARCHGRAPH_\n"; + } + } + close(OUT); +} + +sub concatenate_nbest(){ + my $oldcode=""; + my $newcode=-1; + my %inplength = (); + my $offset = 0; + +# get the list of feature and set a fictitious string with zero scores + open (IN, "${nbestfile}.${splitpfx}$idxlist[0]"); + my $str = ; + chomp($str); + close(IN); + my ($code,$trans,$featurescores,$globalscore)=split(/\|\|\|/,$str); + + my $emptytrans = " "; + my $emptyglobalscore = " 0.0"; + my $emptyfeaturescores = $featurescores; + $emptyfeaturescores =~ s/[-0-9\.]+/0/g; + + my $outnbest=$nbestlist[0]; + if ($nbestlist[0] eq '-'){ $outnbest="nbest$$"; } + + open (OUT, "> $outnbest"); + foreach my $idx (@idxlist){ + +#computing the length of each input file + my @in=(); + open (IN, "${inputfile}.${splitpfx}${idx}.trans"); + @in=; + close(IN); + $inplength{$idx} = scalar(@in); + + open (IN, "${nbestfile}.${splitpfx}${idx}"); + while (){ + my ($code,@extra)=split(/\|\|\|/,$_); + $code += $offset; + if ($code ne $oldcode){ + +# if there is a jump between two consecutive codes +# it means that an input sentence is not translated +# fill this hole with a "fictitious" list of translation +# comprising just one "emtpy translation" with zero scores + while ($code - $oldcode > 1){ + $oldcode++; + print OUT join("\|\|\|",($oldcode,$emptytrans,$emptyfeaturescores,$emptyglobalscore)),"\n"; + } + } + $oldcode=$code; + print OUT join("\|\|\|",($oldcode,@extra)); + } + close(IN); + $offset += $inplength{$idx}; + + while ($offset - $oldcode > 1){ + $oldcode++; + print OUT join("\|\|\|",($oldcode,$emptytrans,$emptyfeaturescores,$emptyglobalscore)),"\n"; + } + } + close(OUT); +} + + + +sub check_exit_status(){ + print STDERR "check_exit_status\n"; + my $failure=0; + foreach my $idx (@idxlist){ + print STDERR "check_exit_status of job $idx\n"; + open(IN,"$qsubout$idx"); + while (){ + $failure=1 if (/exit status 1/); + } + close(IN); + } + return $failure; +} + +sub kill_all_and_quit(){ + print STDERR "Got interrupt or something failed.\n"; + print STDERR "kill_all_and_quit\n"; + foreach my $id (@sgepids){ + print STDERR "qdel $id\n"; + safesystem("qdel $id"); + } + + print STDERR "Translation was not performed correctly\n"; + print STDERR "or some of the submitted jobs died.\n"; + print STDERR "qdel function was called for all submitted jobs\n"; + + exit(1); +} + + +sub check_translation(){ + #checking if all sentences were translated + my $inputN; + my $outputN; + my @failed = (); + foreach my $idx (@idx_todo){ + if ($inputtype==0){#text input + chomp($inputN=`wc -l ${inputfile}.$splitpfx$idx | cut -d' ' -f1`); + } + elsif ($inputtype==1){#confusion network input + chomp($inputN=`cat ${inputfile}.$splitpfx$idx | perl -pe 's/\\n/ _CNendline_ /g;' | perl -pe 's/_CNendline_ _CNendline_ /_CNendline_\\n/g;' | wc -l | cut -d' ' -f1 `); + } + elsif ($inputtype==2){#lattice input + chomp($inputN=`wc -l ${inputfile}.$splitpfx$idx | cut -d' ' -f1`); + } + else{#unknown input + die "INPUTTYPE:$inputtype is unknown!\n"; + } + chomp($outputN=`wc -l ${inputfile}.$splitpfx$idx.trans | cut -d' ' -f1`); + + if ($inputN != $outputN){ + print STDERR "Split ($idx) were not entirely translated\n"; + print STDERR "outputN=$outputN inputN=$inputN\n"; + print STDERR "outputfile=${inputfile}.$splitpfx$idx.trans inputfile=${inputfile}.$splitpfx$idx\n"; + push @failed,$idx; + } + } + return @failed; +} + +sub check_translation_old_sge(){ + #checking if all sentences were translated + my $inputN; + my $outputN; + foreach my $idx (@idx_todo){ + if ($inputtype==0){#text input + chomp($inputN=`wc -l ${inputfile}.$splitpfx$idx | cut -d' ' -f1`); + } + elsif ($inputtype==1){#confusion network input + chomp($inputN=`cat ${inputfile}.$splitpfx$idx | perl -pe 's/\\n/ _CNendline_ /g;' | perl -pe 's/_CNendline_ _CNendline_ /_CNendline_\\n/g;' | wc -l | + cut -d' ' -f1 `); + } + elsif ($inputtype==2){#lattice input + chomp($inputN=`wc -l ${inputfile}.$splitpfx$idx | cut -d' ' -f1`); + } + else{#unknown input + die "INPUTTYPE:$inputtype is unknown!\n"; + } + chomp($outputN=`wc -l ${inputfile}.$splitpfx$idx.trans | cut -d' ' -f1`); + + if ($inputN != $outputN){ + print STDERR "Split ($idx) were not entirely translated\n"; + print STDERR "outputN=$outputN inputN=$inputN\n"; + print STDERR "outputfile=${inputfile}.$splitpfx$idx.trans inputfile=${inputfile}.$splitpfx$idx\n"; + return 1; + } + + } + return 0; +} + +sub remove_temporary_files(){ + #removing temporary files + foreach my $idx (@idxlist){ + unlink("${inputfile}.${splitpfx}${idx}.trans"); + unlink("${inputfile}.${splitpfx}${idx}"); + if (defined $alifile){ unlink("${alifile}.${splitpfx}${idx}"); } + if ($nbestflag){ unlink("${nbestfile}.${splitpfx}${idx}"); } + if ($searchgraphflag){ unlink("${searchgraphfile}.${splitpfx}${idx}"); } + if ($wordgraphflag){ unlink("${wordgraphfile}.${splitpfx}${idx}"); } + unlink("${jobscript}${idx}.bash"); + unlink("${jobscript}${idx}.log"); + unlink("$qsubname.W.log"); + unlink("$qsubout$idx"); + unlink("$qsuberr$idx"); + rmdir("$tmpdir"); + } + if ($nbestflag && $nbestlist[0] eq '-'){ unlink("${nbestfile}$$"); }; + if ($searchgraphflag && $searchgraphlist eq '-'){ unlink("${searchgraphfile}$$"); }; + if ($wordgraphflag && $wordgraphlist eq '-'){ unlink("${wordgraphfile}$$"); }; +} + +sub safesystem { + print STDERR "Executing: @_\n"; + system(@_); + if ($? == -1) { + print STDERR "Failed to execute: @_\n $!\n"; + exit(1); + } + elsif ($? & 127) { + printf STDERR "Execution of: @_\n died with signal %d, %s coredump\n", + ($? & 127), ($? & 128) ? 'with' : 'without'; + exit 1; + } + else { + my $exitcode = $? >> 8; + print STDERR "Exit code: $exitcode\n" if $exitcode; + return ! $exitcode; + } +} + + +# look for the correct pwdcmd (pwd by default, pawd if it exists) +# I assume that pwd always exists +sub getPwdCmd(){ + my $pwdcmd="pwd"; + my $a; + chomp($a=`which pawd | head -1 | awk '{print $1}'`); + if ($a && -e $a){ $pwdcmd=$a; } + return $pwdcmd; +} + + + +sub get_featlist_from_moses { + # run moses with the given config file and return the list of features and + # their initial values + + ### variable conversion for moses-parallel-sge-nosync.pl ### + my $___INPUTTYPE = $inputtype; + my $___DECODER = $mosescmd; + ###################################################### + my $configfn = shift; + + + # forceful load features list every time + my $featlistfn = "./features.list.run${run}_start"; + if (-e $featlistfn) { + print STDERR "Removing old features list: $featlistfn\n"; + print STDERR "Generating a new one with $configfn\n"; + } + print STDERR "Asking moses for feature names and values from $configfn\n"; + my $cmd = "$___DECODER $___DECODER_FLAGS -config $configfn -inputtype $___INPUTTYPE -show-weights > $featlistfn"; + print STDERR "$cmd\n"; #DEBUG + safesystem($cmd) or die "Failed to run moses with the config $configfn"; + + + # read feature list + my @names = (); + my @startvalues = (); + open(INI,$featlistfn) or die "Can't read $featlistfn"; + my $nr = 0; + my @errs = (); + while () { + $nr++; + chomp; + /^(.+) (\S+) (\S+)$/ || die("invalid feature: $_"); + my ($longname, $feature, $value) = ($1,$2,$3); + next if $value eq "sparse"; + push @errs, "$featlistfn:$nr:Bad initial value of $feature: $value\n" + if $value !~ /^[+-]?[0-9.e]+$/; + push @errs, "$featlistfn:$nr:Unknown feature '$feature', please add it to \@ABBR_FULL_MAP\n" + if !defined $ABBR2FULL{$feature}; + push @names, $feature; + push @startvalues, $value; + } + close INI; + if (scalar @errs) { + print STDERR join("", @errs); + exit 1; + } + return {"names"=>\@names, "values"=>\@startvalues}; +} + + +sub insert_ranges_to_featlist { + ### variable conversion for moses-parallel-sge-nosync.pl ### + my $___INPUTTYPE = $inputtype; + my $___DECODER = $mosescmd; + ###################################################### + + my $featlist = shift; + my $ranges = shift; + + $ranges = [] if !defined $ranges; + + # first collect the ranges from options + my $niceranges; + foreach my $range (@$ranges) { + my $name = undef; + foreach my $namedpair (split /,/, $range) { + if ($namedpair =~ /^(.*?):/) { + $name = $1; + $namedpair =~ s/^.*?://; + die "Unrecognized name '$name' in --range=$range" + if !defined $ABBR2FULL{$name}; + } + my ($min, $max) = split /\.\./, $namedpair; + die "Bad min '$min' in --range=$range" if $min !~ /^-?[0-9.]+$/; + die "Bad max '$max' in --range=$range" if $min !~ /^-?[0-9.]+$/; + die "No name given in --range=$range" if !defined $name; + push @{$niceranges->{$name}}, [$min, $max]; + } + } + + # now populate featlist + my $seen = undef; + for(my $i=0; $i{"names"}}); $i++) { + my $name = $featlist->{"names"}->[$i]; + $seen->{$name} ++; + my $min = 0.0; + my $max = 1.0; + if (defined $niceranges->{$name}) { + my $minmax = shift @{$niceranges->{$name}}; + ($min, $max) = @$minmax if defined $minmax; + } + $featlist->{"mins"}->[$i] = $min; + $featlist->{"maxs"}->[$i] = $max; + } + return $featlist; +} + + + + +sub submit_or_exec_thu_host { + # use Net::OpenSSH::Compat::Perl; + + my $argvlen = @_; + my $submithost = undef; + my $run = -1; + my $idx = ""; + my $batch_and_join = ""; + my $my_username = undef; + my $cmd = undef; + my $qsubwrapcmd = undef; + my $stdout = undef; + my $stderr = undef; + my $jidfile = undef; + my $prevjid = undef; + + + # if supply 7 arguments, exec without submit + # if supply 8 arguments, then submit new job + # if supply 9 arguments, wait for the previous job to finish + if ($argvlen == 7){ + ($submithost,$run,$idx,$cmd,$batch_and_join,$stdout,$stderr) = @_; + } elsif ($argvlen == 8){ + ($submithost,$run,$idx,$cmd,$batch_and_join,$stdout,$stderr,$jidfile) = @_; + } elsif ($argvlen == 9){ + ($submithost,$run,$idx,$cmd,$batch_and_join,$stdout,$stderr,$jidfile,$prevjid) = @_; + } + + + + chomp(my $my_username = `whoami`); + my $ssh = Net::OpenSSH::Compat::Perl->new($submithost, debug=>0); + + print STDERR "submithost = $submithost\n"; + print STDERR "qusbwrapper at = $qsubwrapper\n"; + + $ssh->login(); + + if ($argvlen == 9) { + $qsubwrapcmd = "$qsubwrapper -command='$cmd' -queue-parameter=\"$queueparameters $batch_and_join\" -qsub-prefix='$qsubname$idx' -stdout=$stdout -stderr=$stderr -jidfile=$jidfile -prevjid='$prevjid'"; + } elsif ($argvlen == 8) { + # $qsubwrapcmd = "$qsubwrapper -command='${jobscript}${idx}.bash' -queue-parameter=\"$queueparameters $batch_and_join\" -qsub-prefix='$qsubname$idx' -stdout=$stdout -stderr=$stderr -jidfile=$jidfile"; + $qsubwrapcmd = "$qsubwrapper -command='$cmd' -queue-parameter=\"$queueparameters $batch_and_join\" -qsub-prefix='$qsubname$idx' -stdout=$stdout -stderr=$stderr -jidfile=$jidfile"; + } + print STDERR "Executing $qsubwrapcmd in $___WORKING_DIR\n"; + $ssh->cmd("cd $___WORKING_DIR && $qsubwrapcmd"); + +} + +sub exit_submit_thu_host { + + my $argvlen = @_; + my $submithost = undef; + my $run = -1; + my $idx = ""; + my $batch_and_join = ""; + my $my_username = undef; + my $cmd = undef; + my $stdout = undef; + my $stderr = undef; + my $jidfile = undef; + my $pidfile = undef; + my $prevjid = undef; + my $prevjidarraysize = 0; + my @prevjidarray = (); + my $pid = undef; + my $qsubcmd=""; + my $hj=""; + + # if supply 8 arguments, then submit new job + # if supply 9 arguments, wait for the previous job to finish + if ($argvlen == 6){ + ($submithost,$run,$idx,$batch_and_join,$stdout,$stderr) = @_; + } elsif ($argvlen == 8){ + ($submithost,$run,$idx,$batch_and_join,$stdout,$stderr,$jidfile,$pidfile) = @_; + } elsif ($argvlen == 9){ + ($submithost,$run,$idx,$batch_and_join,$stdout,$stderr,$jidfile,$pidfile,$prevjid) = @_; + } + + # parse prevjid ######################## + $prevjid =~ s/^\s+|\s+$//g; + @prevjidarray = split(/\s+/,$prevjid); + $prevjidarraysize = scalar(@prevjidarray); + ######################################## + + + # print STDERR "exec: $stdout\n"; + + # read pid from file, and draft exit script ################## + chomp ($pid=`tail -n 1 $pidfile`); + open (OUT, ">exitjob$pid.sh"); + + my $scriptheader="\#\!/bin/bash\n\#\$ -S /bin/sh\n# Both lines are needed to invoke base\n#the above line is ignored by qsub, unless parameter \"-b yes\" is set!\n\n"; + $scriptheader .="uname -a\n\n"; + $scriptheader .="cd $___WORKING_DIR\n\n"; + + print OUT $scriptheader; + + print OUT "if $qsubwrapper_exit -stdout=$stdout -stderr=$stderr -jidfile=$jidfile -pidfile=$pidfile > exitjob$pid.out 2> exitjob$pid.err ; then + echo 'succeeded' +else + echo failed with exit status \$\? + die=1 +fi +"; + print OUT "\n\n"; + + close (OUT); + # setting permissions of the script + chmod(oct(755),"exitjob$pid.sh"); + ############################################################## + + # log in submit host ######################################### + chomp(my $my_username = `whoami`); + my $ssh = Net::OpenSSH::Compat::Perl->new($submithost, debug=>0); + + print STDERR "submithost = $submithost\n"; + print STDERR "my username = $my_username\n"; + print STDERR "qusbwrapper at = $qsubwrapper\n"; + + $ssh->login(); + ############################################################## + + + if ($argvlen==9) { + if (defined $prevjid && $prevjid!=-1 && $prevjidarraysize == 1){ + $hj = "-hold_jid $prevjid"; + } elsif (defined $prevjid && $prevjidarraysize > 1){ + $hj = "-hold_jid " . join(" -hold_jid ", @prevjidarray); + } + $qsubcmd="qsub $queueparameters -o /dev/null -e /dev/null $hj exitjob$pid.sh > exitjob$pid.log 2>&1"; + $ssh->cmd("cd $___WORKING_DIR && $qsubcmd"); + } elsif ($argvlen==8) { + $qsubcmd="qsub $queueparameters -o /dev/null -e /dev/null exitjob$pid.sh > exitjob$pid.log 2>&1"; + $ssh->cmd("cd $___WORKING_DIR && $qsubcmd"); + } + print STDERR "Executing $qsubcmd in $___WORKING_DIR\n"; + +} + + diff --git a/contrib/mert-sge-nosync/generic/qsub-wrapper-exit-sge-nosync.pl b/contrib/mert-sge-nosync/generic/qsub-wrapper-exit-sge-nosync.pl new file mode 100755 index 0000000000..b480cbf72f --- /dev/null +++ b/contrib/mert-sge-nosync/generic/qsub-wrapper-exit-sge-nosync.pl @@ -0,0 +1,312 @@ +#! /usr/bin/perl + +# $Id$ +use strict; +use Net::OpenSSH::Compat::Perl; +####################### +#Default parameters +#parameters for submiiting processes through SGE +#NOTE: group name is ws06ossmt (with 2 's') and not ws06osmt (with 1 's') +my $queueparameters=""; + +# look for the correct pwdcmd +my $pwdcmd = getPwdCmd(); + +my $workingdir = `$pwdcmd`; chomp $workingdir; +# my $tmpdir="$workingdir/tmp$$"; +# my $jobscript="$workingdir/job$$.sh"; +# my $qsubout="$workingdir/out.job$$"; +# my $qsuberr="$workingdir/err.job$$"; + + +$SIG{INT} = \&kill_all_and_quit; # catch exception for CTRL-C + +my $submithost=""; +my $help=""; +my $dbg=""; +my $version=""; +my $qsubname="WR$$"; +my $cmd=""; +my $cmdout=undef; +my $cmderr=undef; +my $jid=0; +my $jidfile=undef; +my $pid=0; +my $pidfile=undef; +my $prevjid=undef; +my $parameters=""; +my $old_sge = 0; # assume grid engine < 6.0 +my $prevjidarraysize = 0; +my $force_delete = 0; +my @prevjidarray = (); + +sub init(){ + use Getopt::Long qw(:config pass_through); + GetOptions('version'=>\$version, + 'help'=>\$help, + 'debug'=>\$dbg, + 'submithost=s'=> \$submithost, + 'qsub-prefix=s'=> \$qsubname, + 'stdout=s'=> \$cmdout, + 'stderr=s'=> \$cmderr, + 'jidfile=s'=> \$jidfile, + 'pidfile=s'=> \$pidfile, # process id for previous job + 'prevjid=s'=> \$prevjid, + 'queue-parameter=s'=> \$queueparameters, + 'force-delete=i' => \$force_delete, + 'old-sge' => \$old_sge, + ) or exit(1); + $parameters="@ARGV"; + + # read $pid from file + chomp($pid=`tail -n 1 $pidfile`); + # print "PID=+$pidfile+\n"; + + if (defined $jidfile) { + chomp($jid=`tail -n 1 $jidfile`); + } + + # print STDERR "INPUT prevjid =+$prevjid+\n"; + $prevjid =~ s/^\s+|\s+$//g; + # print STDERR "TRIMMED prevjid =+$prevjid+\n"; + + @prevjidarray = split(/\s+/,$prevjid); + $prevjidarraysize = scalar(@prevjidarray); + + # print STDERR "arraysize: $prevjidarraysize\n"; + + + version() if $version; + usage() if $help; + print_parameters() if $dbg; +} + +####################### +##print version +sub version(){ +# print STDERR "version 1.0 (29-07-2006)\n"; + print STDERR "version 1.1 (31-07-2006)\n"; + exit(1); +} + +#usage +sub usage(){ + print STDERR "qsub-wrapper.pl [options]\n"; + print STDERR "Options:\n"; + print STDERR "-stdout file to find stdout from target cmd (optional)\n"; + print STDERR "-stderr file to find stderr from target cmd (optional)\n"; + print STDERR "-jidfile file to find the submit jobid (for submit option)\n"; + print STDERR "-pidfile file to find the process id to the target job for deletion\n"; + print STDERR "-prevjid wait for the previous job with jobid=id to finish before starting (optional)\n"; + print STDERR "-force-delete 1 force-delete without checking\n"; + print STDERR "-qsub-prefix name for sumbitted jobs (optional)\n"; + print STDERR "-queue-parameters parameter for the queue (optional)\n"; + print STDERR "-old-sge ... assume Sun Grid Engine < 6.0\n"; + print STDERR "-debug debug\n"; + print STDERR "-version print version of the script\n"; + print STDERR "-help this help\n"; + exit(1); +} + +#printparameters +sub print_parameters(){ + # print STDERR "command: $cmd\n"; + if (defined($cmdout)){ print STDERR "file for stdout: $cmdout\n"; } + else { print STDERR "file for stdout is not defined, stdout is discarded\n"; } + if (defined($cmderr)){ print STDERR "file for stdout: $cmderr\n"; } + else { print STDERR "file for stderr is not defined, stderr is discarded\n"; } + if (defined($jidfile)){ print STDERR "file for submit job id: $jidfile\n"; } + else { print STDERR "file for submit job id is not defined, jidfile is discarded\n"; } + print STDERR "Qsub name: $qsubname\n"; + print STDERR "Queue parameters: $queueparameters\n"; + print STDERR "parameters directly passed to cmd: $parameters\n"; + exit(1); +} + + +####################### +#Script starts here + +init(); + +my $tmpdir="$workingdir/tmp$pid"; +my $jobscript="$workingdir/job$pid.sh"; +my $qsubout="$workingdir/out.job$pid"; +my $qsuberr="$workingdir/err.job$pid"; + + + +### usage() if $cmd eq ""; +### +### safesystem("mkdir -p $tmpdir") or die; +### +### preparing_script(); +### +#### my $maysync = $old_sge ? "" : "-sync y"; +#### never run in syn mode +###my $maysync = ""; +### +###my $qsubcmd = ""; +#### create the qsubcmd to submit to the queue with the parameter "-b yes" +####my $qsubcmd="qsub $queueparameters $maysync -V -o $qsubout -e $qsuberr -N $qsubname -b yes $jobscript > $jobscript.log 2>&1"; +### +#### add -b yes if not yet defined, otherwise leave empty +###$queueparameters .= " -b yes " if (index($queueparameters," -b ")==-1); +### +### +###if (defined $prevjid && $prevjid!=-1 && $prevjidarraysize == 1) { +### $qsubcmd="qsub $queueparameters $maysync -V -hold_jid $prevjid -o $qsubout -e $qsuberr -N $qsubname $jobscript > $jobscript.log 2>&1"; +###} elsif (defined $prevjid && $prevjidarraysize > 1) { +### my $hj = "-hold_jid " . join(" -hold_jid ", @prevjidarray); +### # print STDERR "hj is $hj\n"; +### $qsubcmd="qsub $queueparameters $maysync -V $hj -o $qsubout -e $qsuberr -N $qsubname $jobscript > $jobscript.log 2>&1"; +###} else { +### $qsubcmd="qsub $queueparameters $maysync -V -o $qsubout -e $qsuberr -N $qsubname $jobscript > $jobscript.log 2>&1"; +###} +### +###print "submitting $qsubcmd\n"; +### +####run the qsubcmd +### +###safesystem($qsubcmd) or die; +### +####getting id of submitted job############# +###my $res; +###open (IN,"$jobscript.log") or die "Can't read main job id: $jobscript.log"; +###chomp($res=); +###my @arrayStr = split(/\s+/,$res); +###my $id=$arrayStr[2]; +###die "Failed to get job id from $jobscript.log, got: $res" +### if $id !~ /^[0-9]+$/; +###close(IN); +############################################ +###print STDERR " res:$res\n"; +###print STDERR " id:$id\n"; +### +###open (JIDOUT,">$jidfile") or die "Can't open jid file to write"; +###print JIDOUT "$id\n"; +###close(JIDOUT); +### +###open (JOBNUMOUT,">$jidfile.job") or die "Can't open id.job file to write"; +###print JOBNUMOUT "$$\n"; +###close(JOBNUMOUT); +### +###if ($old_sge) { +### # need to workaround -sync, add another job that will wait for the main one +### # prepare a fake waiting script +### my $syncscript = "$jobscript.sync_workaround_script.sh"; +### safesystem("echo 'date' > $syncscript") or die; +### +### my $checkpointfile = "$jobscript.sync_workaround_checkpoint"; +### +### # ensure checkpoint does not exist +### safesystem("\\rm -f $checkpointfile") or die; +### +### # start the 'hold' job, i.e. the job that will wait +#### $cmd="qsub -cwd $queueparameters -hold_jid $id -o $checkpointfile f -e /dev/null -N $qsubname.W $syncscript >& $qsubname.W.log"; +### $cmd="qsub -cwd $queueparameters -hold_jid $id -o $checkpointfile -e /dev/null -N $qsubname.W $syncscript >& $qsubname.W.log"; +### safesystem($cmd) or die; +### +### # and wait for checkpoint file to appear +### my $nr=0; +### while (!-e $checkpointfile) { +### sleep(10); +### $nr++; +### print STDERR "w" if $nr % 3 == 0; +### } +### safesystem("\\rm -f $checkpointfile $syncscript") or die(); +### print STDERR "End of waiting workaround.\n"; +###} + + +my $failure=0; + + +if (!$force_delete) { + $failure=&check_exit_status(); + print STDERR "check_exit_status returned $failure\n"; +} + + +&kill_all_and_quit() if $failure; + +&remove_temporary_files() if !$dbg; + + + + +sub check_exit_status(){ + my $failure=0; + + print STDERR "check_exit_status of submitted job $jid from file $qsubout\n"; + open(IN,"$qsubout") or die "Can't read $qsubout"; + while (){ + $failure=1 if (/failed with exit status/); + } + close(IN); + return $failure; +} + +sub kill_all_and_quit(){ + my $my_username = undef; + + # chomp($my_username = `whoami`); + # + # my $ssh = Net::OpenSSH::Compat::Perl->new($submithost, debug=>0); + # + # $ssh->login("$my_username",`cat /home/$my_username/accpw`); + + my $ssh = Net::OpenSSH::Compat::Perl->new($submithost, debug=>0); + + $ssh->login(); + + print STDERR "kill_all_and_quit\n"; + print STDERR "qdel $jid\n"; + # safesystem("qdel $jid"); + $ssh->cmd("qdel $jid"); + + print STDERR "The submitted jobs died not correctly\n"; + print STDERR "Send qdel signal to the submitted jobs\n"; + + exit(1); +} + +sub remove_temporary_files(){ + #removing temporary files + + unlink("${jobscript}"); + unlink("${jobscript}.log"); + unlink("$qsubout"); + unlink("$qsuberr"); + rmdir("$tmpdir"); +} + +sub safesystem { + print STDERR "Executing: @_\n"; + system(@_); + if ($? == -1) { + print STDERR "Failed to execute: @_\n $!\n"; + exit(1); + } + elsif ($? & 127) { + printf STDERR "Execution of: @_\n died with signal %d, %s coredump\n", + ($? & 127), ($? & 128) ? 'with' : 'without'; + exit(1); + } + else { + my $exitcode = $? >> 8; + print STDERR "Exit code: $exitcode\n" if $exitcode; + return ! $exitcode; + } +} + +# look for the correct pwdcmd (pwd by default, pawd if it exists) +# I assume that pwd always exists +sub getPwdCmd(){ + my $pwdcmd="pwd"; + my $a; + chomp($a=`which pawd | head -1 | awk '{print $1}'`); + if ($a && -e $a){ $pwdcmd=$a; } + return $pwdcmd; +} + diff --git a/contrib/mert-sge-nosync/generic/qsub-wrapper-sge-nosync.pl b/contrib/mert-sge-nosync/generic/qsub-wrapper-sge-nosync.pl new file mode 100755 index 0000000000..1a17b83fe1 --- /dev/null +++ b/contrib/mert-sge-nosync/generic/qsub-wrapper-sge-nosync.pl @@ -0,0 +1,320 @@ +#! /usr/bin/perl + +# $Id$ +use strict; + +####################### +#Default parameters +#parameters for submiiting processes through SGE +#NOTE: group name is ws06ossmt (with 2 's') and not ws06osmt (with 1 's') +my $queueparameters=""; + +# look for the correct pwdcmd +my $pwdcmd = getPwdCmd(); + +my $workingdir = `$pwdcmd`; chomp $workingdir; + +my $uniqtime = `date +"%s%N"`; chomp $uniqtime; +my $uid = "$$".".".$uniqtime; + + +my $tmpdir="$workingdir/tmp$uid"; +my $jobscript="$workingdir/job$uid.sh"; +my $qsubout="$workingdir/out.job$uid"; +my $qsuberr="$workingdir/err.job$uid"; + + +$SIG{INT} = \&kill_all_and_quit; # catch exception for CTRL-C + +my $help=""; +my $dbg=""; +my $version=""; +my $qsubname="WR$uid"; +my $cmd=""; +my $cmdout=undef; +my $cmderr=undef; +my $jidfile=undef; +my $pidfile=undef; +my $prevjid=undef; +my $parameters=""; +my $old_sge = 0; # assume grid engine < 6.0 +my $prevjidarraysize = 0; +my @prevjidarray = (); + +sub init(){ + use Getopt::Long qw(:config pass_through); + GetOptions('version'=>\$version, + 'help'=>\$help, + 'debug'=>\$dbg, + 'qsub-prefix=s'=> \$qsubname, + 'command=s'=> \$cmd, + 'stdout=s'=> \$cmdout, + 'stderr=s'=> \$cmderr, + 'jidfile=s'=> \$jidfile, + 'prevjid=s'=> \$prevjid, + 'queue-parameters=s'=> \$queueparameters, + 'old-sge' => \$old_sge, + ) or exit(1); + $parameters="@ARGV"; + + # print STDERR "INPUT prevjid =+$prevjid+\n"; + $prevjid =~ s/^\s+|\s+$//g; + # print STDERR "TRIMMED prevjid =+$prevjid+\n"; + + @prevjidarray = split(/\s+/,$prevjid); + $prevjidarraysize = scalar(@prevjidarray); + + # print STDERR "arraysize: $prevjidarraysize\n"; + + + + + version() if $version; + usage() if $help; + print_parameters() if $dbg; +} + +####################### +##print version +sub version(){ +# print STDERR "version 1.0 (29-07-2006)\n"; + print STDERR "version 1.1 (31-07-2006)\n"; + exit(1); +} + +#usage +sub usage(){ + print STDERR "qsub-wrapper.pl [options]\n"; + print STDERR "Options:\n"; + print STDERR "-command command to run\n"; + print STDERR "-stdout file to save stdout of cmd (optional)\n"; + print STDERR "-stderr file to save stderr of cmd (optional)\n"; + print STDERR "-jidfile file to save the submit jobid (for submit option)\n"; + print STDERR "-prevjid wait for the previous job with jobid=id to finish before starting (optional)\n"; + print STDERR "-qsub-prefix name for sumbitted jobs (optional)\n"; + print STDERR "-queue-parameters parameter for the queue (optional)\n"; + print STDERR "-old-sge ... assume Sun Grid Engine < 6.0\n"; + print STDERR "-debug debug\n"; + print STDERR "-version print version of the script\n"; + print STDERR "-help this help\n"; + exit(1); +} + +#printparameters +sub print_parameters(){ + print STDERR "command: $cmd\n"; + if (defined($cmdout)){ print STDERR "file for stdout: $cmdout\n"; } + else { print STDERR "file for stdout is not defined, stdout is discarded\n"; } + if (defined($cmderr)){ print STDERR "file for stdout: $cmderr\n"; } + else { print STDERR "file for stderr is not defined, stderr is discarded\n"; } + if (defined($jidfile)){ print STDERR "file for submit job id: $jidfile\n"; } + else { print STDERR "file for submit job id is not defined, jidfile is discarded\n"; } + print STDERR "Qsub name: $qsubname\n"; + print STDERR "Queue parameters: $queueparameters\n"; + print STDERR "parameters directly passed to cmd: $parameters\n"; + exit(1); +} + +#script creation +sub preparing_script(){ + my $scriptheader="\#\!/bin/bash\n# the above line is ignored by qsub, unless parameter \"-b yes\" is set!\n\n"; + $scriptheader.="uname -a\n\n"; + + $scriptheader.="cd $workingdir\n\n"; + + open (OUT, "> $jobscript"); + print OUT $scriptheader; + + print OUT "if $cmd $parameters > $tmpdir/cmdout$uid 2> $tmpdir/cmderr$uid ; then + echo 'succeeded' +else + echo failed with exit status \$\? + die=1 +fi +"; + + if (defined $cmdout){ + print OUT "mv -f $tmpdir/cmdout$uid $cmdout || echo failed to preserve the log: $tmpdir/cmdout$uid\n\n"; + } + else{ + print OUT "rm -f $tmpdir/cmdout$uid\n\n"; + } + + if (defined $cmderr){ + print OUT "mv -f $tmpdir/cmderr$uid $cmderr || echo failed to preserve the log: $tmpdir/cmderr$uid\n\n"; + } + else{ + print OUT "rm -f $tmpdir/cmderr$uid\n\n"; + } + print OUT "if [ x\$die == 1 ]; then exit 1; fi\n"; + close(OUT); + + #setting permissions of the script + chmod(oct(755),$jobscript); +} + +####################### +#Script starts here + +init(); + +usage() if $cmd eq ""; + +safesystem("mkdir -p $tmpdir") or die; + +preparing_script(); + +# my $maysync = $old_sge ? "" : "-sync y"; +# never run in syn mode +my $maysync = ""; + +my $qsubcmd = ""; +# create the qsubcmd to submit to the queue with the parameter "-b yes" +#my $qsubcmd="qsub $queueparameters $maysync -V -o $qsubout -e $qsuberr -N $qsubname -b yes $jobscript > $jobscript.log 2>&1"; + +# add -b yes if not yet defined, otherwise leave empty +$queueparameters .= " -b yes " if (index($queueparameters," -b ")==-1); + + +if (defined $prevjid && $prevjid!=-1 && $prevjidarraysize == 1) { + $qsubcmd="qsub $queueparameters $maysync -V -hold_jid $prevjid -o $qsubout -e $qsuberr -N $qsubname $jobscript > $jobscript.log 2>&1"; +} elsif (defined $prevjid && $prevjidarraysize > 1) { + my $hj = "-hold_jid " . join(" -hold_jid ", @prevjidarray); + # print STDERR "hj is $hj\n"; + $qsubcmd="qsub $queueparameters $maysync -V $hj -o $qsubout -e $qsuberr -N $qsubname $jobscript > $jobscript.log 2>&1"; +} else { + $qsubcmd="qsub $queueparameters $maysync -V -o $qsubout -e $qsuberr -N $qsubname $jobscript > $jobscript.log 2>&1"; +} + +print "submitting $qsubcmd\n"; + +#run the qsubcmd + +safesystem($qsubcmd) or die; + +#getting id of submitted job############# +my $res; +open (IN,"$jobscript.log") or die "Can't read main job id: $jobscript.log"; +chomp($res=); +my @arrayStr = split(/\s+/,$res); +my $id=$arrayStr[2]; +die "Failed to get job id from $jobscript.log, got: $res" + if $id !~ /^[0-9]+$/; +close(IN); +######################################### +print STDERR " res:$res\n"; +print STDERR " id:$id\n"; + +open (JIDOUT,">$jidfile") or die "Can't open jid file to write"; +print JIDOUT "$id\n"; +close(JIDOUT); + +open (PIDOUT,">$jidfile.pid") or die "Can't open id.pid file to write"; +print PIDOUT "$uid\n"; +close(PIDOUT); + +if ($old_sge) { + # need to workaround -sync, add another job that will wait for the main one + # prepare a fake waiting script + my $syncscript = "$jobscript.sync_workaround_script.sh"; + safesystem("echo 'date' > $syncscript") or die; + + my $checkpointfile = "$jobscript.sync_workaround_checkpoint"; + + # ensure checkpoint does not exist + safesystem("\\rm -f $checkpointfile") or die; + + # start the 'hold' job, i.e. the job that will wait +# $cmd="qsub -cwd $queueparameters -hold_jid $id -o $checkpointfile -e /dev/null -N $qsubname.W $syncscript >& $qsubname.W.log"; + $cmd="qsub -cwd $queueparameters -hold_jid $id -o $checkpointfile -e /dev/null -N $qsubname.W $syncscript >& $qsubname.W.log"; + safesystem($cmd) or die; + + # and wait for checkpoint file to appear + my $nr=0; + while (!-e $checkpointfile) { + sleep(10); + $nr++; + print STDERR "w" if $nr % 3 == 0; + } + safesystem("\\rm -f $checkpointfile $syncscript") or die(); + print STDERR "End of waiting workaround.\n"; +} + + + + +# my $failure=&check_exit_status(); +# print STDERR "check_exit_status returned $failure\n"; + +# &kill_all_and_quit() if $failure; + +# &remove_temporary_files() if !$dbg; + + + + + + + +sub check_exit_status(){ + my $failure=0; + + print STDERR "check_exit_status of submitted job $id\n"; + open(IN,"$qsubout") or die "Can't read $qsubout"; + while (){ + $failure=1 if (/failed with exit status/); + } + close(IN); + return $failure; +} + +sub kill_all_and_quit(){ + print STDERR "kill_all_and_quit\n"; + print STDERR "qdel $id\n"; + safesystem("qdel $id"); + + print STDERR "The submitted jobs died not correctly\n"; + print STDERR "Send qdel signal to the submitted jobs\n"; + + exit(1); +} + +sub remove_temporary_files(){ + #removing temporary files + + unlink("${jobscript}"); + unlink("${jobscript}.log"); + unlink("$qsubout"); + unlink("$qsuberr"); + rmdir("$tmpdir"); +} + +sub safesystem { + print STDERR "Executing: @_\n"; + system(@_); + if ($? == -1) { + print STDERR "Failed to execute: @_\n $!\n"; + exit(1); + } + elsif ($? & 127) { + printf STDERR "Execution of: @_\n died with signal %d, %s coredump\n", + ($? & 127), ($? & 128) ? 'with' : 'without'; + exit(1); + } + else { + my $exitcode = $? >> 8; + print STDERR "Exit code: $exitcode\n" if $exitcode; + return ! $exitcode; + } +} + +# look for the correct pwdcmd (pwd by default, pawd if it exists) +# I assume that pwd always exists +sub getPwdCmd(){ + my $pwdcmd="pwd"; + my $a; + chomp($a=`which pawd | head -1 | awk '{print $1}'`); + if ($a && -e $a){ $pwdcmd=$a; } + return $pwdcmd; +} + diff --git a/contrib/mert-sge-nosync/training/mert-moses-sge-nosync.pl b/contrib/mert-sge-nosync/training/mert-moses-sge-nosync.pl new file mode 100755 index 0000000000..6d6c083ce5 --- /dev/null +++ b/contrib/mert-sge-nosync/training/mert-moses-sge-nosync.pl @@ -0,0 +1,1633 @@ +#! /usr/bin/perl -w +# $Id$ +# Usage: +# mert-moses.pl +# For other options see below or run 'mert-moses.pl --help' + +# Notes: +# and should be raw text files, one sentence per line +# can be a prefix, in which case the files are 0, 1, etc. are used + +# Excerpts from revision history + +# Sept 2011 multi-threaded mert (Barry Haddow) +# 3 Aug 2011 Added random directions, historic best, pairwise ranked (PK) +# Jul 2011 simplifications (Ondrej Bojar) +# -- rely on moses' -show-weights instead of parsing moses.ini +# ... so moses is also run once *before* mert starts, checking +# the model to some extent +# -- got rid of the 'triples' mess; +# use --range to supply bounds for random starting values: +# --range tm:-3..3 --range lm:-3..3 +# 5 Aug 2009 Handling with different reference length policies (shortest, average, closest) for BLEU +# and case-sensistive/insensitive evaluation (Nicola Bertoldi) +# 5 Jun 2008 Forked previous version to support new mert implementation. +# 13 Feb 2007 Better handling of default values for lambda, now works with multiple +# models and lexicalized reordering +# 11 Oct 2006 Handle different input types through parameter --inputype=[0|1] +# (0 for text, 1 for confusion network, default is 0) (Nicola Bertoldi) +# 10 Oct 2006 Allow skip of filtering of phrase tables (--no-filter-phrase-table) +# useful if binary phrase tables are used (Nicola Bertoldi) +# 28 Aug 2006 Use either closest or average or shortest (default) reference +# length as effective reference length +# Use either normalization or not (default) of texts (Nicola Bertoldi) +# 31 Jul 2006 move gzip run*.out to avoid failure wit restartings +# adding default paths +# 29 Jul 2006 run-filter, score-nbest and mert run on the queue (Nicola; Ondrej had to type it in again) +# 28 Jul 2006 attempt at foolproof usage, strong checking of input validity, merged the parallel and nonparallel version (Ondrej Bojar) +# 27 Jul 2006 adding the safesystem() function to handle with process failure +# 22 Jul 2006 fixed a bug about handling relative path of configuration file (Nicola Bertoldi) +# 21 Jul 2006 adapted for Moses-in-parallel (Nicola Bertoldi) +# 18 Jul 2006 adapted for Moses and cleaned up (PK) +# 21 Jan 2005 unified various versions, thorough cleanup (DWC) +# now indexing accumulated n-best list solely by feature vectors +# 14 Dec 2004 reimplemented find_threshold_points in C (NMD) +# 25 Oct 2004 Use either average or shortest (default) reference +# length as effective reference length (DWC) +# 13 Oct 2004 Use alternative decoders (DWC) +# Original version by Philipp Koehn + +use strict; +use Net::OpenSSH::Compat::Perl; +use FindBin qw($Bin); +use File::Basename; +use File::Path; +use File::Spec; +use Cwd; + +my $SCRIPTS_ROOTDIR = $Bin; +$SCRIPTS_ROOTDIR =~ s/\/training$//; +$SCRIPTS_ROOTDIR = $ENV{"SCRIPTS_ROOTDIR"} if defined($ENV{"SCRIPTS_ROOTDIR"}); + +## We preserve this bit of comments to keep the traditional weight ranges. +# "w" => [ [ 0.0, -1.0, 1.0 ] ], # word penalty +# "d" => [ [ 1.0, 0.0, 2.0 ] ], # lexicalized reordering model +# "lm" => [ [ 1.0, 0.0, 2.0 ] ], # language model +# "g" => [ [ 1.0, 0.0, 2.0 ], # generation model +# [ 1.0, 0.0, 2.0 ] ], +# "tm" => [ [ 0.3, 0.0, 0.5 ], # translation model +# [ 0.2, 0.0, 0.5 ], +# [ 0.3, 0.0, 0.5 ], +# [ 0.2, 0.0, 0.5 ], +# [ 0.0,-1.0, 1.0 ] ], # ... last weight is phrase penalty +# "lex"=> [ [ 0.1, 0.0, 0.2 ] ], # global lexical model +# "I" => [ [ 0.0,-1.0, 1.0 ] ], # input lattice scores + + + +# moses.ini file uses FULL names for lambdas, while this training script +# internally (and on the command line) uses ABBR names. +my @ABBR_FULL_MAP = qw(d=weight-d lm=weight-l tm=weight-t w=weight-w + g=weight-generation lex=weight-lex I=weight-i); +my %ABBR2FULL = map {split/=/,$_,2} @ABBR_FULL_MAP; +my %FULL2ABBR = map {my ($a, $b) = split/=/,$_,2; ($b, $a);} @ABBR_FULL_MAP; + +my $minimum_required_change_in_weights = 0.00001; + # stop if no lambda changes more than this + +my $verbose = 0; +my $usage = 0; # request for --help + +# We assume that if you don't specify working directory, +# we set the default is set to `pwd`/mert-work + +my $___FIRSTJOBWAITID = undef; # wait for a job in the grid before first job starts + +my $___WORKING_DIR = File::Spec->catfile(Cwd::getcwd(), "mert-work"); +my $___DEV_F = undef; # required, input text to decode +my $___DEV_E = undef; # required, basename of files with references +my $___DECODER = undef; # required, pathname to the decoder executable +my $___CONFIG = undef; # required, pathname to startup ini file +my $___N_BEST_LIST_SIZE = 100; +my $___LATTICE_SAMPLES = 0; +my $queue_flags = "-hard"; # extra parameters for parallelizer + # the -l ws0ssmt was relevant only to JHU 2006 workshop +my $___JOBS = undef; # if parallel, number of jobs to use (undef or 0 -> serial) +my $___DECODER_FLAGS = ""; # additional parametrs to pass to the decoder +my $qsubprefix = ""; +my $continue = 0; # should we try to continue from the last saved step? +my $skip_decoder = 0; # and should we skip the first decoder run (assuming we got interrupted during mert) +my $___FILTER_PHRASE_TABLE = 1; # filter phrase table +my $___PREDICTABLE_SEEDS = 0; +my $___START_WITH_HISTORIC_BESTS = 0; # use best settings from all previous iterations as starting points [Foster&Kuhn,2009] +my $___RANDOM_DIRECTIONS = 0; # search in random directions only +my $___NUM_RANDOM_DIRECTIONS = 0; # number of random directions, also works with default optimizer [Cer&al.,2008] +my $___PAIRWISE_RANKED_OPTIMIZER = 0; # use Hopkins&May[2011] +my $___PRO_STARTING_POINT = 0; # get a starting point from pairwise ranked optimizer +my $___RANDOM_RESTARTS = 20; +my $___HISTORIC_INTERPOLATION = 0; # interpolate optimize weights with previous iteration's weights [Hopkins&May,2011,5.4.3] +my $__THREADS = 0; + +# Parameter for effective reference length when computing BLEU score +# Default is to use shortest reference +# Use "--shortest" to use shortest reference length +# Use "--average" to use average reference length +# Use "--closest" to use closest reference length +# Only one between --shortest, --average and --closest can be set +# If more than one choice the defualt (--shortest) is used +my $___SHORTEST = 0; +my $___AVERAGE = 0; +my $___CLOSEST = 0; + +# Use "--nocase" to compute case-insensitive scores +my $___NOCASE = 0; + +# Use "--nonorm" to non normalize translation before computing scores +my $___NONORM = 0; + +# set 0 if input type is text, set 1 if input type is confusion network +my $___INPUTTYPE = 0; + + +my $mertdir = undef; # path to new mert directory +my $mertargs = undef; # args to pass through to mert & extractor +my $mertmertargs = undef; # args to pass through to mert only +my $extractorargs = undef; # args to pass through to extractor only +my $filtercmd = undef; # path to filter-model-given-input.pl +my $submithost = undef; +my $filterfile = undef; +my $qsubwrapper = undef; +my $qsubwrapper_exit = undef; +my $moses_parallel_cmd = undef; +my $poll_decoder_cmd = undef; +my $zipextcmd = undef; +my $zipextargs = undef; +my $processresultcmd = undef; +my $processresultargs = undef; +my $old_sge = 0; # assume sge<6.0 +my $___CONFIG_ORIG = undef; # pathname to startup ini file before filtering +my $___ACTIVATE_FEATURES = undef; # comma-separated (or blank-separated) list of features to work on + # if undef work on all features + # (others are fixed to the starting values) +my $___RANGES = undef; +my $prev_aggregate_nbl_size = -1; # number of previous step to consider when loading data (default =-1) + # -1 means all previous, i.e. from iteration 1 + # 0 means no previous data, i.e. from actual iteration + # 1 means 1 previous data , i.e. from the actual iteration and from the previous one + # and so on +my $maximum_iterations = 25; +my $cmd = undef; + +##################### +my $processfeatlistcmd = undef; +my $processfeatlistargs = undef; +my $createconfigcmd = undef; +my $createconfigargs = undef; +my $decoderargs = undef; +##################### + +use Getopt::Long; +GetOptions( + "prevjid=i" => \$___FIRSTJOBWAITID, + "working-dir=s" => \$___WORKING_DIR, + "input=s" => \$___DEV_F, + "inputtype=i" => \$___INPUTTYPE, + "refs=s" => \$___DEV_E, + "decoder=s" => \$___DECODER, + "config=s" => \$___CONFIG, + "nbest=i" => \$___N_BEST_LIST_SIZE, + "lattice-samples=i" => \$___LATTICE_SAMPLES, + "submithost=s" => \$submithost, + "queue-flags=s" => \$queue_flags, + "jobs=i" => \$___JOBS, + "decoder-flags=s" => \$___DECODER_FLAGS, + "continue" => \$continue, + "skip-decoder" => \$skip_decoder, + "shortest" => \$___SHORTEST, + "average" => \$___AVERAGE, + "closest" => \$___CLOSEST, + "nocase" => \$___NOCASE, + "nonorm" => \$___NONORM, + "help" => \$usage, + "verbose" => \$verbose, + "mertdir=s" => \$mertdir, + "mertargs=s" => \$mertargs, + "extractorargs=s" => \$extractorargs, + "mertmertargs=s" => \$mertmertargs, + "rootdir=s" => \$SCRIPTS_ROOTDIR, + "filtercmd=s" => \$filtercmd, # allow to override the default location + "filterfile=s" => \$filterfile, # input to filtering script (useful for lattices/confnets) + "qsubwrapper=s" => \$qsubwrapper, # allow to override the default location + "mosesparallelcmd=s" => \$moses_parallel_cmd, # allow to override the default location + "old-sge" => \$old_sge, #passed to moses-parallel + "filter-phrase-table!" => \$___FILTER_PHRASE_TABLE, # (dis)allow of phrase tables + "predictable-seeds" => \$___PREDICTABLE_SEEDS, # make random restarts deterministic + "historic-bests" => \$___START_WITH_HISTORIC_BESTS, # use best settings from all previous iterations as starting points + "random-directions" => \$___RANDOM_DIRECTIONS, # search only in random directions + "number-of-random-directions=i" => \$___NUM_RANDOM_DIRECTIONS, # number of random directions + "random-restarts=i" => \$___RANDOM_RESTARTS, # number of random restarts + "activate-features=s" => \$___ACTIVATE_FEATURES, #comma-separated (or blank-separated) list of features to work on (others are fixed to the starting values) + "range=s@" => \$___RANGES, + "prev-aggregate-nbestlist=i" => \$prev_aggregate_nbl_size, #number of previous step to consider when loading data (default =-1, i.e. all previous) + "maximum-iterations=i" => \$maximum_iterations, + "pairwise-ranked" => \$___PAIRWISE_RANKED_OPTIMIZER, + "pro-starting-point" => \$___PRO_STARTING_POINT, + "historic-interpolation=f" => \$___HISTORIC_INTERPOLATION, + "threads=i" => \$__THREADS +) or exit(1); + +# the 4 required parameters can be supplied on the command line directly +# or using the --options +if (scalar @ARGV == 4) { + # required parameters: input_file references_basename decoder_executable + $___DEV_F = shift; + $___DEV_E = shift; + $___DECODER = shift; + $___CONFIG = shift; +} + +if ($usage || !defined $___DEV_F || !defined $___DEV_E || !defined $___DECODER || !defined $___CONFIG) { + print STDERR "usage: $0 input-text references decoder-executable decoder.ini +Options: + --prevjid=i ... previous job SGE ID to wait before first job starts + --working-dir=mert-dir ... where all the files are created + --nbest=100 ... how big nbestlist to generate + --lattice-samples ... how many lattice samples (Chatterjee & Cancedda, emnlp 2010) + --jobs=N ... set this to anything to run moses in parallel + --mosesparallelcmd=STR ... use a different script instead of moses-parallel + --submithost=STRING ... submithost from where qsub operates + --queue-flags=STRING ... anything you with to pass to qsub, eg. + '-l ws06osssmt=true'. The default is: '-hard' + To reset the parameters, please use + --queue-flags=' ' + (i.e. a space between the quotes). + --decoder-flags=STRING ... extra parameters for the decoder + --continue ... continue from the last successful iteration + --skip-decoder ... skip the decoder run for the first time, + assuming that we got interrupted during + optimization + --shortest --average --closest + ... Use shortest/average/closest reference length + as effective reference length (mutually exclusive) + --nocase ... Do not preserve case information; i.e. + case-insensitive evaluation (default is false). + --nonorm ... Do not use text normalization (flag is not active, + i.e. text is NOT normalized) + --filtercmd=STRING ... path to filter-model-given-input.pl + --filterfile=STRING ... path to alternative to input-text for filtering + model. useful for lattice decoding + --rootdir=STRING ... where do helpers reside (if not given explicitly) + --mertdir=STRING ... path to new mert implementation + --mertargs=STRING ... extra args for both extractor and mert + --extractorargs=STRING ... extra args for extractor only + --mertmertargs=STRING ... extra args for mert only + --scorenbestcmd=STRING ... path to score-nbest.py + --old-sge ... passed to parallelizers, assume Grid Engine < 6.0 + --inputtype=[0|1|2] ... Handle different input types: (0 for text, + 1 for confusion network, 2 for lattices, + default is 0) + --no-filter-phrase-table ... disallow filtering of phrase tables + (useful if binary phrase tables are available) + --random-restarts=INT ... number of random restarts (default: 20) + --predictable-seeds ... provide predictable seeds to mert so that random + restarts are the same on every run + --range=tm:0..1,-1..1 ... specify min and max value for some features + --range can be repeated as needed. + The order of the various --range specifications + is important only within a feature name. + E.g.: + --range=tm:0..1,-1..1 --range=tm:0..2 + is identical to: + --range=tm:0..1,-1..1,0..2 + but not to: + --range=tm:0..2 --range=tm:0..1,-1..1 + --activate-features=STRING ... comma-separated list of features to optimize, + others are fixed to the starting values + default: optimize all features + example: tm_0,tm_4,d_0 + --prev-aggregate-nbestlist=INT ... number of previous step to consider when + loading data (default = $prev_aggregate_nbl_size) + -1 means all previous, i.e. from iteration 1 + 0 means no previous data, i.e. only the + current iteration + N means this and N previous iterations + + --maximum-iterations=ITERS ... Maximum number of iterations. Default: $maximum_iterations + --random-directions ... search only in random directions + --number-of-random-directions=int ... number of random directions + (also works with regular optimizer, default: 0) + --pairwise-ranked ... Use PRO for optimisation (Hopkins and May, emnlp 2011) + --pro-starting-point ... Use PRO to get a starting point for MERT + --threads=NUMBER ... Use multi-threaded mert (must be compiled in). + --historic-interpolation ... Interpolate optimized weights with prior iterations' weight + (parameter sets factor [0;1] given to current weights) +"; + exit 1; +} + + +# Check validity of input parameters and set defaults if needed + +print STDERR "Using SCRIPTS_ROOTDIR: $SCRIPTS_ROOTDIR\n"; + +# path of script for filtering phrase tables and running the decoder +$filtercmd="$SCRIPTS_ROOTDIR/training/filter-model-given-input.pl" if !defined $filtercmd; + +if ( ! -x $filtercmd && ! $___FILTER_PHRASE_TABLE) { + print STDERR "Filtering command not found: $filtercmd.\n"; + print STDERR "Use --filtercmd=PATH to specify a valid one or --no-filter-phrase-table\n"; + exit 1; +} + +$qsubwrapper = "$SCRIPTS_ROOTDIR/generic/qsub-wrapper-sge-nosync.pl" if !defined $qsubwrapper; + +$qsubwrapper_exit = "$SCRIPTS_ROOTDIR/generic/qsub-wrapper-exit-sge-nosync.pl" if !defined $qsubwrapper_exit; + +$moses_parallel_cmd = "$SCRIPTS_ROOTDIR/generic/moses-parallel-sge-nosync.pl" + if !defined $moses_parallel_cmd; + +if (!defined $mertdir) { + $mertdir = "$SCRIPTS_ROOTDIR/../mert"; + print STDERR "Assuming --mertdir=$mertdir\n"; +} + +my $mert_extract_cmd = "$mertdir/extractor"; +my $mert_mert_cmd = "$mertdir/mert"; +my $mert_pro_cmd = "$mertdir/pro"; + +die "Not executable: $mert_extract_cmd" if ! -x $mert_extract_cmd; +die "Not executable: $mert_mert_cmd" if ! -x $mert_mert_cmd; +die "Not executable: $mert_pro_cmd" if ! -x $mert_pro_cmd; + +my $pro_optimizer = "$mertdir/megam_i686.opt"; # or set to your installation +if (($___PAIRWISE_RANKED_OPTIMIZER || $___PRO_STARTING_POINT) && ! -x $pro_optimizer) { + print "did not find $pro_optimizer, installing it in $mertdir\n"; + `cd $mertdir; wget http://www.cs.utah.edu/~hal/megam/megam_i686.opt.gz;`; + `gunzip $pro_optimizer.gz`; + `chmod +x $pro_optimizer`; + die("ERROR: Installation of megam_i686.opt failed! Install by hand from http://www.cs.utah.edu/~hal/megam/") unless -x $pro_optimizer; +} + +$mertargs = "" if !defined $mertargs; + +my $scconfig = undef; +if ($mertargs =~ /\-\-scconfig\s+(.+?)(\s|$)/){ + $scconfig=$1; + $scconfig =~ s/\,/ /g; + $mertargs =~ s/\-\-scconfig\s+(.+?)(\s|$)//; +} + +# handling reference lengh strategy +if (($___CLOSEST + $___AVERAGE + $___SHORTEST) > 1){ + die "You can specify just ONE reference length strategy (closest or shortest or average) not both\n"; +} + +if ($___SHORTEST){ + $scconfig .= " reflen:shortest"; +}elsif ($___AVERAGE){ + $scconfig .= " reflen:average"; +}elsif ($___CLOSEST){ + $scconfig .= " reflen:closest"; +} + +# handling case-insensitive flag +if ($___NOCASE) { + $scconfig .= " case:false"; +}else{ + $scconfig .= " case:true"; +} +$scconfig =~ s/^\s+//; +$scconfig =~ s/\s+$//; +$scconfig =~ s/\s+/,/g; + +$scconfig = "--scconfig $scconfig" if ($scconfig); + +my $mert_extract_args=$mertargs; +$mert_extract_args .=" $scconfig"; +$mert_extract_args .=" $extractorargs"; + +$mertmertargs = "" if !defined $mertmertargs; + +my $mert_mert_args="$mertargs $mertmertargs"; +$mert_mert_args =~ s/\-+(binary|b)\b//; +$mert_mert_args .=" $scconfig"; +if ($___ACTIVATE_FEATURES){ $mert_mert_args .=" -o \"$___ACTIVATE_FEATURES\""; } + +my ($just_cmd_filtercmd,$x) = split(/ /,$filtercmd); +die "Not executable: $just_cmd_filtercmd" if ! -x $just_cmd_filtercmd; +die "Not executable: $moses_parallel_cmd" if defined $___JOBS && ! -x $moses_parallel_cmd; +die "Not executable: $qsubwrapper" if defined $___JOBS && ! -x $qsubwrapper; +die "Not executable: $___DECODER" if ! -x $___DECODER; + +my $input_abs = ensure_full_path($___DEV_F); +die "File not found: $___DEV_F (interpreted as $input_abs)." + if ! -e $input_abs; +$___DEV_F = $input_abs; + +# Option to pass to qsubwrapper and moses-parallel +my $pass_old_sge = $old_sge ? "-old-sge" : ""; + +my $decoder_abs = ensure_full_path($___DECODER); +die "File not executable: $___DECODER (interpreted as $decoder_abs)." + if ! -x $decoder_abs; +$___DECODER = $decoder_abs; + +my $ref_abs = ensure_full_path($___DEV_E); +# check if English dev set (reference translations) exist and store a list of all references +my @references; +if (-e $ref_abs) { + push @references, $ref_abs; +} +else { + # if multiple file, get a full list of the files + my $part = 0; + if (! -e $ref_abs."0" && -e $ref_abs.".ref0") { + $ref_abs .= ".ref"; + } + while (-e $ref_abs.$part) { + push @references, $ref_abs.$part; + $part++; + } + die("Reference translations not found: $___DEV_E (interpreted as $ref_abs)") unless $part; +} + +my $config_abs = ensure_full_path($___CONFIG); +die "File not found: $___CONFIG (interpreted as $config_abs)." + if ! -e $config_abs; +$___CONFIG = $config_abs; + +# moses should use our config +if ($___DECODER_FLAGS =~ /(^|\s)-(config|f) / +|| $___DECODER_FLAGS =~ /(^|\s)-(ttable-file|t) / +|| $___DECODER_FLAGS =~ /(^|\s)-(distortion-file) / +|| $___DECODER_FLAGS =~ /(^|\s)-(generation-file) / +|| $___DECODER_FLAGS =~ /(^|\s)-(lmodel-file) / +|| $___DECODER_FLAGS =~ /(^|\s)-(global-lexical-file) / +) { + die "It is forbidden to supply any of -config, -ttable-file, -distortion-file, -generation-file or -lmodel-file in the --decoder-flags.\nPlease use only the --config option to give the config file that lists all the supplementary files."; +} + +# as weights are normalized in the next steps (by cmert) +# normalize initial LAMBDAs, too +my $need_to_normalize = 1; + +#store current directory and create the working directory (if needed) +my $cwd = `pawd 2>/dev/null`; +if(!$cwd){$cwd = `pwd`;} +chomp($cwd); + +mkpath($___WORKING_DIR); + +{ +# open local scope + +#chdir to the working directory +chdir($___WORKING_DIR) or die "Can't chdir to $___WORKING_DIR"; + +# fixed file names +my $mert_outfile = "mert.out"; +my $mert_logfile = "mert.log"; +my $weights_in_file = "init.opt"; +my $weights_out_file = "weights.txt"; + +# set start run +my $start_run = 1; ## START FROM run>1 is not supported +my $bestpoint = undef; +my $devbleu = undef; +my $sparse_weights_file = undef; +my $jobid = -1; + +my $prev_feature_file = undef; +my $prev_score_file = undef; +my $prev_init_file = undef; + + +######################### +# set jobid to trace different jobs +my $prevjid = undef; + + +################################################## +# STEP 1: FILTER PHRASE TABLE #################### +################################################## + +if ($___FILTER_PHRASE_TABLE) { + my $outdir = "filtered"; + if (-e "$outdir/moses.ini") { + print STDERR "Assuming the tables are already filtered, reusing $outdir/moses.ini\n"; + } + else { + # filter the phrase tables with respect to input, use --decoder-flags + print STDERR "filtering the phrase tables... ".`date`; + my $___FILTER_F = $___DEV_F; + $___FILTER_F = $filterfile if (defined $filterfile); + $cmd = "$filtercmd ./$outdir $___CONFIG $___FILTER_F"; + if (!defined $___FIRSTJOBWAITID) { + # &submit_or_exec($cmd,"filterphrases.out","filterphrases.err","filterphrases.id"); + $qsubprefix = "filph"; + &submit_or_exec_thu_host($submithost,"","",$cmd,"","filterphrases.out","filterphrases.err","filterphrases.id"); + } else { + # &submit_or_exec($cmd,"filterphrases.out","filterphrases.err","filterphrases.id",$___FIRSTJOBWAITID); + $qsubprefix = "filph"; + &submit_or_exec_thu_host($submithost,"","",$cmd,"","filterphrases.out","filterphrases.err","filterphrases.id",$___FIRSTJOBWAITID); + } + chomp($jobid=`tail -n 1 filterphrases.id`); + $prevjid = $jobid; + print STDERR "JOBID for filterphrases is $prevjid\n"; + ## clear up tmp + &exit_submit_thu_host($submithost,"","","","filterphrases.out","filterphrases.err","filterphrases.id","filterphrases.id.pid",$prevjid); + } + + # make a backup copy of startup ini filepath + $___CONFIG_ORIG = $___CONFIG; + # the decoder should now use the filtered model + $___CONFIG = "$outdir/moses.ini"; +} +else{ + # do not filter phrase tables (useful if binary phrase tables are available) + # use the original configuration file + $___CONFIG_ORIG = $___CONFIG; +} + +################################################# +######## STEP 2: CHECK moses.ini ################ +################################################# + + +# path of script for filtering phrase tables and running the decoder ------------ +$processfeatlistcmd="$SCRIPTS_ROOTDIR/training/sge-nosync/process-featlist-sge-nosync.pl" if !defined $processfeatlistcmd; + +$processfeatlistargs = "" if !defined $processfeatlistargs; +$processfeatlistargs = "$processfeatlistargs --range $___RANGES" if (defined $___RANGES); +$processfeatlistargs = "$processfeatlistargs --decoder-flags $___DECODER_FLAGS" if (!$___DECODER_FLAGS eq ""); + +$cmd = "$processfeatlistcmd $___DECODER $___CONFIG --inputtype $___INPUTTYPE $processfeatlistargs"; + +if (defined $prevjid) { + $qsubprefix = "proclist"; + &submit_or_exec_thu_host($submithost,"","",$cmd,"","processfeatlist.out","processfeatlist.err","processfeatlist.id",$prevjid); +} else { + $qsubprefix = "proclist"; + &submit_or_exec_thu_host($submithost,"","",$cmd,"","processfeatlist.out","processfeatlist.err","processfeatlist.id"); +} +chomp($jobid=`tail -n 1 processfeatlist.id`); +$prevjid = $jobid; +#---------------------------------------------------------------------------------- +## clear up tmp +&exit_submit_thu_host($submithost,"","","","processfeatlist.out","processfeatlist.err","processfeatlist.id","processfeatlist.id.pid",$prevjid); + +# we run moses to check validity of moses.ini and to obtain all the feature +# names +##COPIED# my $featlist = get_featlist_from_moses($___CONFIG); +##COPIED#$featlist = insert_ranges_to_featlist($featlist, $___RANGES); +##COPIED# +##COPIED## Mark which features are disabled: +##COPIED#if (defined $___ACTIVATE_FEATURES) { +##COPIED# my %enabled = map { ($_, 1) } split /[, ]+/, $___ACTIVATE_FEATURES; +##COPIED# my %cnt; +##COPIED# for(my $i=0; $i{"names"}}); $i++) { +##COPIED# my $name = $featlist->{"names"}->[$i]; +##COPIED# $cnt{$name} = 0 if !defined $cnt{$name}; +##COPIED# $featlist->{"enabled"}->[$i] = $enabled{$name."_".$cnt{$name}}; +##COPIED# $cnt{$name}++; +##COPIED# } +##COPIED#} else { +##COPIED# # all enabled +##COPIED# for(my $i=0; $i{"names"}}); $i++) { +##COPIED# $featlist->{"enabled"}->[$i] = 1; +##COPIED# } +##COPIED#} +##COPIED# +##COPIED#print STDERR "MERT starting values and ranges for random generation:\n"; +##COPIED#for(my $i=0; $i{"names"}}); $i++) { +##COPIED# my $name = $featlist->{"names"}->[$i]; +##COPIED# my $val = $featlist->{"values"}->[$i]; +##COPIED# my $min = $featlist->{"mins"}->[$i]; +##COPIED# my $max = $featlist->{"maxs"}->[$i]; +##COPIED# my $enabled = $featlist->{"enabled"}->[$i]; +##COPIED# printf STDERR " %5s = %7.3f", $name, $val; +##COPIED# if ($enabled) { +##COPIED# printf STDERR " (%5.2f .. %5.2f)\n", $min, $max; +##COPIED# } else { +##COPIED# print STDERR " --- inactive, not optimized ---\n"; +##COPIED# } +##COPIED#} + +############################################################## +# if continue from last section ###### +###################################### +##!#if ($continue) { +##!# # getting the last finished step +##!# print STDERR "Trying to continue an interrupted optimization.\n"; +##!# open IN, "finished_step.txt" or die "Failed to find the step number, failed to read finished_step.txt"; +##!# my $step = ; +##!# chomp $step; +##!# close IN; +##!# +##!# print STDERR "Last finished step is $step\n"; +##!# +##!# # getting the first needed step +##!# my $firststep; +##!# if ($prev_aggregate_nbl_size==-1){ +##!# $firststep=1; +##!# } +##!# else{ +##!# $firststep=$step-$prev_aggregate_nbl_size+1; +##!# $firststep=($firststep>0)?$firststep:1; +##!# } +##!# +##!##checking if all needed data are available +##!## get $prev_feature_file, $prev_score_file, $prev_init_file +##!# if ($firststep<=$step){ +##!# print STDERR "First previous needed data index is $firststep\n"; +##!# print STDERR "Checking whether all needed data (from step $firststep to step $step) are available\n"; +##!# +##!# for (my $prevstep=$firststep; $prevstep<=$step;$prevstep++){ +##!# print STDERR "Checking whether data of step $prevstep are available\n"; +##!# if (! -e "run$prevstep.features.dat"){ +##!# die "Can't start from step $step, because run$prevstep.features.dat was not found!"; +##!# }else{ +##!# if (defined $prev_feature_file){ +##!# $prev_feature_file = "${prev_feature_file},run$prevstep.features.dat"; +##!# } +##!# else{ +##!# $prev_feature_file = "run$prevstep.features.dat"; +##!# } +##!# } +##!# if (! -e "run$prevstep.scores.dat"){ +##!# die "Can't start from step $step, because run$prevstep.scores.dat was not found!"; +##!# }else{ +##!# if (defined $prev_score_file){ +##!# $prev_score_file = "${prev_score_file},run$prevstep.scores.dat"; +##!# } +##!# else{ +##!# $prev_score_file = "run$prevstep.scores.dat"; +##!# } +##!# } +##!# if (! -e "run$prevstep.${weights_in_file}"){ +##!# die "Can't start from step $step, because run$prevstep.${weights_in_file} was not found!"; +##!# }else{ +##!# if (defined $prev_init_file){ +##!# $prev_init_file = "${prev_init_file},run$prevstep.${weights_in_file}"; +##!# } +##!# else{ +##!# $prev_init_file = "run$prevstep.${weights_in_file}"; +##!# } +##!# } +##!# } +##!# if (! -e "run$step.weights.txt"){ +##!# die "Can't start from step $step, because run$step.weights.txt was not found!"; +##!# } +##!# if (! -e "run$step.$mert_logfile"){ +##!# die "Can't start from step $step, because run$step.$mert_logfile was not found!"; +##!# } +##!# if (! -e "run$step.best$___N_BEST_LIST_SIZE.out.gz"){ +##!# die "Can't start from step $step, because run$step.best$___N_BEST_LIST_SIZE.out.gz was not found!"; +##!# } +##!# print STDERR "All needed data are available\n"; +##!# +##!# print STDERR "Loading information from last step ($step)\n"; +##!# my %dummy; # sparse features +##!# ($bestpoint,$devbleu) = &get_weights_from_mert("run$step.$mert_outfile","run$step.$mert_logfile",scalar @{$featlist->{"names"}},\%dummy); +##!# die "Failed to parse mert.log, missed Best point there." +##!# if !defined $bestpoint || !defined $devbleu; +##!# print "($step) BEST at $step $bestpoint => $devbleu at ".`date`; +##!# my @newweights = split /\s+/, $bestpoint; +##!# +##!# # Sanity check: order of lambdas must match +##!# sanity_check_order_of_lambdas($featlist, +##!# "gunzip -c < run$step.best$___N_BEST_LIST_SIZE.out.gz |"); +##!# +##!# # update my cache of lambda values +##!# $featlist->{"values"} = \@newweights; +##!# } +##!# else{ +##!# print STDERR "No previous data are needed\n"; +##!# } +##!# +##!# $start_run = $step +1; +##!# } +##################################### +## If continue from last section #### +##################################### + + +print STDERR "I am about to start main loop!!!\n"; + +### load featlist when needed +# my $featlist = get_featlist_from_moses($___CONFIG); +# my $featlist = undef; +###### MERT MAIN LOOP + + + +my $run=$start_run-1; + +my $oldallsorted = undef; +my $allsorted = undef; + +my $nbest_file=undef; +my $lsamp_file=undef; #Lattice samples +my $orig_nbest_file=undef; # replaced if lattice sampling + + + +# ------------------------------------------------------------------------ +# ------ get_featlist_and_create_config (only for run 1) ----------------- +# ------------------------------------------------------------------------ +$createconfigcmd="$SCRIPTS_ROOTDIR/training/sge-nosync/create-config-sge-nosync.pl" if !defined $createconfigcmd; + +$createconfigargs = "" if !defined $createconfigargs; +$createconfigargs = "$createconfigargs --range $___RANGES" if (defined $___RANGES); +$createconfigargs = "$createconfigargs --decoder-flags $___DECODER_FLAGS" if (!$___DECODER_FLAGS eq ""); +$createconfigargs = "$createconfigargs --devbleu $devbleu" if (defined $devbleu); +$createconfigargs = "$createconfigargs --sparse_weights_file $sparse_weights_file" if (defined $sparse_weights_file); +$createconfigargs = "$createconfigargs --working-dir $___WORKING_DIR" if (defined $___WORKING_DIR); + +my $cmd = "$createconfigcmd $___DEV_F $___DECODER $___CONFIG first --inputtype $___INPUTTYPE $createconfigargs"; + +if (defined $prevjid) { + $qsubprefix = "firstcfg"; + &submit_or_exec_thu_host($submithost,"","",$cmd,"","createconfigfirstrun.out","createconfigfirstrun.err","createconfigfirstrun.id",$prevjid); +} else { + $qsubprefix = "firstcfg"; + &submit_or_exec_thu_host($submithost,"","",$cmd,"","createconfigfirstrun.out","createconfigfirstrun.err","createconfigfirstrun.id"); +} +chomp($jobid=`tail -n 1 createconfigfirstrun.id`); +$prevjid = $jobid; +## clear up tmp +&exit_submit_thu_host($submithost,"","","","createconfigfirstrun.out","createconfigfirstrun.err","createconfigfirstrun.id","createconfigfirstrun.id.pid",$prevjid); + +##COPIED# create_config($___CONFIG, "./run$run.moses.ini", $featlist, $run, (defined$devbleu?$devbleu:"--not-estimated--"),$sparse_weights_file); +# ------------------------------------------------------------------------- +# ------------------------------------------------------------------------- +print "create config for first run is done!\n"; + + +while(1) { + $run++; + if ($maximum_iterations && $run > $maximum_iterations) { + print "Maximum number of iterations exceeded - stopping\n"; + last; + } + # run beamdecoder with option to output nbestlists + # the end result should be (1) @NBEST_LIST, a list of lists; (2) @SCORE, a list of lists of lists + + print "run $run start at ".`date`; + + + + + ################################################### + # step 3: decode + ################################################### + +# path of script for running the decoder ------------ +$moses_parallel_cmd="$SCRIPTS_ROOTDIR/generic/moses-parallel-sge-nosync.pl" if !defined $moses_parallel_cmd; +my $decoder_cmd; + +if (defined $___JOBS && $___JOBS > 0 ) { + # not support -lattice-samples + # $decoder_cmd = "$moses_parallel_cmd $pass_old_sge -config $___CONFIG -inputtype $___INPUTTYPE -queue-parameters \"$queue_flags\" -decoder-flags $___DECODER_FLAGS -lattice-samples $___LATTICE_SAMPLES -n-best-list-size $___N_BEST_LIST_SIZE -input-file $___DEV_F -jobs $___JOBS -decoder $___DECODER -run $run -need-to-normalize $need_to_normalize -working-dir $___WORKING_DIR -qsubwrapper $qsubwrapper > run$run.out"; + + $decoderargs = ""; + ### DO NOT pass $___DECODER_FLAGS!! load the latest decoding parameter from inside the script + # $decoderargs = "-decoder-flags $___DECODER_FLAGS " if (!$___DECODER_FLAGS eq ""); + $decoderargs = "-script-rootdir $SCRIPTS_ROOTDIR " if (!$SCRIPTS_ROOTDIR eq ""); + $decoderargs = "$decoderargs -lattice-samples $___LATTICE_SAMPLES " if ($___LATTICE_SAMPLES != 0); + + $decoder_cmd = "$moses_parallel_cmd $pass_old_sge -config $___CONFIG -inputtype $___INPUTTYPE -submithost \"$submithost\" -queue-parameters \"$queue_flags\" $decoderargs -n-best-list-size $___N_BEST_LIST_SIZE -input-file $___DEV_F -jobs $___JOBS -decoder $___DECODER -run $run -need-to-normalize $need_to_normalize -working-dir $___WORKING_DIR -qsubwrapper $qsubwrapper -qsubwrapper-exit $qsubwrapper_exit > run$run.out"; +} else { + print STDERR "Execute without going through grid is not supported!\n"; + exit(1); +} + +if (defined $prevjid) { + $qsubprefix="decode$run"; + &submit_or_exec_thu_host($submithost,"","",$decoder_cmd,"","decode$run.out","decode$run.err","decode$run.id",$prevjid); +} else { + $qsubprefix="decode$run"; + &submit_or_exec_thu_host($submithost,"","",$decoder_cmd,"","decode$run.out","decode$run.err","decode$run.id"); +} +## may have to change to decode$run.last.id to retrieve later job id. +$need_to_normalize = 0; +chomp($jobid=`tail -n 1 decode$run.id`); +$prevjid = $jobid; + +# safesystem($decode_cmd) or die "The decoder died. CONFIG WAS $decoder_config \n"; + + ################################################### + # step 4: define wait job + ################################################### + $poll_decoder_cmd="$SCRIPTS_ROOTDIR/training/sge-nosync/poll-decoder.pl -poll-target decode$run.W.out"; + + if (defined $prevjid) { + $qsubprefix = "poll$run"; + &submit_or_exec_thu_host($submithost,"","",$poll_decoder_cmd,"","decode$run.POLL.out","decode$run.POLL.err","decode$run.POLL.id",$prevjid); + } else { + die "Step 4 (poll_decoder): Cannot find previous process for sequential submit\n"; + } + + chomp($jobid=`tail -n 1 decode$run.POLL.id`); + $prevjid = $jobid; + + ################################################## + # clear-up (step 3 and step 4) + ################################################## + # job for moses-parallel-sge-nosync.pl + &exit_submit_thu_host($submithost,"","","","decode$run.out","decode$run.err","decode$run.id","decode$run.id.pid",$prevjid); + ## waitall.sh job (cannot submit here because pid not established) + ##&exit_submit("decode$run.W.out","decode$run.W.err","decode$run.W.id","decode$run.W.id.pid",$prevjid); + # polling job + &exit_submit_thu_host($submithost,"","","","decode$run.POLL.out","decode$run.POLL.err","decode$run.POLL.id","decode$run.POLL.id.pid",$prevjid); + + + + ################################################### + # step 5: zip and extract + ################################################### + $zipextcmd="$SCRIPTS_ROOTDIR/training/sge-nosync/zipextract-decoder-result.pl" if !defined $zipextcmd; + $zipextargs=" -run $run"; + $zipextargs.=" -mertdir $mertdir" if defined $mertdir; + $zipextargs.=" $___DEV_E ./run$run.moses.ini"; + + $cmd = "$zipextcmd $zipextargs"; + + if (defined $prevjid){ + $qsubprefix="zip$run"; + &submit_or_exec_thu_host($submithost,"","",$cmd,"","zipext$run.out","zipext$run.err","zipext$run.id",$prevjid); + } else { + die "Step 5 (zip extract): Cannot find previous process for sequential submit\n"; + } + chomp($jobid=`tail -n 1 zipext$run.id`); + $prevjid = $jobid; + + ## clear-up tmp ### + &exit_submit_thu_host($submithost,"","","","zipext$run.out","zipext$run.err","zipext$run.id","zipext$run.id.pid",$prevjid); + + #################################################### + # step 6: process results (mert) + #################################################### + $processresultcmd="$SCRIPTS_ROOTDIR/training/sge-nosync/process-moses-result-sge-nosync.pl" if !defined $processresultcmd; + $processresultargs=" -run $run -submithost $submithost -queue-flags \"$queue_flags\""; + $processresultargs.=" -inputtype $___INPUTTYPE"; + $processresultargs.=" -mertdir $mertdir" if defined $mertdir; +# $processresultargs.=" $___DEV_F $___DECODER ./run$run.moses.ini"; + $processresultargs.=" $___DEV_F $___DECODER $___CONFIG"; + + $cmd = "$processresultcmd $processresultargs"; + + if (defined $prevjid){ + $qsubprefix="MERT$run"; + &submit_or_exec_thu_host($submithost,"","",$cmd,"","processmoses$run.out","processmoses$run.err","processmoses$run.id",$prevjid); + } else { + die "Step 6 (process results - (mert)): Cannot find previous process for sequential submit\n"; + } + chomp($jobid=`tail -n 1 processmoses$run.id`); + $prevjid = $jobid; + + ## clear-up tmp ## + &exit_submit_thu_host($submithost,"","","","processmoses$run.out","processmoses$run.err","processmoses$run.id","processmoses$run.id.pid",$prevjid); + + ### sleep to prevent batch select in short time + sleep(1); + +##!# else { +##!# $nbest_file="run$run.best$___N_BEST_LIST_SIZE.out.gz"; +##!# print "skipped decoder run $run\n"; +##!# $skip_decoder = 0; +##!# $need_to_normalize = 0; +##!# } +} + + +################################################# +# step 7: write out the final files +################################################# +$createconfigcmd="$SCRIPTS_ROOTDIR/training/sge-nosync/create-config-sge-nosync.pl" if !defined $createconfigcmd; + +$createconfigargs = "" if !defined $createconfigargs; +$createconfigargs = "$createconfigargs --range $___RANGES" if (defined $___RANGES); +$createconfigargs = "$createconfigargs --decoder-flags $___DECODER_FLAGS" if (!$___DECODER_FLAGS eq ""); +$createconfigargs = "$createconfigargs --devbleu $devbleu" if (defined $devbleu); +$createconfigargs = "$createconfigargs --sparse_weights_file $sparse_weights_file" if (defined $sparse_weights_file); +$createconfigargs = "$createconfigargs --working-dir $___WORKING_DIR" if (defined $___WORKING_DIR); + +my $cmd = "$createconfigcmd $___DEV_F $___DECODER $___CONFIG_ORIG final --inputtype $___INPUTTYPE $createconfigargs"; + +if (defined $prevjid) { + $qsubprefix = "finalcfg"; + &submit_or_exec_thu_host($submithost,"","",$cmd,"","createconfigfinal.out","createconfigfinal.err","createconfigfinal.id",$prevjid); +} else { + $qsubprefix = "finalcfg"; + &submit_or_exec_thu_host($submithost,"","",$cmd,"","createconfigfinal.out","createconfigfinal.err","createconfigfinal.id"); +} +chomp($jobid=`tail -n 1 createconfigfinal.id`); +$prevjid = $jobid; +# clear up tmp +&exit_submit_thu_host($submithost,"","","","createconfigfinal.out","createconfigfinal.err","createconfigfinal.id","createconfigfinal.id.pid",$prevjid); +## ------------------------------------------------------------------------- +print "create config for last run is done!\n"; + + +###### STEP 8: clear job ###### +my $clearcmd = ""; +$clearcmd = "$SCRIPTS_ROOTDIR/training/sge-nosync/cleartmpfiles.pl"; + + +if (defined $prevjid){ + $qsubprefix="Clearjob"; + &submit_or_exec_thu_host($submithost,"","",$clearcmd,"","clear.out","clear.err","clear.id",$prevjid); +} else { + die "Step 7 (clear job): Cannot find previous process for sequential submit\n"; +} +chomp($jobid=`tail -n 1 clear.id`); +$prevjid = $jobid; + +## clear-up tmp ## +&exit_submit_thu_host($submithost,"","","","clear.out","clear.err","clear.id","clear.id.pid",$prevjid); + +print "Tuning finished at ".`date`; + +chdir($cwd); + +} # end of local scope + +sub get_weights_from_mert { + my ($outfile,$logfile,$weight_count,$sparse_weights) = @_; + my ($bestpoint,$devbleu); + if ($___PAIRWISE_RANKED_OPTIMIZER || ($___PRO_STARTING_POINT && $logfile =~ /pro/)) { + open(IN,$outfile) or die "Can't open $outfile"; + my (@WEIGHT,$sum); + for(my $i=0;$i<$weight_count;$i++) { push @WEIGHT, 0; } + while() { + # regular features + if (/^F(\d+) ([\-\.\de]+)/) { + $WEIGHT[$1] = $2; + $sum += abs($2); + } + # sparse features + elsif(/^(.+_.+) ([\-\.\de]+)/) { + $$sparse_weights{$1} = $2; + } + } + $devbleu = "unknown"; + foreach (@WEIGHT) { $_ /= $sum; } + foreach (keys %{$sparse_weights}) { $$sparse_weights{$_} /= $sum; } + $bestpoint = join(" ",@WEIGHT); + close IN; + } + else { + open(IN,$logfile) or die "Can't open $logfile"; + while () { + if (/Best point:\s*([\s\d\.\-e]+?)\s*=> ([\-\d\.]+)/) { + $bestpoint = $1; + $devbleu = $2; + last; + } + } + close IN; + } + return ($bestpoint,$devbleu); +} + +##COPIED# sub run_decoder { +##COPIED# my ($featlist, $run, $need_to_normalize) = @_; +##COPIED# my $filename_template = "run%d.best$___N_BEST_LIST_SIZE.out"; +##COPIED# my $filename = sprintf($filename_template, $run); +##COPIED# my $lsamp_filename = undef; +##COPIED# if ($___LATTICE_SAMPLES) { +##COPIED# my $lsamp_filename_template = "run%d.lsamp$___LATTICE_SAMPLES.out"; +##COPIED# $lsamp_filename = sprintf($lsamp_filename_template, $run); +##COPIED# } +##COPIED# +##COPIED# # user-supplied parameters +##COPIED# print "params = $___DECODER_FLAGS\n"; +##COPIED# +##COPIED# # parameters to set all model weights (to override moses.ini) +##COPIED# my @vals = @{$featlist->{"values"}}; +##COPIED# if ($need_to_normalize) { +##COPIED# print STDERR "Normalizing lambdas: @vals\n"; +##COPIED# my $totlambda=0; +##COPIED# grep($totlambda+=abs($_),@vals); +##COPIED# grep($_/=$totlambda,@vals); +##COPIED# } +##COPIED# # moses now does not seem accept "-tm X -tm Y" but needs "-tm X Y" +##COPIED# my %model_weights; +##COPIED# for(my $i=0; $i{"names"}}); $i++) { +##COPIED# my $name = $featlist->{"names"}->[$i]; +##COPIED# $model_weights{$name} = "-$name" if !defined $model_weights{$name}; +##COPIED# $model_weights{$name} .= sprintf " %.6f", $vals[$i]; +##COPIED# } +##COPIED# my $decoder_config = join(" ", values %model_weights); +##COPIED# $decoder_config .= " -weight-file run$run.sparse-weights" if -e "run$run.sparse-weights"; +##COPIED# print STDERR "DECODER_CFG = $decoder_config\n"; +##COPIED# print "decoder_config = $decoder_config\n"; +##COPIED# +##COPIED# +##COPIED# # run the decoder +##COPIED# my $decoder_cmd; +##COPIED# my $lsamp_cmd = ""; +##COPIED# if ($___LATTICE_SAMPLES) { +##COPIED# $lsamp_cmd = " -lattice-samples $lsamp_filename $___LATTICE_SAMPLES "; +##COPIED# } +##COPIED# +##COPIED# ####### RUN moses_parallel ################################# +##COPIED# # need to gather: +##COPIED# ### $run +##COPIED# ### $lsamp_cmd +##COPIED# ### $filename +##COPIED# ########################################################### +##COPIED# +##COPIED# if (defined $___JOBS && $___JOBS > 0) { +##COPIED# $decoder_cmd = "$moses_parallel_cmd $pass_old_sge -config $___CONFIG -inputtype $___INPUTTYPE -qsub-prefix mert$run -queue-parameters \"$queue_flags\" -decoder-parameters \"$___DECODER_FLAGS $decoder_config\" $lsamp_cmd -n-best-list \"$filename $___N_BEST_LIST_SIZE\" -input-file $___DEV_F -jobs $___JOBS -decoder $___DECODER > run$run.out"; +##COPIED# } else { +##COPIED# $decoder_cmd = "$___DECODER $___DECODER_FLAGS -config $___CONFIG -inputtype $___INPUTTYPE $decoder_config $lsamp_cmd -n-best-list $filename $___N_BEST_LIST_SIZE -input-file $___DEV_F > run$run.out"; +##COPIED# } +##COPIED# +##COPIED# safesystem($decoder_cmd) or die "The decoder died. CONFIG WAS $decoder_config \n"; +##COPIED# +##COPIED# sanity_check_order_of_lambdas($featlist, $filename); +##COPIED# return ($filename, $lsamp_filename); +##COPIED# } + + +##COPIED# sub insert_ranges_to_featlist { +##COPIED# my $featlist = shift; +##COPIED# my $ranges = shift; +##COPIED# +##COPIED# $ranges = [] if !defined $ranges; +##COPIED# +##COPIED# # first collect the ranges from options +##COPIED# my $niceranges; +##COPIED# foreach my $range (@$ranges) { +##COPIED# my $name = undef; +##COPIED# foreach my $namedpair (split /,/, $range) { +##COPIED# if ($namedpair =~ /^(.*?):/) { +##COPIED# $name = $1; +##COPIED# $namedpair =~ s/^.*?://; +##COPIED# die "Unrecognized name '$name' in --range=$range" +##COPIED# if !defined $ABBR2FULL{$name}; +##COPIED# } +##COPIED# my ($min, $max) = split /\.\./, $namedpair; +##COPIED# die "Bad min '$min' in --range=$range" if $min !~ /^-?[0-9.]+$/; +##COPIED# die "Bad max '$max' in --range=$range" if $min !~ /^-?[0-9.]+$/; +##COPIED# die "No name given in --range=$range" if !defined $name; +##COPIED# push @{$niceranges->{$name}}, [$min, $max]; +##COPIED# } +##COPIED# } +##COPIED# +##COPIED# # now populate featlist +##COPIED# my $seen = undef; +##COPIED# for(my $i=0; $i{"names"}}); $i++) { +##COPIED# my $name = $featlist->{"names"}->[$i]; +##COPIED# $seen->{$name} ++; +##COPIED# my $min = 0.0; +##COPIED# my $max = 1.0; +##COPIED# if (defined $niceranges->{$name}) { +##COPIED# my $minmax = shift @{$niceranges->{$name}}; +##COPIED# ($min, $max) = @$minmax if defined $minmax; +##COPIED# } +##COPIED# $featlist->{"mins"}->[$i] = $min; +##COPIED# $featlist->{"maxs"}->[$i] = $max; +##COPIED# } +##COPIED# return $featlist; +##COPIED# } + +##COPIED# sub sanity_check_order_of_lambdas { +##COPIED# my $featlist = shift; +##COPIED# my $filename_or_stream = shift; +##COPIED# +##COPIED# my @expected_lambdas = @{$featlist->{"names"}}; +##COPIED# my @got = get_order_of_scores_from_nbestlist($filename_or_stream); +##COPIED# die "Mismatched lambdas. Decoder returned @got, we expected @expected_lambdas" +##COPIED# if "@got" ne "@expected_lambdas"; +##COPIED# } + +#### get_featlist_from_moses(): also used in process-featlist-sge-nosync.pl ##### +########################################################################### +sub get_featlist_from_moses { + # run moses with the given config file and return the list of features and + # their initial values + my $configfn = shift; + my $featlistfn = "./features.list"; + if (-e $featlistfn) { + print STDERR "Using cached features list: $featlistfn\n"; + } else { + print STDERR "Asking moses for feature names and values from $___CONFIG\n"; + my $cmd = "$___DECODER $___DECODER_FLAGS -config $configfn -inputtype $___INPUTTYPE -show-weights > $featlistfn"; + safesystem($cmd) or die "Failed to run moses with the config $configfn"; + } + + # read feature list + my @names = (); + my @startvalues = (); + open(INI,$featlistfn) or die "Can't read $featlistfn"; + my $nr = 0; + my @errs = (); + while () { + $nr++; + chomp; + /^(.+) (\S+) (\S+)$/ || die("invalid feature: $_"); + my ($longname, $feature, $value) = ($1,$2,$3); + next if $value eq "sparse"; + push @errs, "$featlistfn:$nr:Bad initial value of $feature: $value\n" + if $value !~ /^[+-]?[0-9.e]+$/; + push @errs, "$featlistfn:$nr:Unknown feature '$feature', please add it to \@ABBR_FULL_MAP\n" + if !defined $ABBR2FULL{$feature}; + push @names, $feature; + push @startvalues, $value; + } + close INI; + if (scalar @errs) { + print STDERR join("", @errs); + exit 1; + } + return {"names"=>\@names, "values"=>\@startvalues}; +} +#### get_featlist_from_moses() ends ##################################### + +sub get_order_of_scores_from_nbestlist { + # read the first line and interpret the ||| label: num num num label2: num ||| column in nbestlist + # return the score labels in order + my $fname_or_source = shift; + # print STDERR "Peeking at the beginning of nbestlist to get order of scores: $fname_or_source\n"; + open IN, $fname_or_source or die "Failed to get order of scores from nbestlist '$fname_or_source'"; + my $line = ; + close IN; + die "Line empty in nbestlist '$fname_or_source'" if !defined $line; + my ($sent, $hypo, $scores, $total) = split /\|\|\|/, $line; + $scores =~ s/^\s*|\s*$//g; + die "No scores in line: $line" if $scores eq ""; + + my @order = (); + my $label = undef; + my $sparse = 0; # we ignore sparse features here + foreach my $tok (split /\s+/, $scores) { + if ($tok =~ /.+_.+:/) { + $sparse = 1; + } elsif ($tok =~ /^([a-z][0-9a-z]*):/i) { + $label = $1; + } elsif ($tok =~ /^-?[-0-9.e]+$/) { + if (!$sparse) { + # a score found, remember it + die "Found a score but no label before it! Bad nbestlist '$fname_or_source'!" + if !defined $label; + push @order, $label; + } + $sparse = 0; + } else { + die "Not a label, not a score '$tok'. Failed to parse the scores string: '$scores' of nbestlist '$fname_or_source'"; + } + } + print STDERR "The decoder returns the scores in this order: @order\n"; + return @order; +} + +##COPIED#sub create_config { +##COPIED# my $infn = shift; # source config +##COPIED# my $outfn = shift; # where to save the config +##COPIED# my $featlist = shift; # the lambdas we should write +##COPIED# my $iteration = shift; # just for verbosity +##COPIED# my $bleu_achieved = shift; # just for verbosity +##COPIED# my $sparse_weights_file = shift; # only defined when optimizing sparse features +##COPIED# +##COPIED# my %P; # the hash of all parameters we wish to override +##COPIED# +##COPIED# # first convert the command line parameters to the hash +##COPIED# { # ensure local scope of vars +##COPIED# my $parameter=undef; +##COPIED# print "Parsing --decoder-flags: |$___DECODER_FLAGS|\n"; +##COPIED# $___DECODER_FLAGS =~ s/^\s*|\s*$//; +##COPIED# $___DECODER_FLAGS =~ s/\s+/ /; +##COPIED# foreach (split(/ /,$___DECODER_FLAGS)) { +##COPIED# if (/^\-([^\d].*)$/) { +##COPIED# $parameter = $1; +##COPIED# $parameter = $ABBR2FULL{$parameter} if defined($ABBR2FULL{$parameter}); +##COPIED# } +##COPIED# else { +##COPIED# die "Found value with no -paramname before it: $_" +##COPIED# if !defined $parameter; +##COPIED# push @{$P{$parameter}},$_; +##COPIED# } +##COPIED# } +##COPIED# } +##COPIED# +##COPIED# # First delete all weights params from the input, we're overwriting them. +##COPIED# # Delete both short and long-named version. +##COPIED# for(my $i=0; $i{"names"}}); $i++) { +##COPIED# my $name = $featlist->{"names"}->[$i]; +##COPIED# delete($P{$name}); +##COPIED# delete($P{$ABBR2FULL{$name}}); +##COPIED# } +##COPIED# +##COPIED# # Convert weights to elements in P +##COPIED# for(my $i=0; $i{"names"}}); $i++) { +##COPIED# my $name = $featlist->{"names"}->[$i]; +##COPIED# my $val = $featlist->{"values"}->[$i]; +##COPIED# $name = defined $ABBR2FULL{$name} ? $ABBR2FULL{$name} : $name; +##COPIED# # ensure long name +##COPIED# push @{$P{$name}}, $val; +##COPIED# } +##COPIED# +##COPIED# if (defined($sparse_weights_file)) { +##COPIED# push @{$P{"weights-file"}}, $___WORKING_DIR."/".$sparse_weights_file; +##COPIED# } +##COPIED# +##COPIED# # create new moses.ini decoder config file by cloning and overriding the original one +##COPIED# open(INI,$infn) or die "Can't read $infn"; +##COPIED# delete($P{"config"}); # never output +##COPIED# print "Saving new config to: $outfn\n"; +##COPIED# open(OUT,"> $outfn") or die "Can't write $outfn"; +##COPIED# print OUT "# MERT optimized configuration\n"; +##COPIED# print OUT "# decoder $___DECODER\n"; +##COPIED# print OUT "# BLEU $bleu_achieved on dev $___DEV_F\n"; +##COPIED# print OUT "# We were before running iteration $iteration\n"; +##COPIED# print OUT "# finished ".`date`; +##COPIED# my $line = ; +##COPIED# while(1) { +##COPIED# last unless $line; +##COPIED# +##COPIED# # skip until hit [parameter] +##COPIED# if ($line !~ /^\[(.+)\]\s*$/) { +##COPIED# $line = ; +##COPIED# print OUT $line if $line =~ /^\#/ || $line =~ /^\s+$/; +##COPIED# next; +##COPIED# } +##COPIED# +##COPIED# # parameter name +##COPIED# my $parameter = $1; +##COPIED# $parameter = $ABBR2FULL{$parameter} if defined($ABBR2FULL{$parameter}); +##COPIED# print OUT "[$parameter]\n"; +##COPIED# +##COPIED# # change parameter, if new values +##COPIED# if (defined($P{$parameter})) { +##COPIED# # write new values +##COPIED# foreach (@{$P{$parameter}}) { +##COPIED# print OUT $_."\n"; +##COPIED# } +##COPIED# delete($P{$parameter}); +##COPIED# # skip until new parameter, only write comments +##COPIED# while($line = ) { +##COPIED# print OUT $line if $line =~ /^\#/ || $line =~ /^\s+$/; +##COPIED# last if $line =~ /^\[/; +##COPIED# last unless $line; +##COPIED# } +##COPIED# next; +##COPIED# } +##COPIED# +##COPIED# # unchanged parameter, write old +##COPIED# while($line = ) { +##COPIED# last if $line =~ /^\[/; +##COPIED# print OUT $line; +##COPIED# } +##COPIED# } +##COPIED# +##COPIED# # write all additional parameters +##COPIED# foreach my $parameter (keys %P) { +##COPIED# print OUT "\n[$parameter]\n"; +##COPIED# foreach (@{$P{$parameter}}) { +##COPIED# print OUT $_."\n"; +##COPIED# } +##COPIED# } +##COPIED# +##COPIED# close(INI); +##COPIED# close(OUT); +##COPIED# print STDERR "Saved: $outfn\n"; +##COPIED#} + +sub safesystem { + print STDERR "Executing: @_\n"; + system(@_); + if ($? == -1) { + print STDERR "Failed to execute: @_\n $!\n"; + exit(1); + } + elsif ($? & 127) { + printf STDERR "Execution of: @_\n died with signal %d, %s coredump\n", + ($? & 127), ($? & 128) ? 'with' : 'without'; + exit(1); + } + else { + my $exitcode = $? >> 8; + print STDERR "Exit code: $exitcode\n" if $exitcode; + return ! $exitcode; + } +} +sub ensure_full_path { + my $PATH = shift; +$PATH =~ s/\/nfsmnt//; + return $PATH if $PATH =~ /^\//; + my $dir = `pawd 2>/dev/null`; + if(!$dir){$dir = `pwd`;} + chomp($dir); + $PATH = $dir."/".$PATH; + $PATH =~ s/[\r\n]//g; + $PATH =~ s/\/\.\//\//g; + $PATH =~ s/\/+/\//g; + my $sanity = 0; + while($PATH =~ /\/\.\.\// && $sanity++<10) { + $PATH =~ s/\/+/\//g; + $PATH =~ s/\/[^\/]+\/\.\.\//\//g; + } + $PATH =~ s/\/[^\/]+\/\.\.$//; + $PATH =~ s/\/+$//; +$PATH =~ s/\/nfsmnt//; + return $PATH; +} + +sub submit_or_exec { + + my $argvlen = @_; + my $cmd = undef; + my $stdout = undef; + my $stderr = undef; + my $jidfile = undef; + my $prevjid = undef; + + # if supply 3 arguments, exec without submit + # if supply 4 arguments, then submit new job + # if supply 5 arguments, wait for the previous job to finish + if ($argvlen == 3){ + ($cmd,$stdout,$stderr) = @_; + } elsif ($argvlen == 4){ + ($cmd,$stdout,$stderr,$jidfile) = @_; + } elsif ($argvlen == 5){ + ($cmd,$stdout,$stderr,$jidfile,$prevjid) = @_; + } + + print STDERR "exec: $cmd\n"; + if (defined $___JOBS && $___JOBS > 0 && $argvlen==5) { + safesystem("$qsubwrapper $pass_old_sge -command='$cmd' -queue-parameters=\"$queue_flags\" -stdout=$stdout -stderr=$stderr -jidfile=$jidfile -prevjid=$prevjid" ) + or die "ERROR: Failed to submit '$cmd' (via $qsubwrapper)"; + } + elsif (defined $___JOBS && $___JOBS > 0 && $argvlen==4) { + safesystem("$qsubwrapper $pass_old_sge -command='$cmd' -queue-parameters=\"$queue_flags\" -stdout=$stdout -stderr=$stderr -jidfile=$jidfile" ) + or die "ERROR: Failed to submit '$cmd' (via $qsubwrapper)"; + } else { + safesystem("$cmd > $stdout 2> $stderr") or die "ERROR: Failed to run '$cmd'."; + } +} + +sub exit_submit { + + my $argvlen = @_; + my $cmd = undef; + my $stdout = undef; + my $stderr = undef; + my $jidfile = undef; + my $pidfile = undef; + my $prevjid = undef; + my $prevjidarraysize = 0; + my @prevjidarray = (); + my $pid = undef; + my $qsubcmd=""; + my $hj=""; + + # if supply 4 arguments, then submit new job + # if supply 5 arguments, wait for the previous job to finish + if ($argvlen == 2) { + ($stdout,$stderr) = @_; + } elsif ($argvlen == 4){ + ($stdout,$stderr,$jidfile,$pidfile) = @_; + } elsif ($argvlen == 5){ + ($stdout,$stderr,$jidfile,$pidfile,$prevjid) = @_; + } + + # parse prevjid ######################## + $prevjid =~ s/^\s+|\s+$//g; + @prevjidarray = split(/\s+/,$prevjid); + $prevjidarraysize = scalar(@prevjidarray); + ######################################## + + + # print STDERR "exec: $stdout\n"; + + # read pid from file, and draft exit script ################## + chomp ($pid=`tail -n 1 $pidfile`); + open (OUT, ">exitjob$pid.sh"); + + my $scriptheader="\#\!/bin/bash\n\#\$ -S /bin/sh\n# Both lines are needed to invoke base\n#the above line is ignored by qsub, unless parameter \"-b yes\" is set!\n\n"; + $scriptheader .="uname -a\n\n"; + $scriptheader .="cd $___WORKING_DIR\n\n"; + + print OUT $scriptheader; + + print OUT "if $qsubwrapper_exit -stdout=$stdout -stderr=$stderr -jidfile=$jidfile -pidfile=$pidfile > exitjob$pid.out 2> exitjob$pid.err ; then + echo 'succeeded' +else + echo failed with exit status \$\? + die=1 +fi +"; + print OUT "\n\n"; + + close (OUT); + # setting permissions of the script + chmod(oct(755),"exitjob$pid.sh"); + ############################################################## + + + if (defined $___JOBS && $___JOBS > 0 && $argvlen==5) { + if (defined $prevjid && $prevjid!=-1 && $prevjidarraysize == 1){ + $hj = "-hold_jid $prevjid"; + } elsif (defined $prevjid && $prevjidarraysize > 1){ + $hj = "-hold_jid " . join(" -hold_jid ", @prevjidarray); + } + $qsubcmd="qsub $queue_flags -o /dev/null -e /dev/null -V $hj exitjob$pid.sh > exitjob$pid.log 2>&1"; + safesystem($qsubcmd) or die "ERROR: Failed to exit-submit $pid (via $qsubwrapper_exit)"; + } elsif (defined $___JOBS && $___JOBS > 0 && $argvlen==4) { + $qsubcmd="qsub $queue_flags -o /dev/null -e /dev/null -V exitjob$pid.sh > exitjob$pid.log 2>&1"; + safesystem($qsubcmd) or die "ERROR: Failed to exit-submit $pid (via $qsubwrapper_exit)"; + } else { + safesystem("rm $stdout") or die "ERROR: Failed to remove '$stdout'."; + safesystem("rm $stderr") or die "ERROR: Failed to remove '$stderr'."; + } +} + + + + + + + +sub create_extractor_script() +{ + my ($cmd, $outdir) = @_; + my $script_path = File::Spec->catfile($outdir, "extractor.sh"); + + open my $out, '>', $script_path + or die "Couldn't open $script_path for writing: $!\n"; + print $out "#!/bin/bash\n"; + print $out "cd $outdir\n"; + print $out "$cmd\n"; + close($out); + + `chmod +x $script_path`; + + return $script_path; +} + + +sub submit_or_exec_thu_host { + # use Net::OpenSSH::Compat::Perl; + + my $argvlen = @_; + my $submithost = undef; + my $run = -1; + my $idx = ""; + my $batch_and_join = ""; + my $my_username = undef; + my $cmd = undef; + my $qsubwrapcmd = undef; + my $stdout = undef; + my $stderr = undef; + my $jidfile = undef; + my $prevjid = undef; + + my $qsubname = undef; + + # if supply 7 arguments, exec without submit + # if supply 8 arguments, then submit new job + # if supply 9 arguments, wait for the previous job to finish + if ($argvlen == 7){ + ($submithost,$run,$idx,$cmd,$batch_and_join,$stdout,$stderr) = @_; + } elsif ($argvlen == 8){ + ($submithost,$run,$idx,$cmd,$batch_and_join,$stdout,$stderr,$jidfile) = @_; + } elsif ($argvlen == 9){ + ($submithost,$run,$idx,$cmd,$batch_and_join,$stdout,$stderr,$jidfile,$prevjid) = @_; + } + + + + # chomp($my_username = `whoami`); + # my $ssh = Net::OpenSSH::Compat::Perl->new($submithost, debug=>0); + # + # print STDERR "submithost = $submithost\n"; + # print STDERR "my username = $my_username\n"; + # print STDERR "qusbwrapper at = $qsubwrapper\n"; + # + # $ssh->login("$my_username",`cat /home/$my_username/accpw`); + my $ssh = Net::OpenSSH::Compat::Perl->new($submithost, debug=>0); + + print STDERR "submithost = $submithost\n"; + print STDERR "qusbwrapper at = $qsubwrapper\n"; + + $ssh->login(); + + #### extra for mert-moses-sge-nosync.pl #### + if ($qsubprefix eq ""){ + $qsubname = $stdout; + } else { + $qsubname = $qsubprefix; + } + my $queueparameters = $queue_flags; + ############################################ + + # $cmd="qsub $queueparameters $batch_and_join -o $qsubout$idx -e $qsuberr$idx -N $qsubname$idx ${jobscript}${idx}.bash > ${jobscript}${idx}.log 2>&1"; + # -o qsubout + # -e qsuberr + if ($argvlen == 9) { + $qsubwrapcmd = "$qsubwrapper -command='$cmd' -queue-parameter=\"$queueparameters $batch_and_join\" -qsub-prefix='$qsubname$idx' -stdout=$stdout -stderr=$stderr -jidfile=$jidfile -prevjid='$prevjid'"; + } elsif ($argvlen == 8) { + # $qsubwrapcmd = "$qsubwrapper -command='${jobscript}${idx}.bash' -queue-parameter=\"$queueparameters $batch_and_join\" -qsub-prefix='$qsubname$idx' -stdout=$stdout -stderr=$stderr -jidfile=$jidfile"; + $qsubwrapcmd = "$qsubwrapper -command='$cmd' -queue-parameter=\"$queueparameters $batch_and_join\" -qsub-prefix='$qsubname$idx' -stdout=$stdout -stderr=$stderr -jidfile=$jidfile"; + } + print STDERR "Executing $qsubwrapcmd in $___WORKING_DIR\n"; + $ssh->cmd("cd $___WORKING_DIR && $qsubwrapcmd"); + +} + +sub exit_submit_thu_host { + + my $argvlen = @_; + my $submithost = undef; + my $run = -1; + my $idx = ""; + my $batch_and_join = ""; + my $my_username = undef; + my $cmd = undef; + my $stdout = undef; + my $stderr = undef; + my $jidfile = undef; + my $pidfile = undef; + my $prevjid = undef; + my $prevjidarraysize = 0; + my @prevjidarray = (); + my $pid = undef; + my $qsubcmd=""; + my $hj=""; + + # if supply 8 arguments, then submit new job + # if supply 9 arguments, wait for the previous job to finish + if ($argvlen == 6){ + ($submithost,$run,$idx,$batch_and_join,$stdout,$stderr) = @_; + } elsif ($argvlen == 8){ + ($submithost,$run,$idx,$batch_and_join,$stdout,$stderr,$jidfile,$pidfile) = @_; + } elsif ($argvlen == 9){ + ($submithost,$run,$idx,$batch_and_join,$stdout,$stderr,$jidfile,$pidfile,$prevjid) = @_; + } + + # parse prevjid ######################## + $prevjid =~ s/^\s+|\s+$//g; + @prevjidarray = split(/\s+/,$prevjid); + $prevjidarraysize = scalar(@prevjidarray); + ######################################## + + #### extra for mert-moses-sge-nosync.pl #### + my $queueparameters = $queue_flags; + ############################################ + + + + # print STDERR "exec: $stdout\n"; + + # read pid from file, and draft exit script ################## + chomp ($pid=`tail -n 1 $pidfile`); + open (OUT, ">exitjob$pid.sh"); + + my $scriptheader="\#\!/bin/bash\n\#\$ -S /bin/sh\n# Both lines are needed to invoke base\n#the above line is ignored by qsub, unless parameter \"-b yes\" is set!\n\n"; + $scriptheader .="uname -a\n\n"; + $scriptheader .="cd $___WORKING_DIR\n\n"; + + print OUT $scriptheader; + + print OUT "if $qsubwrapper_exit -submithost=$submithost -stdout=$stdout -stderr=$stderr -jidfile=$jidfile -pidfile=$pidfile > exitjob$pid.out 2> exitjob$pid.err ; then + echo 'succeeded' +else + echo failed with exit status \$\? + die=1 +fi +"; + print OUT "\n\n"; + + close (OUT); + # setting permissions of the script + chmod(oct(755),"exitjob$pid.sh"); + ############################################################## + + # log in submit host ######################################### + # chomp($my_username = `whoami`); + # my $ssh = Net::OpenSSH::Compat::Perl->new($submithost, debug=>0); + # + # print STDERR "submithost = $submithost\n"; + # print STDERR "my username = $my_username\n"; + # print STDERR "qusbwrapper at = $qsubwrapper\n"; + # + # $ssh->login("$my_username",`cat /home/$my_username/accpw`); + ############################################################## + my $ssh = Net::OpenSSH::Compat::Perl->new($submithost, debug=>0); + + print STDERR "submithost = $submithost\n"; + print STDERR "qusbwrapper at = $qsubwrapper\n"; + + $ssh->login(); + + + if ($argvlen==9) { + if (defined $prevjid && $prevjid!=-1 && $prevjidarraysize == 1){ + $hj = "-hold_jid $prevjid"; + } elsif (defined $prevjid && $prevjidarraysize > 1){ + $hj = "-hold_jid " . join(" -hold_jid ", @prevjidarray); + } + $qsubcmd="qsub $queueparameters -o /dev/null -e /dev/null $hj exitjob$pid.sh > exitjob$pid.log 2>&1"; + $ssh->cmd("cd $___WORKING_DIR && $qsubcmd"); + } elsif ($argvlen==8) { + $qsubcmd="qsub $queueparameters -o /dev/null -e /dev/null exitjob$pid.sh > exitjob$pid.log 2>&1"; + $ssh->cmd("cd $___WORKING_DIR && $qsubcmd"); + } + print STDERR "Executing $qsubcmd in $___WORKING_DIR\n"; + +} + + diff --git a/contrib/mert-sge-nosync/training/sge-nosync/cleartmpfiles.pl b/contrib/mert-sge-nosync/training/sge-nosync/cleartmpfiles.pl new file mode 100755 index 0000000000..4e5e7d0460 --- /dev/null +++ b/contrib/mert-sge-nosync/training/sge-nosync/cleartmpfiles.pl @@ -0,0 +1,64 @@ +#!/usr/bin/perl + + + my @filename_id = ""; + my $this_id = ""; + + # remove exitjob and forceexitjob + chomp(my @rddfile_list = `ls exitjob* forceexitjob*`); + foreach my $rddfile (@rddfile_list) { + unlink("$rddfile"); + } + + chomp(@filename_id = `ls *.id | grep -v 'clear'`); + open (OUT, "> all.id.all"); + print OUT "==Combine log at ".`date`; + print OUT `tail -n +1 *.id`; + print OUT "==LOG combined ".`date`; + close(OUT); + foreach $this_id (@filename_id) { + # print OUT `cat $this_id`; + unlink("$this_id"); + } + + chomp (@filename_id = `ls *.id.pid | grep -v 'clear'`); + open (OUT, "> all.id.pid.all"); + print OUT "==Combine log at ".`date`; + print OUT `tail -n +1 *.id.pid`; + print OUT "==Log combined ".`date`; + close(OUT); + foreach $this_id (@filename_id) { + # print OUT `cat $this_id`; + unlink("$this_id"); + } + + + + chomp(@filename_id = `ls *.out | grep -v 'clear'`); + open (OUT, "> all.out.all"); + print OUT "==Combine log at ".`date`; + print OUT `tail -n +1 *.out`; + print OUT "==Log combined ".`date`; + close(OUT); + foreach $this_id (@filename_id) { + # print OUT `cat $this_id`; + unlink("$this_id"); + } + + chomp(@filename_id = `ls *.err | grep -v 'clear'`); + open (OUT, "> all.err.all"); + print OUT "==Combine log at ".`date`; + print OUT `tail -n +1 *.err`; + print OUT "==Log combined ".`date`; + close(OUT); + foreach $this_id (@filename_id) { + # print OUT `cat $this_id`; + unlink("$this_id"); + } + + # waitall.sh which cannot be deleted inside moses-parallel-sge-nosync.pl + chomp(@filename_id = `ls *waitall.sh`); + foreach $this_id (@filename_id) { + unlink("$this_id"); + } + diff --git a/contrib/mert-sge-nosync/training/sge-nosync/create-config-sge-nosync.pl b/contrib/mert-sge-nosync/training/sge-nosync/create-config-sge-nosync.pl new file mode 100755 index 0000000000..3f47cda82b --- /dev/null +++ b/contrib/mert-sge-nosync/training/sge-nosync/create-config-sge-nosync.pl @@ -0,0 +1,426 @@ +#!/usr/bin/perl -w + +# $Id$ +# after filter-mode-given-input.pl, process the feature list + +# original code by Philipp Koehn +# changes by Ondrej Bojar +# adapted for hierarchical models by Phil Williams + +use strict; + +use FindBin qw($Bin); +use Getopt::Long; + + + +my $SCRIPTS_ROOTDIR; +if (defined($ENV{"SCRIPTS_ROOTDIR"})) { + $SCRIPTS_ROOTDIR = $ENV{"SCRIPTS_ROOTDIR"}; +} else { + $SCRIPTS_ROOTDIR = $Bin; + if ($SCRIPTS_ROOTDIR eq '') { + $SCRIPTS_ROOTDIR = dirname(__FILE__); + } + $SCRIPTS_ROOTDIR =~ s/\/training$//; + $ENV{"SCRIPTS_ROOTDIR"} = $SCRIPTS_ROOTDIR; +} + + +# moses.ini file uses FULL names for lambdas, while this training script +# internally (and on the command line) uses ABBR names. +my @ABBR_FULL_MAP = qw(d=weight-d lm=weight-l tm=weight-t w=weight-w + g=weight-generation lex=weight-lex I=weight-i); +my %ABBR2FULL = map {split/=/,$_,2} @ABBR_FULL_MAP; +my %FULL2ABBR = map {my ($a, $b) = split/=/,$_,2; ($b, $a);} @ABBR_FULL_MAP; + + + +my $verbose = 0; +my $usage = 0; # request for --help + + + + +##!# # consider phrases in input up to $MAX_LENGTH +##!# # in other words, all phrase-tables will be truncated at least to 10 words per +##!# # phrase. +##!# my $MAX_LENGTH = 10; + +# utilities +##!# my $ZCAT = "gzip -cd"; + +# get optional parameters +##!# my $opt_hierarchical = 0; +##!# my $binarizer = undef; +##!# my $opt_min_non_initial_rule_count = undef; +##!# my $opt_gzip = 1; # gzip output files (so far only phrase-based ttable until someone tests remaining models and formats) + +my $___RANGES = undef; +my $___ACTIVATE_FEATURES = undef; # comma-separated (or blank-separated) list of features to work on + # if undef work on all features + # (others are fixed to the starting values) +my $___DECODER_FLAGS = ""; # additional parametrs to pass to the decoder + +my $devbleu = undef; +my $___WORKING_DIR = undef; +my $___DEV_F = undef; +my $run = undef; # either first or final +my $runid_final = undef; +my $runid_finalplus=0; +my $sparse_weights_file = undef; + + +# set 0 if input type is text, set 1 if input type is confusion network +my $___INPUTTYPE = 0; + +my $___DECODER = undef; # required, pathname to the decoder executable +my $___CONFIG = undef; # required, pathname to startup ini file + + +GetOptions( + "activate-features=s" => \$___ACTIVATE_FEATURES, #comma-separated (or blank-separated) list of features to work on (others are fixed to the starting values) + "range=s@" => \$___RANGES, + "decoder-flags=s" => \$___DECODER_FLAGS, + "inputtype=i" => \$___INPUTTYPE, + "devbleu=s" => \$devbleu, + "sparse_weight_file=s" => \$sparse_weights_file, + "working-dir=s" => \$___WORKING_DIR, +) or exit(1); + +##!# GetOptions( +##!# "gzip!" => \$opt_gzip, +##!# "Hierarchical" => \$opt_hierarchical, +##!# "Binarizer=s" => \$binarizer, +##!# "MinNonInitialRuleCount=i" => \$opt_min_non_initial_rule_count +##!# ) or exit(1); + + +# the ?? required parameters can be supplied on the command line directly +# or using the --options +if (scalar @ARGV == 4) { + # required parameters: options + $___DEV_F = shift; + $___DECODER = shift; + $___CONFIG = shift; + $run = shift; # first or final +} + +if ($usage || !defined $___DECODER || !defined $___CONFIG) { + print STDERR "usage: $0 \$___DECODER \$___CONFIG(decoder.ini) +Options: + --activate-features=STRING ... comma-separated list of features to optimize, + others are fixed to the starting values + default: optimize all features + example: tm_0,tm_4,d_0 + --range=tm:0..1,-1..1 ... specify min and max value for some features + --range can be repeated as needed. + The order of the various --range specifications + is important only within a feature name. + E.g.: + --range=tm:0..1,-1..1 --range=tm:0..2 + is identical to: + --range=tm:0..1,-1..1,0..2 + but not to: + --range=tm:0..2 --range=tm:0..1,-1..1 + --decoder-flags=STRING ... extra parameters for the decoder + --inputtype=[0|1|2] ... Handle different input types: (0 for text, + 1 for confusion network, 2 for lattices, + default is 0) +"; + exit 1; +} + + + +##!# # get command line parameters +##!# my $dir = shift; +##!# my $config = shift; +##!# my $input = shift; + +##!# $dir = ensure_full_path($dir); + +############################################################ +############################################################ +############################################################ + +# main + +# we run moses to check validity of moses.ini and to obtain all the feature +# names + +if (($run eq "first")){ + my $featlist = get_featlist_from_moses($___CONFIG,$___CONFIG,"first"); + $featlist = insert_ranges_to_featlist($featlist, $___RANGES); + create_config($___CONFIG,"$___WORKING_DIR/run1.moses.ini",$featlist,1,(defined$devbleu?$devbleu:"--not-estimated--"),$sparse_weights_file); +} else { # $run eq "final" + chomp ($runid_final = `cat $___WORKING_DIR/finished_step.txt | tail -n 1`); + $runid_finalplus = $runid_final + 1; + `mv run${runid_finalplus}.moses.ini run_final.moses.ini`; + chomp ($devbleu = `cat $___WORKING_DIR/run_final.moses.ini | tail -n +3 | head -n 1 | gawk '{print \$3}'`); + my $featlist = get_featlist_from_moses($___CONFIG,"$___WORKING_DIR/run_final.moses.ini","final"); + $featlist = insert_ranges_to_featlist($featlist, $___RANGES); + create_config($___CONFIG,"$___WORKING_DIR/moses.ini",$featlist,$runid_finalplus,$devbleu,$sparse_weights_file); +} + +##COPIED## Mark which features are disabled: +##COPIED#if (defined $___ACTIVATE_FEATURES) { +##COPIED# my %enabled = map { ($_, 1) } split /[, ]+/, $___ACTIVATE_FEATURES; +##COPIED# my %cnt; +##COPIED# for(my $i=0; $i{"names"}}); $i++) { +##COPIED# my $name = $featlist->{"names"}->[$i]; +##COPIED# $cnt{$name} = 0 if !defined $cnt{$name}; +##COPIED# $featlist->{"enabled"}->[$i] = $enabled{$name."_".$cnt{$name}}; +##COPIED# $cnt{$name}++; +##COPIED# } +##COPIED#} else { +##COPIED# # all enabled +##COPIED# for(my $i=0; $i{"names"}}); $i++) { +##COPIED# $featlist->{"enabled"}->[$i] = 1; +##COPIED# } +##COPIED#} +##COPIED# +##COPIED#print STDERR "MERT starting values and ranges for random generation:\n"; +##COPIED#for(my $i=0; $i{"names"}}); $i++) { +##COPIED# my $name = $featlist->{"names"}->[$i]; +##COPIED# my $val = $featlist->{"values"}->[$i]; +##COPIED# my $min = $featlist->{"mins"}->[$i]; +##COPIED# my $max = $featlist->{"maxs"}->[$i]; +##COPIED# my $enabled = $featlist->{"enabled"}->[$i]; +##COPIED# printf STDERR " %5s = %7.3f", $name, $val; +##COPIED# if ($enabled) { +##COPIED# printf STDERR " (%5.2f .. %5.2f)\n", $min, $max; +##COPIED# } else { +##COPIED# print STDERR " --- inactive, not optimized ---\n"; +##COPIED# } +##COPIED#} + + + + + +sub get_featlist_from_moses { + # run moses with the given config file and return the list of features and + # their initial values + my $configfn = shift; + my $config_score = shift; + my $run = shift; + + my $featlistfn = ""; + if ($run eq 'first') { + $featlistfn = "./features.list"; # given feature list + } elsif ($run eq "final") { + $featlistfn = "./features.list.run_final"; + } + if (-e $featlistfn) { + print STDERR "Using cached features list: $featlistfn\n"; + } else { + print STDERR "Asking moses for feature names and values from $config_score\n"; + my $cmd = "$___DECODER $___DECODER_FLAGS -config $config_score -inputtype $___INPUTTYPE -show-weights > $featlistfn"; + print STDERR "$cmd\n"; #DEBUG + safesystem($cmd) or die "Failed to run moses with the config $config_score"; + } + + # read feature list + my @names = (); + my @startvalues = (); + open(INI,$featlistfn) or die "Can't read $featlistfn"; + my $nr = 0; + my @errs = (); + while () { + $nr++; + chomp; + /^(.+) (\S+) (\S+)$/ || die("invalid feature: $_"); + my ($longname, $feature, $value) = ($1,$2,$3); + next if $value eq "sparse"; + push @errs, "$featlistfn:$nr:Bad initial value of $feature: $value\n" + if $value !~ /^[+-]?[0-9.e]+$/; + push @errs, "$featlistfn:$nr:Unknown feature '$feature', please add it to \@ABBR_FULL_MAP\n" + if !defined $ABBR2FULL{$feature}; + push @names, $feature; + push @startvalues, $value; + } + close INI; + if (scalar @errs) { + print STDERR join("", @errs); + exit 1; + } + return {"names"=>\@names, "values"=>\@startvalues}; +} + + +sub insert_ranges_to_featlist { + my $featlist = shift; + my $ranges = shift; + + $ranges = [] if !defined $ranges; + + # first collect the ranges from options + my $niceranges; + foreach my $range (@$ranges) { + my $name = undef; + foreach my $namedpair (split /,/, $range) { + if ($namedpair =~ /^(.*?):/) { + $name = $1; + $namedpair =~ s/^.*?://; + die "Unrecognized name '$name' in --range=$range" + if !defined $ABBR2FULL{$name}; + } + my ($min, $max) = split /\.\./, $namedpair; + die "Bad min '$min' in --range=$range" if $min !~ /^-?[0-9.]+$/; + die "Bad max '$max' in --range=$range" if $min !~ /^-?[0-9.]+$/; + die "No name given in --range=$range" if !defined $name; + push @{$niceranges->{$name}}, [$min, $max]; + } + } + + # now populate featlist + my $seen = undef; + for(my $i=0; $i{"names"}}); $i++) { + my $name = $featlist->{"names"}->[$i]; + $seen->{$name} ++; + my $min = 0.0; + my $max = 1.0; + if (defined $niceranges->{$name}) { + my $minmax = shift @{$niceranges->{$name}}; + ($min, $max) = @$minmax if defined $minmax; + } + $featlist->{"mins"}->[$i] = $min; + $featlist->{"maxs"}->[$i] = $max; + } + return $featlist; +} + +sub safesystem { + print STDERR "Executing: @_\n"; + system(@_); + if ($? == -1) { + print STDERR "Failed to execute: @_\n $!\n"; + exit(1); + } + elsif ($? & 127) { + printf STDERR "Execution of: @_\n died with signal %d, %s coredump\n", + ($? & 127), ($? & 128) ? 'with' : 'without'; + exit(1); + } + else { + my $exitcode = $? >> 8; + print STDERR "Exit code: $exitcode\n" if $exitcode; + return ! $exitcode; + } +} + + + +sub create_config { + my $infn = shift; # source config + my $outfn = shift; # where to save the config + my $featlist = shift; # the lambdas we should write + my $iteration = shift; # just for verbosity + my $bleu_achieved = shift; # just for verbosity + my $sparse_weights_file = shift; # only defined when optimizing sparse features + + my %P; # the hash of all parameters we wish to override + + # first convert the command line parameters to the hash + { # ensure local scope of vars + my $parameter=undef; + print "Parsing --decoder-flags: |$___DECODER_FLAGS|\n"; + $___DECODER_FLAGS =~ s/^\s*|\s*$//; + $___DECODER_FLAGS =~ s/\s+/ /; + foreach (split(/ /,$___DECODER_FLAGS)) { + if (/^\-([^\d].*)$/) { + $parameter = $1; + $parameter = $ABBR2FULL{$parameter} if defined($ABBR2FULL{$parameter}); + } + else { + die "Found value with no -paramname before it: $_" + if !defined $parameter; + push @{$P{$parameter}},$_; + } + } + } + + # First delete all weights params from the input, we're overwriting them. + # Delete both short and long-named version. + for(my $i=0; $i{"names"}}); $i++) { + my $name = $featlist->{"names"}->[$i]; + delete($P{$name}); + delete($P{$ABBR2FULL{$name}}); + } + + # Convert weights to elements in P + for(my $i=0; $i{"names"}}); $i++) { + my $name = $featlist->{"names"}->[$i]; + my $val = $featlist->{"values"}->[$i]; + $name = defined $ABBR2FULL{$name} ? $ABBR2FULL{$name} : $name; + # ensure long name + push @{$P{$name}}, $val; + } + + if (defined($sparse_weights_file)) { + push @{$P{"weights-file"}}, $___WORKING_DIR."/".$sparse_weights_file; + } + + # create new moses.ini decoder config file by cloning and overriding the original one + open(INI,$infn) or die "Can't read $infn"; + delete($P{"config"}); # never output + print "Saving new config to: $outfn\n"; + open(OUT,"> $outfn") or die "Can't write $outfn"; + print OUT "# MERT optimized configuration\n"; + print OUT "# decoder $___DECODER\n"; + print OUT "# BLEU $bleu_achieved on dev $___DEV_F\n"; + print OUT "# We were before running iteration $iteration\n"; + print OUT "# finished ".`date`; + my $line = ; + while(1) { + last unless $line; + + # skip until hit [parameter] + if ($line !~ /^\[(.+)\]\s*$/) { + $line = ; + print OUT $line if $line =~ /^\#/ || $line =~ /^\s+$/; + next; + } + + # parameter name + my $parameter = $1; + $parameter = $ABBR2FULL{$parameter} if defined($ABBR2FULL{$parameter}); + print OUT "[$parameter]\n"; + + # change parameter, if new values + if (defined($P{$parameter})) { + # write new values + foreach (@{$P{$parameter}}) { + print OUT $_."\n"; + } + delete($P{$parameter}); + # skip until new parameter, only write comments + while($line = ) { + print OUT $line if $line =~ /^\#/ || $line =~ /^\s+$/; + last if $line =~ /^\[/; + last unless $line; + } + next; + } + # unchanged parameter, write old + while($line = ) { + last if $line =~ /^\[/; + print OUT $line; + } + } + + # write all additional parameters + foreach my $parameter (keys %P) { + print OUT "\n[$parameter]\n"; + foreach (@{$P{$parameter}}) { + print OUT $_."\n"; + } + } + + close(INI); + close(OUT); + print STDERR "Saved: $outfn\n"; +} + + diff --git a/contrib/mert-sge-nosync/training/sge-nosync/moses-parallel-postdecode-sge-nosync.pl b/contrib/mert-sge-nosync/training/sge-nosync/moses-parallel-postdecode-sge-nosync.pl new file mode 100755 index 0000000000..0edbe37dbf --- /dev/null +++ b/contrib/mert-sge-nosync/training/sge-nosync/moses-parallel-postdecode-sge-nosync.pl @@ -0,0 +1,235 @@ +#!/usr/bin/perl + + +my $logflag=""; +my $logfile=""; +my $alifile=undef; +my $nbestflag=0; +my $processid=0; +my $idxliststr=""; +my $workingdir=""; +my $inputfile=""; +my $tmpdir=""; +my $splitpfx=""; +my $jobscript=""; +my $qsubout=""; +my $qsuberr=""; +my $nbestfile=undef; +my $nbestlist=undef; +my $outnbest=""; +my $lsamp_filename=""; +my @idxlist=(); + + +############################### +# Script starts here + +init(); + + + +#concatenating translations and removing temporary files +concatenate_1best(); +concatenate_logs() if $logflag; +concatenate_ali() if defined $alifile; +concatenate_nbest() if $nbestflag; +safesystem("cat nbest$$ >> /dev/stdout") if $nbestlist[0] eq '-'; + + +print STDERR "Not support searchgraphflag for sync mert\n" if $searchgraphflag; +# concatenate_searchgraph() if $searchgraphflag; +# safesystem("cat searchgraph$$ >> /dev/stdout") if $searchgraphlist eq '-'; + +print STDERR "Not support wordgraphflag for sync mert\n" if $searchgraphflag; +# concatenate_wordgraph() if $wordgraphflag; +# safesystem("cat wordgraph$$ >> /dev/stdout") if $wordgraphlist[0] eq '-'; + +remove_temporary_files(); +#### +#### ### ending scripts in run_decoder() ############## +#### sanity_check_order_of_lambdas($featlist, $filename); +#### ## how to do return??? +#### return ($filename, $lsamp_filename); +###################################################### + + + + +sub init(){ + use strict; + use Getopt::Long qw(:config pass_through no_ignore_case permute); + + GetOptions('alignment-output-file=s'=>\$alifile, + 'process-id=s'=>\$processid, + 'idxliststr=s'=>\$idxliststr, + 'logfile=s'=>\$logfile, + 'nbestfile=s'=>\$nbestfile, + 'outnbest=s'=>\$outnbest, + 'lsamp-filename=s'=>\$lsamp_filename, + 'input-file=s'=>\$inputfile + ) or exit(1); + + if ($logfile){ $logflag=1; } + + if (defined $nbestfile) { $nbestflag=1; } + + $idxliststr =~ s/^\s+|\s+$//g; + @idxlist = split(/\s+/,$idxliststr); + + my $pwdcmd = getPwdCmd(); + + $workingdir = `$pwdcmd`; chomp $workingdir; + $tmpdir="$workingdir/tmp$processid"; + $splitpfx="split$processid"; + + $jobscript="$workingdir/job$processid"; + $qsubout="$workingdir/out.job$processid"; + $qsuberr="$workingdir/err.job$processid"; + + # print STDERR "$idxliststr\n"; + +} + + +sub concatenate_nbest(){ + my $oldcode=""; + my $newcode=-1; + my %inplength = (); + my $offset = 0; + +# get the list of feature and set a fictitious string with zero scores + open (IN, "${nbestfile}.${splitpfx}$idxlist[0]"); + my $str = ; + chomp($str); + close(IN); + my ($code,$trans,$featurescores,$globalscore)=split(/\|\|\|/,$str); + + my $emptytrans = " "; + my $emptyglobalscore = " 0.0"; + my $emptyfeaturescores = $featurescores; + $emptyfeaturescores =~ s/[-0-9\.]+/0/g; + + if ($outnbest eq '-'){ $outnbest="nbest$processid"; } + + # my $outnbest=$nbestlist[0]; + # if ($nbestlist[0] eq '-'){ $outnbest="nbest$$"; } + + open (OUT, "> $outnbest"); + foreach my $idx (@idxlist){ + +#computing the length of each input file + # print STDERR "this idx: $idx\n"; + + my @in=(); + open (IN, "${inputfile}.${splitpfx}${idx}.trans"); + @in=; + close(IN); + $inplength{$idx} = scalar(@in); + + open (IN, "${nbestfile}.${splitpfx}${idx}"); + while (){ + my ($code,@extra)=split(/\|\|\|/,$_); + $code += $offset; + if ($code ne $oldcode){ +# if there is a jump between two consecutive codes +# it means that an input sentence is not translated +# fill this hole with a "fictitious" list of translation +# comprising just one "emtpy translation" with zero scores + while ($code - $oldcode > 1){ + $oldcode++; + print OUT join("\|\|\|",($oldcode,$emptytrans,$emptyfeaturescores,$emptyglobalscore)),"\n"; + } + } + $oldcode=$code; + print OUT join("\|\|\|",($oldcode,@extra)); + } + close(IN); + $offset += $inplength{$idx}; + + while ($offset - $oldcode > 1){ + $oldcode++; + print OUT join("\|\|\|",($oldcode,$emptytrans,$emptyfeaturescores,$emptyglobalscore)),"\n"; + } + } + close(OUT); +} + + +sub concatenate_1best(){ + foreach my $idx (@idxlist){ + # print STDERR "reading 1best file ${inputfile}.${splitpfx}$idx.trans\n"; + my @in=(); + open (IN, "${inputfile}.${splitpfx}${idx}.trans"); + @in=; + # print STDERR "in array is : @in"; + print STDOUT "@in"; + close(IN); + } +} + +sub concatenate_logs(){ + open (OUT, "> ${logfile}"); + foreach my $idx (@idxlist){ + my @in=(); + open (IN, "$qsubout$idx"); + @in=; + print OUT "@in"; + close(IN); + } + close(OUT); +} + +sub concatenate_ali(){ + open (OUT, "> ${alifile}"); + foreach my $idx (@idxlist){ + my @in=(); + open (IN, "$alifile.$splitpfx$idx"); + @in=; + print OUT "@in"; + close(IN); + } + close(OUT); +} + + + + +# look for the correct pwdcmd (pwd by default, pawd if it exists) +# I assume that pwd always exists +sub getPwdCmd(){ + my $pwdcmd="pwd"; + my $a; + chomp($a=`which pawd | head -1 | awk '{print $1}'`); + if ($a && -e $a){ $pwdcmd=$a; } + return $pwdcmd; +} + + +sub remove_temporary_files(){ + # removing temporary files + foreach my $idx (@idxlist){ + unlink("${inputfile}.${splitpfx}${idx}.trans"); + unlink("${inputfile}.${splitpfx}${idx}"); + if (defined $alifile){ unlink("${alifile}.${splitpfx}${idx}"); } + if ($nbestflag){ unlink("${nbestfile}.${splitpfx}${idx}"); } + if ($searchgraphflag){ unlink("${searchgraphfile}.${splitpfx}${idx}"); } + if ($wordgraphflag){ unlink("${wordgraphfile}.${splitpfx}${idx}"); } + + # print STDERR "Deleting ${jobscript}${idx}.bash\n"; + unlink("${jobscript}${idx}.bash"); + unlink("${jobscript}${idx}.log"); + unlink("$qsubname.W.log"); + unlink("$qsubout$idx"); + unlink("$qsuberr$idx"); + rmdir("$tmpdir"); + } + # unlink("${jobscript}.sync_workaround_script.sh"); + if ($nbestflag && $nbestlist[0] eq '-'){ unlink("${nbestfile}$$"); }; + if ($searchgraphflag && $searchgraphlist eq '-'){ unlink("${searchgraphfile}$$"); }; + if ($wordgraphflag && $wordgraphlist eq '-'){ unlink("${wordgraphfile}$$"); }; +} + + + + + diff --git a/contrib/mert-sge-nosync/training/sge-nosync/poll-decoder.pl b/contrib/mert-sge-nosync/training/sge-nosync/poll-decoder.pl new file mode 100755 index 0000000000..54e9ecedac --- /dev/null +++ b/contrib/mert-sge-nosync/training/sge-nosync/poll-decoder.pl @@ -0,0 +1,30 @@ +#!/usr/bin/perl + +use Getopt::Long qw(:config pass_through no_ignore_case permute); + +my $poll_target = undef; +my $working_dir = undef; + +GetOptions('poll-target=s'=> \$poll_target, + 'working-dir'=> \$working_dir + ) or exit(1); + + +if (defined $working_dir) { + chdir($working_dir); +} + +my $cnt = 1; + +print STDERR "Wait for file: $poll_target\n"; + +while (1) { + if (-e $poll_target){ + print STDERR "\n File found!!\n"; + last; + } else { + sleep(10); + print STDERR "."; + } +} + diff --git a/contrib/mert-sge-nosync/training/sge-nosync/process-featlist-sge-nosync.pl b/contrib/mert-sge-nosync/training/sge-nosync/process-featlist-sge-nosync.pl new file mode 100755 index 0000000000..02b18526a3 --- /dev/null +++ b/contrib/mert-sge-nosync/training/sge-nosync/process-featlist-sge-nosync.pl @@ -0,0 +1,283 @@ +#!/usr/bin/perl -w + +# $Id$ +# after filter-mode-given-input.pl, process the feature list + +# original code by Philipp Koehn +# changes by Ondrej Bojar +# adapted for hierarchical models by Phil Williams + +use strict; + +use FindBin qw($Bin); +use Getopt::Long; + + + +my $SCRIPTS_ROOTDIR; +if (defined($ENV{"SCRIPTS_ROOTDIR"})) { + $SCRIPTS_ROOTDIR = $ENV{"SCRIPTS_ROOTDIR"}; +} else { + $SCRIPTS_ROOTDIR = $Bin; + if ($SCRIPTS_ROOTDIR eq '') { + $SCRIPTS_ROOTDIR = dirname(__FILE__); + } + $SCRIPTS_ROOTDIR =~ s/\/training$//; + $ENV{"SCRIPTS_ROOTDIR"} = $SCRIPTS_ROOTDIR; +} + + +# moses.ini file uses FULL names for lambdas, while this training script +# internally (and on the command line) uses ABBR names. +my @ABBR_FULL_MAP = qw(d=weight-d lm=weight-l tm=weight-t w=weight-w + g=weight-generation lex=weight-lex I=weight-i); +my %ABBR2FULL = map {split/=/,$_,2} @ABBR_FULL_MAP; +my %FULL2ABBR = map {my ($a, $b) = split/=/,$_,2; ($b, $a);} @ABBR_FULL_MAP; + + + +my $verbose = 0; +my $usage = 0; # request for --help + + + + +##!# # consider phrases in input up to $MAX_LENGTH +##!# # in other words, all phrase-tables will be truncated at least to 10 words per +##!# # phrase. +##!# my $MAX_LENGTH = 10; + +# utilities +##!# my $ZCAT = "gzip -cd"; + +# get optional parameters +##!# my $opt_hierarchical = 0; +##!# my $binarizer = undef; +##!# my $opt_min_non_initial_rule_count = undef; +##!# my $opt_gzip = 1; # gzip output files (so far only phrase-based ttable until someone tests remaining models and formats) + +my $___RANGES = undef; +my $___ACTIVATE_FEATURES = undef; # comma-separated (or blank-separated) list of features to work on + # if undef work on all features + # (others are fixed to the starting values) +my $___DECODER_FLAGS = ""; # additional parametrs to pass to the decoder + +# set 0 if input type is text, set 1 if input type is confusion network +my $___INPUTTYPE = 0; + +my $___DECODER = undef; # required, pathname to the decoder executable +my $___CONFIG = undef; # required, pathname to startup ini file + + +GetOptions( + "activate-features=s" => \$___ACTIVATE_FEATURES, #comma-separated (or blank-separated) list of features to work on (others are fixed to the starting values) + "range=s@" => \$___RANGES, + "decoder-flags=s" => \$___DECODER_FLAGS, + "inputtype=i" => \$___INPUTTYPE +) or exit(1); + +##!# GetOptions( +##!# "gzip!" => \$opt_gzip, +##!# "Hierarchical" => \$opt_hierarchical, +##!# "Binarizer=s" => \$binarizer, +##!# "MinNonInitialRuleCount=i" => \$opt_min_non_initial_rule_count +##!# ) or exit(1); + + +# the ?? required parameters can be supplied on the command line directly +# or using the --options +if (scalar @ARGV == 2) { + # required parameters: options + $___DECODER = shift; + $___CONFIG = shift; +} + +if ($usage || !defined $___DECODER || !defined $___CONFIG) { + print STDERR "usage: $0 \$___DECODER \$___CONFIG(decoder.ini) +Options: + --activate-features=STRING ... comma-separated list of features to optimize, + others are fixed to the starting values + default: optimize all features + example: tm_0,tm_4,d_0 + --range=tm:0..1,-1..1 ... specify min and max value for some features + --range can be repeated as needed. + The order of the various --range specifications + is important only within a feature name. + E.g.: + --range=tm:0..1,-1..1 --range=tm:0..2 + is identical to: + --range=tm:0..1,-1..1,0..2 + but not to: + --range=tm:0..2 --range=tm:0..1,-1..1 + --decoder-flags=STRING ... extra parameters for the decoder + --inputtype=[0|1|2] ... Handle different input types: (0 for text, + 1 for confusion network, 2 for lattices, + default is 0) +"; + exit 1; +} + + + +##!# # get command line parameters +##!# my $dir = shift; +##!# my $config = shift; +##!# my $input = shift; + +##!# $dir = ensure_full_path($dir); + +############################################################ +############################################################ +############################################################ + +# main + +# we run moses to check validity of moses.ini and to obtain all the feature +# names +my $featlist = get_featlist_from_moses($___CONFIG); +$featlist = insert_ranges_to_featlist($featlist, $___RANGES); + + +# Mark which features are disabled: +if (defined $___ACTIVATE_FEATURES) { + my %enabled = map { ($_, 1) } split /[, ]+/, $___ACTIVATE_FEATURES; + my %cnt; + for(my $i=0; $i{"names"}}); $i++) { + my $name = $featlist->{"names"}->[$i]; + $cnt{$name} = 0 if !defined $cnt{$name}; + $featlist->{"enabled"}->[$i] = $enabled{$name."_".$cnt{$name}}; + $cnt{$name}++; + } +} else { + # all enabled + for(my $i=0; $i{"names"}}); $i++) { + $featlist->{"enabled"}->[$i] = 1; + } +} + +print STDERR "MERT starting values and ranges for random generation:\n"; +for(my $i=0; $i{"names"}}); $i++) { + my $name = $featlist->{"names"}->[$i]; + my $val = $featlist->{"values"}->[$i]; + my $min = $featlist->{"mins"}->[$i]; + my $max = $featlist->{"maxs"}->[$i]; + my $enabled = $featlist->{"enabled"}->[$i]; + printf STDERR " %5s = %7.3f", $name, $val; + if ($enabled) { + printf STDERR " (%5.2f .. %5.2f)\n", $min, $max; + } else { + print STDERR " --- inactive, not optimized ---\n"; + } +} + + + + + +sub get_featlist_from_moses { + # run moses with the given config file and return the list of features and + # their initial values + my $configfn = shift; + my $featlistfn = "./features.list"; + if (-e $featlistfn) { + print STDERR "Using cached features list: $featlistfn\n"; + } else { + print STDERR "Asking moses for feature names and values from $___CONFIG\n"; + my $cmd = "$___DECODER $___DECODER_FLAGS -config $configfn -inputtype $___INPUTTYPE -show-weights > $featlistfn"; + print STDERR "$cmd\n"; #DEBUG + safesystem($cmd) or die "Failed to run moses with the config $configfn"; + } + + # read feature list + my @names = (); + my @startvalues = (); + open(INI,$featlistfn) or die "Can't read $featlistfn"; + my $nr = 0; + my @errs = (); + while () { + $nr++; + chomp; + /^(.+) (\S+) (\S+)$/ || die("invalid feature: $_"); + my ($longname, $feature, $value) = ($1,$2,$3); + next if $value eq "sparse"; + push @errs, "$featlistfn:$nr:Bad initial value of $feature: $value\n" + if $value !~ /^[+-]?[0-9.e]+$/; + push @errs, "$featlistfn:$nr:Unknown feature '$feature', please add it to \@ABBR_FULL_MAP\n" + if !defined $ABBR2FULL{$feature}; + push @names, $feature; + push @startvalues, $value; + } + close INI; + if (scalar @errs) { + print STDERR join("", @errs); + exit 1; + } + return {"names"=>\@names, "values"=>\@startvalues}; +} + + +sub insert_ranges_to_featlist { + my $featlist = shift; + my $ranges = shift; + + $ranges = [] if !defined $ranges; + + # first collect the ranges from options + my $niceranges; + foreach my $range (@$ranges) { + my $name = undef; + foreach my $namedpair (split /,/, $range) { + if ($namedpair =~ /^(.*?):/) { + $name = $1; + $namedpair =~ s/^.*?://; + die "Unrecognized name '$name' in --range=$range" + if !defined $ABBR2FULL{$name}; + } + my ($min, $max) = split /\.\./, $namedpair; + die "Bad min '$min' in --range=$range" if $min !~ /^-?[0-9.]+$/; + die "Bad max '$max' in --range=$range" if $min !~ /^-?[0-9.]+$/; + die "No name given in --range=$range" if !defined $name; + push @{$niceranges->{$name}}, [$min, $max]; + } + } + + # now populate featlist + my $seen = undef; + for(my $i=0; $i{"names"}}); $i++) { + my $name = $featlist->{"names"}->[$i]; + $seen->{$name} ++; + my $min = 0.0; + my $max = 1.0; + if (defined $niceranges->{$name}) { + my $minmax = shift @{$niceranges->{$name}}; + ($min, $max) = @$minmax if defined $minmax; + } + $featlist->{"mins"}->[$i] = $min; + $featlist->{"maxs"}->[$i] = $max; + } + return $featlist; +} + +sub safesystem { + print STDERR "Executing: @_\n"; + system(@_); + if ($? == -1) { + print STDERR "Failed to execute: @_\n $!\n"; + exit(1); + } + elsif ($? & 127) { + printf STDERR "Execution of: @_\n died with signal %d, %s coredump\n", + ($? & 127), ($? & 128) ? 'with' : 'without'; + exit(1); + } + else { + my $exitcode = $? >> 8; + print STDERR "Exit code: $exitcode\n" if $exitcode; + return ! $exitcode; + } +} + + + + + diff --git a/contrib/mert-sge-nosync/training/sge-nosync/process-moses-result-sge-nosync.pl b/contrib/mert-sge-nosync/training/sge-nosync/process-moses-result-sge-nosync.pl new file mode 100755 index 0000000000..ee37b0f8f6 --- /dev/null +++ b/contrib/mert-sge-nosync/training/sge-nosync/process-moses-result-sge-nosync.pl @@ -0,0 +1,1377 @@ +#! /usr/bin/perl + +# $Id$ +# Usage: +# mert-moses.pl +# For other options see below or run 'mert-moses.pl --help' + +# Notes: +# and should be raw text files, one sentence per line +# can be a prefix, in which case the files are 0, 1, etc. are used + +# Excerpts from revision history + +# Sept 2011 multi-threaded mert (Barry Haddow) +# 3 Aug 2011 Added random directions, historic best, pairwise ranked (PK) +# Jul 2011 simplifications (Ondrej Bojar) +# -- rely on moses' -show-weights instead of parsing moses.ini +# ... so moses is also run once *before* mert starts, checking +# the model to some extent +# -- got rid of the 'triples' mess; +# use --range to supply bounds for random starting values: +# --range tm:-3..3 --range lm:-3..3 +# 5 Aug 2009 Handling with different reference length policies (shortest, average, closest) for BLEU +# and case-sensistive/insensitive evaluation (Nicola Bertoldi) +# 5 Jun 2008 Forked previous version to support new mert implementation. +# 13 Feb 2007 Better handling of default values for lambda, now works with multiple +# models and lexicalized reordering +# 11 Oct 2006 Handle different input types through parameter --inputype=[0|1] +# (0 for text, 1 for confusion network, default is 0) (Nicola Bertoldi) +# 10 Oct 2006 Allow skip of filtering of phrase tables (--no-filter-phrase-table) +# useful if binary phrase tables are used (Nicola Bertoldi) +# 28 Aug 2006 Use either closest or average or shortest (default) reference +# length as effective reference length +# Use either normalization or not (default) of texts (Nicola Bertoldi) +# 31 Jul 2006 move gzip run*.out to avoid failure wit restartings +# adding default paths +# 29 Jul 2006 run-filter, score-nbest and mert run on the queue (Nicola; Ondrej had to type it in again) +# 28 Jul 2006 attempt at foolproof usage, strong checking of input validity, merged the parallel and nonparallel version (Ondrej Bojar) +# 27 Jul 2006 adding the safesystem() function to handle with process failure +# 22 Jul 2006 fixed a bug about handling relative path of configuration file (Nicola Bertoldi) +# 21 Jul 2006 adapted for Moses-in-parallel (Nicola Bertoldi) +# 18 Jul 2006 adapted for Moses and cleaned up (PK) +# 21 Jan 2005 unified various versions, thorough cleanup (DWC) +# now indexing accumulated n-best list solely by feature vectors +# 14 Dec 2004 reimplemented find_threshold_points in C (NMD) +# 25 Oct 2004 Use either average or shortest (default) reference +# length as effective reference length (DWC) +# 13 Oct 2004 Use alternative decoders (DWC) +# Original version by Philipp Koehn + +use strict; +use Net::OpenSSH::Compat::Perl; + +use FindBin qw($Bin); +use File::Basename; +use File::Path; +use File::Spec; +use Cwd; + +my $SCRIPTS_ROOTDIR = $Bin; +$SCRIPTS_ROOTDIR =~ s/\/training$//; +$SCRIPTS_ROOTDIR = $ENV{"SCRIPTS_ROOTDIR"} if defined($ENV{"SCRIPTS_ROOTDIR"}); + +## We preserve this bit of comments to keep the traditional weight ranges. +# "w" => [ [ 0.0, -1.0, 1.0 ] ], # word penalty +# "d" => [ [ 1.0, 0.0, 2.0 ] ], # lexicalized reordering model +# "lm" => [ [ 1.0, 0.0, 2.0 ] ], # language model +# "g" => [ [ 1.0, 0.0, 2.0 ], # generation model +# [ 1.0, 0.0, 2.0 ] ], +# "tm" => [ [ 0.3, 0.0, 0.5 ], # translation model +# [ 0.2, 0.0, 0.5 ], +# [ 0.3, 0.0, 0.5 ], +# [ 0.2, 0.0, 0.5 ], +# [ 0.0,-1.0, 1.0 ] ], # ... last weight is phrase penalty +# "lex"=> [ [ 0.1, 0.0, 0.2 ] ], # global lexical model +# "I" => [ [ 0.0,-1.0, 1.0 ] ], # input lattice scores + + + +# moses.ini file uses FULL names for lambdas, while this training script +# internally (and on the command line) uses ABBR names. +my @ABBR_FULL_MAP = qw(d=weight-d lm=weight-l tm=weight-t w=weight-w + g=weight-generation lex=weight-lex I=weight-i); +my %ABBR2FULL = map {split/=/,$_,2} @ABBR_FULL_MAP; +my %FULL2ABBR = map {my ($a, $b) = split/=/,$_,2; ($b, $a);} @ABBR_FULL_MAP; + +my $minimum_required_change_in_weights = 0.00001; + # stop if no lambda changes more than this + +my $verbose = 0; +my $usage = 0; # request for --help + +# We assume that if you don't specify working directory, +# we set the default is set to `pwd`/mert-work +# my $___WORKING_DIR = File::Spec->catfile(Cwd::getcwd(), "mert-work"); +my $___WORKING_DIR = undef; +my $___DEV_E = undef; +my $___DEV_F = undef; # required, input text to decode +my $___DECODER = undef; # required, pathname to the decoder executable +my $___CONFIG = undef; # required, pathname to startup ini file +my $___N_BEST_LIST_SIZE = 100; +my $___LATTICE_SAMPLES = 0; +my $queue_flags = "-hard"; # extra parameters for parallelizer + # the -l ws0ssmt was relevant only to JHU 2006 workshop +my $___JOBS = undef; # if parallel, number of jobs to use (undef or 0 -> serial) +my $___DECODER_FLAGS = ""; # additional parametrs to pass to the decoder +my $continue = 0; # should we try to continue from the last saved step? +my $skip_decoder = 0; # and should we skip the first decoder run (assuming we got interrupted during mert) +my $___FILTER_PHRASE_TABLE = 1; # filter phrase table +my $___PREDICTABLE_SEEDS = 0; +my $___START_WITH_HISTORIC_BESTS = 0; # use best settings from all previous iterations as starting points [Foster&Kuhn,2009] +my $___RANDOM_DIRECTIONS = 0; # search in random directions only +my $___NUM_RANDOM_DIRECTIONS = 0; # number of random directions, also works with default optimizer [Cer&al.,2008] +my $___PAIRWISE_RANKED_OPTIMIZER = 0; # use Hopkins&May[2011] +my $___PRO_STARTING_POINT = 0; # get a starting point from pairwise ranked optimizer +my $___RANDOM_RESTARTS = 20; +my $___HISTORIC_INTERPOLATION = 0; # interpolate optimize weights with previous iteration's weights [Hopkins&May,2011,5.4.3] +my $__THREADS = 0; +my $run = 0; +my $nextrun = 0; +my $submithost = ""; + + +# Parameter for effective reference length when computing BLEU score +# Default is to use shortest reference +# Use "--shortest" to use shortest reference length +# Use "--average" to use average reference length +# Use "--closest" to use closest reference length +# Only one between --shortest, --average and --closest can be set +# If more than one choice the defualt (--shortest) is used +my $___SHORTEST = 0; +my $___AVERAGE = 0; +my $___CLOSEST = 0; + +# Use "--nocase" to compute case-insensitive scores +my $___NOCASE = 0; + +# Use "--nonorm" to non normalize translation before computing scores +my $___NONORM = 0; + +# set 0 if input type is text, set 1 if input type is confusion network +my $___INPUTTYPE = 0; + + +my $mertdir = undef; # path to new mert directory +my $mertargs = undef; # args to pass through to mert & extractor +my $mertmertargs = undef; # args to pass through to mert only +my $extractorargs = undef; # args to pass through to extractor only +my $filtercmd = undef; # path to filter-model-given-input.pl +my $filterfile = undef; +my $qsubwrapper = undef; +my $qsubwrapper_exit = undef; +my $moses_parallel_cmd = undef; +my $old_sge = 0; # assume sge<6.0 +my $___CONFIG_ORIG = undef; # pathname to startup ini file before filtering +my $___ACTIVATE_FEATURES = undef; # comma-separated (or blank-separated) list of features to work on + # if undef work on all features + # (others are fixed to the starting values) +my $___RANGES = undef; +my $prev_aggregate_nbl_size = -1; # number of previous step to consider when loading data (default =-1) + # -1 means all previous, i.e. from iteration 1 + # 0 means no previous data, i.e. from actual iteration + # 1 means 1 previous data , i.e. from the actual iteration and from the previous one + # and so on +my $maximum_iterations = 25; + +##################### +my $processfeatlistcmd = undef; +my $processfeatlistargs = undef; +my $createconfigcmd = undef; +my $createconfigargs = undef; +my $decoderargs = undef; +##################### + +use Getopt::Long; +GetOptions( + "working-dir=s" => \$___WORKING_DIR, + "input=s" => \$___DEV_F, + "inputtype=i" => \$___INPUTTYPE, + "refs=s" => \$___DEV_E, + "decoder=s" => \$___DECODER, + "config=s" => \$___CONFIG, + "nbest=i" => \$___N_BEST_LIST_SIZE, + "lattice-samples=i" => \$___LATTICE_SAMPLES, + "queue-flags=s" => \$queue_flags, + "jobs=i" => \$___JOBS, + "decoder-flags=s" => \$___DECODER_FLAGS, + "continue" => \$continue, + "skip-decoder" => \$skip_decoder, + "shortest" => \$___SHORTEST, + "average" => \$___AVERAGE, + "closest" => \$___CLOSEST, + "nocase" => \$___NOCASE, + "nonorm" => \$___NONORM, + "help" => \$usage, + "verbose" => \$verbose, + "mertdir=s" => \$mertdir, + "mertargs=s" => \$mertargs, + "extractorargs=s" => \$extractorargs, + "mertmertargs=s" => \$mertmertargs, + "rootdir=s" => \$SCRIPTS_ROOTDIR, + "filtercmd=s" => \$filtercmd, # allow to override the default location + "filterfile=s" => \$filterfile, # input to filtering script (useful for lattices/confnets) + "qsubwrapper=s" => \$qsubwrapper, # allow to override the default location + "mosesparallelcmd=s" => \$moses_parallel_cmd, # allow to override the default location + "old-sge" => \$old_sge, #passed to moses-parallel + "filter-phrase-table!" => \$___FILTER_PHRASE_TABLE, # (dis)allow of phrase tables + "predictable-seeds" => \$___PREDICTABLE_SEEDS, # make random restarts deterministic + "historic-bests" => \$___START_WITH_HISTORIC_BESTS, # use best settings from all previous iterations as starting points + "random-directions" => \$___RANDOM_DIRECTIONS, # search only in random directions + "run=i" => \$run, + "number-of-random-directions=i" => \$___NUM_RANDOM_DIRECTIONS, # number of random directions + "random-restarts=i" => \$___RANDOM_RESTARTS, # number of random restarts + "activate-features=s" => \$___ACTIVATE_FEATURES, #comma-separated (or blank-separated) list of features to work on (others are fixed to the starting values) + "range=s@" => \$___RANGES, + "submithost=s" => \$submithost, + "prev-aggregate-nbestlist=i" => \$prev_aggregate_nbl_size, #number of previous step to consider when loading data (default =-1, i.e. all previous) + "maximum-iterations=i" => \$maximum_iterations, + "pairwise-ranked" => \$___PAIRWISE_RANKED_OPTIMIZER, + "pro-starting-point" => \$___PRO_STARTING_POINT, + "historic-interpolation=f" => \$___HISTORIC_INTERPOLATION, + "threads=i" => \$__THREADS +) or exit(1); + +# the 4 required parameters can be supplied on the command line directly +# or using the --options +if (scalar @ARGV == 3) { + # required parameters: input_file references_basename decoder_executable + $___DEV_F = shift; + $___DECODER = shift; + $___CONFIG = shift; +} + + + +if ($usage || !defined $___DECODER || !defined $___CONFIG || !defined $___DEV_F) { + print STDERR "usage: $0 input-text decoder-executable decoder.ini +Options: + --working-dir=mert-dir ... where all the files are created + --nbest=100 ... how big nbestlist to generate + --lattice-samples ... how many lattice samples (Chatterjee & Cancedda, emnlp 2010) + --jobs=N ... set this to anything to run moses in parallel + --mosesparallelcmd=STR ... use a different script instead of moses-parallel + --queue-flags=STRING ... anything you with to pass to qsub, eg. + '-l ws06osssmt=true'. The default is: '-hard' + To reset the parameters, please use + --queue-flags=' ' + (i.e. a space between the quotes). + --decoder-flags=STRING ... extra parameters for the decoder + --continue ... continue from the last successful iteration + --skip-decoder ... skip the decoder run for the first time, + assuming that we got interrupted during + optimization + --shortest --average --closest + ... Use shortest/average/closest reference length + as effective reference length (mutually exclusive) + --nocase ... Do not preserve case information; i.e. + case-insensitive evaluation (default is false). + --nonorm ... Do not use text normalization (flag is not active, + i.e. text is NOT normalized) + --filtercmd=STRING ... path to filter-model-given-input.pl + --filterfile=STRING ... path to alternative to input-text for filtering + model. useful for lattice decoding + --rootdir=STRING ... where do helpers reside (if not given explicitly) + --mertdir=STRING ... path to new mert implementation + --mertargs=STRING ... extra args for both extractor and mert + --extractorargs=STRING ... extra args for extractor only + --mertmertargs=STRING ... extra args for mert only + --scorenbestcmd=STRING ... path to score-nbest.py + --old-sge ... passed to parallelizers, assume Grid Engine < 6.0 + --inputtype=[0|1|2] ... Handle different input types: (0 for text, + 1 for confusion network, 2 for lattices, + default is 0) + --no-filter-phrase-table ... disallow filtering of phrase tables + (useful if binary phrase tables are available) + --random-restarts=INT ... number of random restarts (default: 20) + --predictable-seeds ... provide predictable seeds to mert so that random + restarts are the same on every run + --range=tm:0..1,-1..1 ... specify min and max value for some features + --range can be repeated as needed. + The order of the various --range specifications + is important only within a feature name. + E.g.: + --range=tm:0..1,-1..1 --range=tm:0..2 + is identical to: + --range=tm:0..1,-1..1,0..2 + but not to: + --range=tm:0..2 --range=tm:0..1,-1..1 + --activate-features=STRING ... comma-separated list of features to optimize, + others are fixed to the starting values + default: optimize all features + example: tm_0,tm_4,d_0 + --prev-aggregate-nbestlist=INT ... number of previous step to consider when + loading data (default = $prev_aggregate_nbl_size) + -1 means all previous, i.e. from iteration 1 + 0 means no previous data, i.e. only the + current iteration + N means this and N previous iterations + + --maximum-iterations=ITERS ... Maximum number of iterations. Default: $maximum_iterations + --random-directions ... search only in random directions + --number-of-random-directions=int ... number of random directions + (also works with regular optimizer, default: 0) + --pairwise-ranked ... Use PRO for optimisation (Hopkins and May, emnlp 2011) + --pro-starting-point ... Use PRO to get a starting point for MERT + --threads=NUMBER ... Use multi-threaded mert (must be compiled in). + --historic-interpolation ... Interpolate optimized weights with prior iterations' weight + (parameter sets factor [0;1] given to current weights) +"; + exit 1; +} + + +# Check validity of input parameters and set defaults if needed + +print STDERR "Using SCRIPTS_ROOTDIR: $SCRIPTS_ROOTDIR\n"; + +# path of script for filtering phrase tables and running the decoder +$filtercmd="$SCRIPTS_ROOTDIR/training/filter-model-given-input.pl" if !defined $filtercmd; + +if ( ! -x $filtercmd && ! $___FILTER_PHRASE_TABLE) { + print STDERR "Filtering command not found: $filtercmd.\n"; + print STDERR "Use --filtercmd=PATH to specify a valid one or --no-filter-phrase-table\n"; + exit 1; +} + +# $qsubwrapper="$SCRIPTS_ROOTDIR/generic/qsub-wrapper.pl" if !defined $qsubwrapper; +$qsubwrapper = "$SCRIPTS_ROOTDIR/generic/qsub-wrapper-sge-nosync.pl" if !defined $qsubwrapper; + +$qsubwrapper_exit = "$SCRIPTS_ROOTDIR/generic/qsub-wrapper-exit-sge-nosync.pl" if !defined $qsubwrapper_exit; + +# $moses_parallel_cmd = "$SCRIPTS_ROOTDIR/generic/moses-parallel.pl" +# if !defined $moses_parallel_cmd; +$moses_parallel_cmd = "$SCRIPTS_ROOTDIR/generic/moses-parallel-sge-nosync.pl" + if !defined $moses_parallel_cmd; + +if (!defined $mertdir) { + $mertdir = "$SCRIPTS_ROOTDIR/../mert"; + print STDERR "Assuming --mertdir=$mertdir\n"; +} + +my $mert_extract_cmd = "$mertdir/extractor"; +my $mert_mert_cmd = "$mertdir/mert"; +my $mert_pro_cmd = "$mertdir/pro"; + +die "Not executable: $mert_extract_cmd" if ! -x $mert_extract_cmd; +die "Not executable: $mert_mert_cmd" if ! -x $mert_mert_cmd; +die "Not executable: $mert_pro_cmd" if ! -x $mert_pro_cmd; + +my $pro_optimizer = "$mertdir/megam_i686.opt"; # or set to your installation +if (($___PAIRWISE_RANKED_OPTIMIZER || $___PRO_STARTING_POINT) && ! -x $pro_optimizer) { + print "did not find $pro_optimizer, installing it in $mertdir\n"; + `cd $mertdir; wget http://www.cs.utah.edu/~hal/megam/megam_i686.opt.gz;`; + `gunzip $pro_optimizer.gz`; + `chmod +x $pro_optimizer`; + die("ERROR: Installation of megam_i686.opt failed! Install by hand from http://www.cs.utah.edu/~hal/megam/") unless -x $pro_optimizer; +} + +$mertargs = "" if !defined $mertargs; + +my $scconfig = undef; +if ($mertargs =~ /\-\-scconfig\s+(.+?)(\s|$)/){ + $scconfig=$1; + $scconfig =~ s/\,/ /g; + $mertargs =~ s/\-\-scconfig\s+(.+?)(\s|$)//; +} + +# handling reference lengh strategy +if (($___CLOSEST + $___AVERAGE + $___SHORTEST) > 1){ + die "You can specify just ONE reference length strategy (closest or shortest or average) not both\n"; +} + +if ($___SHORTEST){ + $scconfig .= " reflen:shortest"; +}elsif ($___AVERAGE){ + $scconfig .= " reflen:average"; +}elsif ($___CLOSEST){ + $scconfig .= " reflen:closest"; +} + +# handling case-insensitive flag +if ($___NOCASE) { + $scconfig .= " case:false"; +}else{ + $scconfig .= " case:true"; +} +$scconfig =~ s/^\s+//; +$scconfig =~ s/\s+$//; +$scconfig =~ s/\s+/,/g; + +$scconfig = "--scconfig $scconfig" if ($scconfig); + +my $mert_extract_args=$mertargs; +$mert_extract_args .=" $scconfig"; +$mert_extract_args .=" $extractorargs"; + +$mertmertargs = "" if !defined $mertmertargs; + +my $mert_mert_args="$mertargs $mertmertargs"; +$mert_mert_args =~ s/\-+(binary|b)\b//; +$mert_mert_args .=" $scconfig"; +if ($___ACTIVATE_FEATURES){ $mert_mert_args .=" -o \"$___ACTIVATE_FEATURES\""; } + +my ($just_cmd_filtercmd,$x) = split(/ /,$filtercmd); +die "Not executable: $just_cmd_filtercmd" if ! -x $just_cmd_filtercmd; +die "Not executable: $moses_parallel_cmd" if defined $___JOBS && ! -x $moses_parallel_cmd; +die "Not executable: $qsubwrapper" if defined $___JOBS && ! -x $qsubwrapper; +# die "Not executable: $___DECODER" if ! -x $___DECODER; + +my $input_abs = ensure_full_path($___DEV_F); +die "File not found: $___DEV_F (interpreted as $input_abs)." +if ! -e $input_abs; + $___DEV_F = $input_abs; + +# Option to pass to qsubwrapper and moses-parallel +my $pass_old_sge = $old_sge ? "-old-sge" : ""; + +my $decoder_abs = ensure_full_path($___DECODER); +die "File not executable: $___DECODER (interpreted as $decoder_abs)." + if ! -x $decoder_abs; +$___DECODER = $decoder_abs; + + +my $config_abs = ensure_full_path($___CONFIG); +die "File not found: $___CONFIG (interpreted as $config_abs)." + if ! -e $config_abs; +$___CONFIG = $config_abs; + +# moses should use our config +if ($___DECODER_FLAGS =~ /(^|\s)-(config|f) / +|| $___DECODER_FLAGS =~ /(^|\s)-(ttable-file|t) / +|| $___DECODER_FLAGS =~ /(^|\s)-(distortion-file) / +|| $___DECODER_FLAGS =~ /(^|\s)-(generation-file) / +|| $___DECODER_FLAGS =~ /(^|\s)-(lmodel-file) / +|| $___DECODER_FLAGS =~ /(^|\s)-(global-lexical-file) / +) { + die "It is forbidden to supply any of -config, -ttable-file, -distortion-file, -generation-file or -lmodel-file in the --decoder-flags.\nPlease use only the --config option to give the config file that lists all the supplementary files."; +} + +# as weights are normalized in the next steps (by cmert) +# normalize initial LAMBDAs, too +my $need_to_normalize = 0; + +#store current directory and create the working directory (if needed) +my $cwd = `pawd 2>/dev/null`; +if(!$cwd){$cwd = `pwd`;} +chomp($cwd); + +$___WORKING_DIR = $cwd if (!defined $___WORKING_DIR); +chomp $___WORKING_DIR; + +# mkpath($___WORKING_DIR); + +{ +# open local scope + +#chdir to the working directory +chdir($___WORKING_DIR) or die "Can't chdir to $___WORKING_DIR"; + +# fixed file names +my $mert_outfile = "mert.out"; +my $mert_logfile = "mert.log"; +my $weights_in_file = "init.opt"; +my $weights_out_file = "weights.txt"; + +# set start run +my $start_run = 1; +my $bestpoint = undef; +my $devbleu = undef; +my $sparse_weights_file = undef; +my $jobid = -1; + +my $prev_feature_file = undef; +my $prev_score_file = undef; +my $prev_init_file = undef; + + +######################### +# set jobid to trace different jobs +my $prevjid = undef; + + + +### load featlist when needed######## +print STDERR "loading feat config ./run$run.moses.ini\n"; +my $featlist = get_featlist_from_moses("./run$run.moses.ini"); +$featlist = insert_ranges_to_featlist($featlist, $___RANGES); + +# Mark which features are disabled: +if (defined $___ACTIVATE_FEATURES) { + my %enabled = map { ($_, 1) } split /[, ]+/, $___ACTIVATE_FEATURES; + my %cnt; + for(my $i=0; $i{"names"}}); $i++) { + my $name = $featlist->{"names"}->[$i]; + $cnt{$name} = 0 if !defined $cnt{$name}; + $featlist->{"enabled"}->[$i] = $enabled{$name."_".$cnt{$name}}; + $cnt{$name}++; + } +} else { + # all enabled + for(my $i=0; $i{"names"}}); $i++) { + $featlist->{"enabled"}->[$i] = 1; + } +} + +##################################### + + + +my $oldallsorted = undef; +my $allsorted = undef; + +my $nbest_file=undef; +my $lsamp_file=undef; #Lattice samples +my $orig_nbest_file=undef; # replaced if lattice sampling +my $cmd=undef; + + + + + my $base_feature_file = "features.dat"; + my $base_score_file = "scores.dat"; + my $feature_file = "run$run.${base_feature_file}"; + my $score_file = "run$run.${base_score_file}"; + + + + # Create the initial weights file for mert: init.opt + foreach (@{$featlist->{"names"}}) { + print STDERR "feature list name: $_\n"; + } + + my @MIN = @{$featlist->{"mins"}}; + my @MAX = @{$featlist->{"maxs"}}; + my @CURR = @{$featlist->{"values"}}; + my @NAME = @{$featlist->{"names"}}; + + open(OUT,"> $weights_in_file") + or die "Can't write $weights_in_file (WD now $___WORKING_DIR)"; + print OUT join(" ", @CURR)."\n"; + print OUT join(" ", @MIN)."\n"; # this is where we could pass MINS + print OUT join(" ", @MAX)."\n"; # this is where we could pass MAXS + close(OUT); + # print join(" ", @NAME)."\n"; + + print "CURR before MERT @CURR\n"; + + # make a backup copy labelled with this run number + safesystem("\\cp -f $weights_in_file run$run.$weights_in_file") or die; + + my $DIM = scalar(@CURR); # number of lambdas + + # run mert + $cmd = "$mert_mert_cmd -d $DIM $mert_mert_args"; + + my $mert_settings = " -n $___RANDOM_RESTARTS"; + my $seed_settings = ""; + if ($___PREDICTABLE_SEEDS) { + my $seed = $run * 1000; + $seed_settings .= " -r $seed"; + } + $mert_settings .= $seed_settings; + if ($___RANDOM_DIRECTIONS) { + if ($___NUM_RANDOM_DIRECTIONS == 0) { + $mert_settings .= " -m 50"; + } + $mert_settings .= " -t random-direction"; + } + if ($___NUM_RANDOM_DIRECTIONS) { + $mert_settings .= " -m $___NUM_RANDOM_DIRECTIONS"; + } + if ($__THREADS) { + $mert_settings .= " --threads $__THREADS"; + } + + ############################## + # construct prev_feature_file and prev_socre_file + + my $firstrun; + if ($prev_aggregate_nbl_size==-1){ + $firstrun=1; + } + else{ + $firstrun=$run-$prev_aggregate_nbl_size+1; + $firstrun=($firstrun>0)?$firstrun:1; + } + ############################## + + print "loading data from $firstrun to $run (prev_aggregate_nbl_size=$prev_aggregate_nbl_size)\n"; + $prev_feature_file = undef; + $prev_score_file = undef; + $prev_init_file = undef; + for (my $i=$firstrun;$i<$run;$i++){ + if (defined $prev_feature_file){ + $prev_feature_file = "${prev_feature_file},run${i}.${base_feature_file}"; + } + else{ + $prev_feature_file = "run${i}.${base_feature_file}"; + } + if (defined $prev_score_file){ + $prev_score_file = "${prev_score_file},run${i}.${base_score_file}"; + } + else{ + $prev_score_file = "run${i}.${base_score_file}"; + } + } + + print STDERR "prev_feature_file is $prev_feature_file\n"; + print STDERR "prev_score_files is $prev_score_file\n"; + print STDERR "prev_init_files is undefined\n"; + ############################ + + + my $ffiles = ""; + my $scfiles = ""; + if (defined $prev_feature_file) { + $ffiles = "$prev_feature_file,$feature_file"; + } + else{ + $ffiles = "$feature_file"; + } + if (defined $prev_score_file) { + $scfiles = "$prev_score_file,$score_file"; + } + else{ + $scfiles = "$score_file"; + } + + my $file_settings = " --ffile $ffiles --scfile $scfiles"; + my $pro_file_settings = "--ffile " . join( " --ffile ", split(/,/, $ffiles)) . + " --scfile " . join( " --scfile ", split(/,/, $scfiles)); + + if ($___START_WITH_HISTORIC_BESTS && defined $prev_init_file) { + $file_settings .= " --ifile $prev_init_file,run$run.$weights_in_file"; + } + else{ + $file_settings .= " --ifile run$run.$weights_in_file"; + } + + $cmd .= $file_settings; + + # pro optimization + if ($___PAIRWISE_RANKED_OPTIMIZER) { + print STDERR "\$___PAIRWISE_RANKED_OPTIMIZER not supported in non-sync mode\n"; + exit 1; + } + # first pro, then mert + elsif ($___PRO_STARTING_POINT) { + print STDERR "\$___PRO_STARTING_POINT not supported in non-sync mode\n"; + exit 1; + # run pro... + my $pro_cmd = "$mert_pro_cmd $seed_settings $pro_file_settings -o run$run.pro.data ; $pro_optimizer -fvals -maxi 30 -nobias binary run$run.pro.data"; + &submit_or_exec($pro_cmd,"run$run.pro.out","run$run.pro.err"); + # ... get results ... + my %dummy; + ($bestpoint,$devbleu) = &get_weights_from_mert("run$run.pro.out","run$run.pro.err",scalar @{$featlist->{"names"}},\%dummy); + open(PRO_START,">run$run.init.pro"); + print PRO_START $bestpoint."\n"; + close(PRO_START); + # ... and run mert + $cmd =~ s/(--ifile \S+)/$1,run$run.init.pro/; + &submit_or_exec($cmd.$mert_settings,$mert_outfile,$mert_logfile); + } + # just mert + else { + print STDERR "I am running just MERT\n"; + &submit_or_exec($cmd.$mert_settings,$mert_outfile,$mert_logfile); + } + + die "Optimization failed, file $weights_out_file does not exist or is empty" + if ! -s $weights_out_file; + + # backup copies + safesystem ("\\cp -f extract.err run$run.extract.err") or die; + safesystem ("\\cp -f extract.out run$run.extract.out") or die; + safesystem ("\\cp -f $mert_outfile run$run.$mert_outfile") or die; + safesystem ("\\cp -f $mert_logfile run$run.$mert_logfile") or die; + safesystem ("touch $mert_logfile run$run.$mert_logfile") or die; + safesystem ("\\cp -f $weights_out_file run$run.$weights_out_file") or die; # this one is needed for restarts, too + + print "run $run end at ".`date`; + + my %sparse_weights; # sparse features + ($bestpoint,$devbleu) = &get_weights_from_mert("run$run.$mert_outfile","run$run.$mert_logfile",scalar @{$featlist->{"names"}},\%sparse_weights); + + die "Failed to parse mert.log, missed Best point there." + if !defined $bestpoint || !defined $devbleu; + + print "($run) BEST at $run: $bestpoint => $devbleu at ".`date`; + + # update my cache of lambda values + my @newweights = split /\s+/, $bestpoint; + + # interpolate with prior's interation weight, if historic-interpolation is specified + if ($___HISTORIC_INTERPOLATION>0 && $run>3) { + my %historic_sparse_weights; + if (-e "run$run.sparse-weights") { + open(SPARSE,"run$run.sparse-weights"); + while() { + chop; + my ($feature,$weight) = split; + $historic_sparse_weights{$feature} = $weight; + } + } + my $prev = $run-1; + my @historic_weights = split /\s+/, `cat run$prev.$weights_out_file`; + for(my $i=0;$i $sparse_weights{$_}\n"; + } + foreach (keys %historic_sparse_weights) { + $sparse_weights{$_} += (1-$___HISTORIC_INTERPOLATION) * $historic_sparse_weights{$_}; + #print STDERR "sparse_weights{$_} += (1-$___HISTORIC_INTERPOLATION) * $historic_sparse_weights{$_} -> $sparse_weights{$_}\n"; + } + } + if ($___HISTORIC_INTERPOLATION>0) { + open(WEIGHTS,">run$run.$weights_out_file"); + print WEIGHTS join(" ",@newweights); + close(WEIGHTS); + } + + $featlist->{"values"} = \@newweights; + + if (scalar keys %sparse_weights) { + $sparse_weights_file = "run".($run+1).".sparse-weights"; + open(SPARSE,">".$sparse_weights_file); + foreach my $feature (keys %sparse_weights) { + print SPARSE "$feature $sparse_weights{$feature}\n"; + } + close(SPARSE); + } + + ## additional stopping criterion: weights have not changed + my $shouldstop = 1; + print "CURR after MERT: @CURR\n"; + + for(my $i=0; $i<@CURR; $i++) { + die "Lost weight! mert reported fewer weights (@newweights) than we gave it (@CURR)" + if !defined $newweights[$i]; + # print STDERR "$i Current weight : $CURR[$i]\n"; + # print STDERR "$i New weight: $newweights[$i]\n"; + if (abs($CURR[$i] - $newweights[$i]) >= $minimum_required_change_in_weights) { + $shouldstop = 0; + # last; + } + } + + + open F, "> finished_step.txt" or die "Can't mark finished step"; + print F $run."\n"; + close F; + + ##################################################33 + print "loading data from $prev_feature_file\n" if defined($prev_feature_file); + print "loading data from $prev_score_file\n" if defined($prev_score_file); + print "loading data from $prev_init_file\n" if defined($prev_init_file); + + + ### extra step to create config for next step ################### + $nextrun=$run+1; + + create_config($___CONFIG, "./run$nextrun.moses.ini", $featlist, $nextrun, $devbleu, $sparse_weights_file); + ################################################################# + + + if ($shouldstop) { + print STDERR "None of the weights changed more than $minimum_required_change_in_weights. Stopping.\n"; + + for (my $i=$run+1;$i<=$maximum_iterations;$i++){ + kill_unnecessary_jobs($submithost,$i); + } + last; ## end while loop + } + + + + +} # end of local scope + + + +sub kill_unnecessary_jobs { + my ($submithost,$iter_id) = @_; + my @sgepids = (); + my @processids = (); + my $jobid = ""; + my $pidid = undef; + my $kill_target = ""; + my $ssh = undef; + + ## read all relevant jobid ######### + chomp($jobid=`cat decode$iter_id.id decode$iter_id.POLL.id zipext$iter_id.id processmoses$iter_id.id`); + + if ($jobid != "") { + @sgepids = split("\n",$jobid); + $kill_target = join(" ",@sgepids); + } + #################################### + + if ($kill_target != "") { + chomp(my $my_username = `whoami`); + $ssh = Net::OpenSSH::Compat::Perl->new($submithost, debug=>0); + + $ssh->login("$my_username",`cat /home/$my_username/accpw`); + $ssh->cmd("qdel $kill_target"); + } + + + + ## read relevant pid ############### + chomp($pidid=`ls decode$iter_id.id.pid decode$iter_id.POLL.id.pid zipext$iter_id.id.pid processmoses$iter_id.id.pid`); + + if (defined $pidid) { + @processids = split("\n",$pidid); + } + ################################### + + + foreach my $kill_pidfile (@processids) { + print STDERR "Force delete process represented by $kill_pidfile\n"; + &force_exit_submit_thu_host($submithost,$kill_pidfile); + } + #################################### + + + + +} + +sub get_weights_from_mert { + my ($outfile,$logfile,$weight_count,$sparse_weights) = @_; + my ($bestpoint,$devbleu); + + if ($___PAIRWISE_RANKED_OPTIMIZER || ($___PRO_STARTING_POINT && $logfile =~ /pro/)) { + open(IN,$outfile) or die "Can't open $outfile"; + my (@WEIGHT,$sum); + for(my $i=0;$i<$weight_count;$i++) { push @WEIGHT, 0; } + while() { + # regular features + if (/^F(\d+) ([\-\.\de]+)/) { + $WEIGHT[$1] = $2; + $sum += abs($2); + } + # sparse features + elsif(/^(.+_.+) ([\-\.\de]+)/) { + $$sparse_weights{$1} = $2; + } + } + $devbleu = "unknown"; + foreach (@WEIGHT) { $_ /= $sum; } + foreach (keys %{$sparse_weights}) { $$sparse_weights{$_} /= $sum; } + $bestpoint = join(" ",@WEIGHT); + close IN; + } + else { + open(IN,$logfile) or die "Can't open $logfile"; + while () { + if (/Best point:\s*([\s\d\.\-e]+?)\s*=> ([\-\d\.]+)/) { + $bestpoint = $1; + $devbleu = $2; + last; + } + } + close IN; + } + return ($bestpoint,$devbleu); +} + + +sub insert_ranges_to_featlist { + my $featlist = shift; + my $ranges = shift; + + $ranges = [] if !defined $ranges; + + # first collect the ranges from options + my $niceranges; + foreach my $range (@$ranges) { + my $name = undef; + foreach my $namedpair (split /,/, $range) { + if ($namedpair =~ /^(.*?):/) { + $name = $1; + $namedpair =~ s/^.*?://; + die "Unrecognized name '$name' in --range=$range" + if !defined $ABBR2FULL{$name}; + } + my ($min, $max) = split /\.\./, $namedpair; + die "Bad min '$min' in --range=$range" if $min !~ /^-?[0-9.]+$/; + die "Bad max '$max' in --range=$range" if $min !~ /^-?[0-9.]+$/; + die "No name given in --range=$range" if !defined $name; + push @{$niceranges->{$name}}, [$min, $max]; + } + } + + # now populate featlist + my $seen = undef; + for(my $i=0; $i{"names"}}); $i++) { + my $name = $featlist->{"names"}->[$i]; + $seen->{$name} ++; + my $min = 0.0; + my $max = 1.0; + if (defined $niceranges->{$name}) { + my $minmax = shift @{$niceranges->{$name}}; + ($min, $max) = @$minmax if defined $minmax; + } + $featlist->{"mins"}->[$i] = $min; + $featlist->{"maxs"}->[$i] = $max; + } + return $featlist; + } + +sub sanity_check_order_of_lambdas { + my $featlist = shift; + my $filename_or_stream = shift; + + my @expected_lambdas = @{$featlist->{"names"}}; + my @got = get_order_of_scores_from_nbestlist($filename_or_stream); + die "Mismatched lambdas. Decoder returned @got, we expected @expected_lambdas" + if "@got" ne "@expected_lambdas"; +} + +sub get_featlist_from_moses { + # run moses with the given config file and return the list of features and + # their initial values + + my $configfn = shift; + my $featlistfn = "./features.list.run${run}_end"; + if (-e $featlistfn) { + print STDERR "Deleting featlistfn: $featlistfn\n"; + } + + print STDERR "Asking moses for feature names and values from $___CONFIG\n"; + my $cmd = "$___DECODER $___DECODER_FLAGS -config $configfn -inputtype $___INPUTTYPE -show-weights > $featlistfn"; + safesystem($cmd) or die "Failed to run moses with the config $configfn"; + + + + + # read feature list + my @names = (); + my @startvalues = (); + open(INI,$featlistfn) or die "Can't read $featlistfn"; + my $nr = 0; + my @errs = (); + while () { + $nr++; + chomp; + /^(.+) (\S+) (\S+)$/ || die("invalid feature: $_"); + my ($longname, $feature, $value) = ($1,$2,$3); + next if $value eq "sparse"; + push @errs, "$featlistfn:$nr:Bad initial value of $feature: $value\n" + if $value !~ /^[+-]?[0-9.e]+$/; + push @errs, "$featlistfn:$nr:Unknown feature '$feature', please add it to \@ABBR_FULL_MAP\n" + if !defined $ABBR2FULL{$feature}; + push @names, $feature; + push @startvalues, $value; + } + close INI; + if (scalar @errs) { + print STDERR join("", @errs); + exit 1; + } + return {"names"=>\@names, "values"=>\@startvalues}; +} + +sub get_order_of_scores_from_nbestlist { + # read the first line and interpret the ||| label: num num num label2: num ||| column in nbestlist + # return the score labels in order + my $fname_or_source = shift; + # print STDERR "Peeking at the beginning of nbestlist to get order of scores: $fname_or_source\n"; + open IN, $fname_or_source or die "Failed to get order of scores from nbestlist '$fname_or_source'"; + my $line = ; + close IN; + die "Line empty in nbestlist '$fname_or_source'" if !defined $line; + my ($sent, $hypo, $scores, $total) = split /\|\|\|/, $line; + $scores =~ s/^\s*|\s*$//g; + die "No scores in line: $line" if $scores eq ""; + + my @order = (); + my $label = undef; + my $sparse = 0; # we ignore sparse features here + foreach my $tok (split /\s+/, $scores) { + if ($tok =~ /.+_.+:/) { + $sparse = 1; + } elsif ($tok =~ /^([a-z][0-9a-z]*):/i) { + $label = $1; + } elsif ($tok =~ /^-?[-0-9.e]+$/) { + if (!$sparse) { + # a score found, remember it + die "Found a score but no label before it! Bad nbestlist '$fname_or_source'!" + if !defined $label; + push @order, $label; + } + $sparse = 0; + } else { + die "Not a label, not a score '$tok'. Failed to parse the scores string: '$scores' of nbestlist '$fname_or_source'"; + } + } + print STDERR "The decoder returns the scores in this order: @order\n"; + return @order; +} + + +sub safesystem { + print STDERR "Executing: @_\n"; + system(@_); + if ($? == -1) { + print STDERR "Failed to execute: @_\n $!\n"; + exit(1); + } + elsif ($? & 127) { + printf STDERR "Execution of: @_\n died with signal %d, %s coredump\n", + ($? & 127), ($? & 128) ? 'with' : 'without'; + exit(1); + } + else { + my $exitcode = $? >> 8; + print STDERR "Exit code: $exitcode\n" if $exitcode; + return ! $exitcode; + } +} +sub ensure_full_path { + my $PATH = shift; +$PATH =~ s/\/nfsmnt//; + return $PATH if $PATH =~ /^\//; + my $dir = `pawd 2>/dev/null`; + if(!$dir){$dir = `pwd`;} + chomp($dir); + $PATH = $dir."/".$PATH; + $PATH =~ s/[\r\n]//g; + $PATH =~ s/\/\.\//\//g; + $PATH =~ s/\/+/\//g; + my $sanity = 0; + while($PATH =~ /\/\.\.\// && $sanity++<10) { + $PATH =~ s/\/+/\//g; + $PATH =~ s/\/[^\/]+\/\.\.\//\//g; + } + $PATH =~ s/\/[^\/]+\/\.\.$//; + $PATH =~ s/\/+$//; +$PATH =~ s/\/nfsmnt//; + return $PATH; +} + +sub submit_or_exec { + + my $argvlen = @_; + my $cmd = undef; + my $stdout = undef; + my $stderr = undef; + my $jidfile = undef; + my $prevjid = undef; + + # if supply 3 arguments, exec without submit + # if supply 4 arguments, then submit new job + # if supply 5 arguments, wait for the previous job to finish + if ($argvlen == 3){ + ($cmd,$stdout,$stderr) = @_; + } elsif ($argvlen == 4){ + ($cmd,$stdout,$stderr,$jidfile) = @_; + } elsif ($argvlen == 5){ + ($cmd,$stdout,$stderr,$jidfile,$prevjid) = @_; + } + + print STDERR "exec: $cmd\n"; + if (defined $___JOBS && $___JOBS > 0 && $argvlen==5) { + safesystem("$qsubwrapper $pass_old_sge -command='$cmd' -queue-parameters=\"$queue_flags\" -stdout=$stdout -stderr=$stderr -jidfile=$jidfile -prevjid=$prevjid" ) + or die "ERROR: Failed to submit '$cmd' (via $qsubwrapper)"; + } + elsif (defined $___JOBS && $___JOBS > 0 && $argvlen==4) { + safesystem("$qsubwrapper $pass_old_sge -command='$cmd' -queue-parameters=\"$queue_flags\" -stdout=$stdout -stderr=$stderr -jidfile=$jidfile" ) + or die "ERROR: Failed to submit '$cmd' (via $qsubwrapper)"; + } else { + safesystem("$cmd > $stdout 2> $stderr") or die "ERROR: Failed to run '$cmd'."; + } +} + +sub exit_submit { + + my $argvlen = @_; + my $cmd = undef; + my $stdout = undef; + my $stderr = undef; + my $jidfile = undef; + my $pidfile = undef; + my $prevjid = undef; + my $prevjidarraysize = 0; + my @prevjidarray = (); + my $pid = undef; + my $qsubcmd=""; + my $hj=""; + + # if supply 4 arguments, then submit new job + # if supply 5 arguments, wait for the previous job to finish + if ($argvlen == 2) { + ($stdout,$stderr) = @_; + } elsif ($argvlen == 4){ + ($stdout,$stderr,$jidfile,$pidfile) = @_; + } elsif ($argvlen == 5){ + ($stdout,$stderr,$jidfile,$pidfile,$prevjid) = @_; + } + + # parse prevjid ######################## + $prevjid =~ s/^\s+|\s+$//g; + @prevjidarray = split(/\s+/,$prevjid); + $prevjidarraysize = scalar(@prevjidarray); + ######################################## + + + # print STDERR "exec: $stdout\n"; + + # read pid from file, and draft exit script ################## + chomp ($pid=`tail -n 1 $pidfile`); + open (OUT, ">exitjob$pid.sh"); + + my $scriptheader="\#\!/bin/bash\n\#\$ -S /bin/sh\n# Both lines are needed to invoke base\n#the above line is ignored by qsub, unless parameter \"-b yes\" is set!\n\n"; + $scriptheader .="uname -a\n\n"; + $scriptheader .="cd $___WORKING_DIR\n\n"; + + print OUT $scriptheader; + + print OUT "if $qsubwrapper_exit -submithost=$submithost -stdout=$stdout -stderr=$stderr -jidfile=$jidfile -pidfile=$pidfile > exitjob$pid.out 2> exitjob$pid.err ; then + echo 'succeeded' +else + echo failed with exit status \$\? + die=1 +fi +"; + print OUT "\n\n"; + + close (OUT); + # setting permissions of the script + chmod(oct(755),"exitjob$pid.sh"); + ############################################################## + + + if (defined $___JOBS && $___JOBS > 0 && $argvlen==5) { + if (defined $prevjid && $prevjid!=-1 && $prevjidarraysize == 1){ + $hj = "-hold_jid $prevjid"; + } elsif (defined $prevjid && $prevjidarraysize > 1){ + $hj = "-hold_jid " . join(" -hold_jid ", @prevjidarray); + } + $qsubcmd="qsub $queue_flags -V $hj exitjob$pid.sh > exitjob$pid.log 2>&1"; + safesystem($qsubcmd) or die "ERROR: Failed to exit-submit $pid (via $qsubwrapper_exit)"; + } elsif (defined $___JOBS && $___JOBS > 0 && $argvlen==4) { + $qsubcmd="qsub $queue_flags -V exitjob$pid.sh > exitjob$pid.log 2>&1"; + safesystem($qsubcmd) or die "ERROR: Failed to exit-submit $pid (via $qsubwrapper_exit)"; + } else { + safesystem("rm $stdout") or die "ERROR: Failed to remove '$stdout'."; + safesystem("rm $stderr") or die "ERROR: Failed to remove '$stderr'."; + } +} + + + + + + + +sub create_extractor_script() +{ + my ($cmd, $outdir) = @_; + my $script_path = File::Spec->catfile($outdir, "extractor.sh"); + + open my $out, '>', $script_path + or die "Couldn't open $script_path for writing: $!\n"; + print $out "#!/bin/bash\n"; + print $out "cd $outdir\n"; + print $out "$cmd\n"; + close($out); + + `chmod +x $script_path`; + + return $script_path; +} + + +sub create_config { + my $infn = shift; # source config + my $outfn = shift; # where to save the config + my $featlist = shift; # the lambdas we should write + my $iteration = shift; # just for verbosity + my $bleu_achieved = shift; # just for verbosity + my $sparse_weights_file = shift; # only defined when optimizing sparse features + + my %P; # the hash of all parameters we wish to override + + # first convert the command line parameters to the hash + { # ensure local scope of vars + my $parameter=undef; + print "Parsing --decoder-flags: |$___DECODER_FLAGS|\n"; + $___DECODER_FLAGS =~ s/^\s*|\s*$//; + $___DECODER_FLAGS =~ s/\s+/ /; + foreach (split(/ /,$___DECODER_FLAGS)) { + if (/^\-([^\d].*)$/) { + $parameter = $1; + $parameter = $ABBR2FULL{$parameter} if defined($ABBR2FULL{$parameter}); + } + else { + die "Found value with no -paramname before it: $_" + if !defined $parameter; + push @{$P{$parameter}},$_; + } + } + } + + # First delete all weights params from the input, we're overwriting them. + # Delete both short and long-named version. + for(my $i=0; $i{"names"}}); $i++) { + my $name = $featlist->{"names"}->[$i]; + delete($P{$name}); + delete($P{$ABBR2FULL{$name}}); + } + + # Convert weights to elements in P + for(my $i=0; $i{"names"}}); $i++) { + my $name = $featlist->{"names"}->[$i]; + my $val = $featlist->{"values"}->[$i]; + $name = defined $ABBR2FULL{$name} ? $ABBR2FULL{$name} : $name; + # ensure long name + push @{$P{$name}}, $val; + } + + if (defined($sparse_weights_file)) { + push @{$P{"weights-file"}}, $___WORKING_DIR."/".$sparse_weights_file; + } + + # create new moses.ini decoder config file by cloning and overriding the original one + open(INI,$infn) or die "Can't read $infn"; + delete($P{"config"}); # never output + print "Saving new config to: $outfn\n"; + open(OUT,"> $outfn") or die "Can't write $outfn"; + print OUT "# MERT optimized configuration\n"; + print OUT "# decoder $___DECODER\n"; + print OUT "# BLEU $bleu_achieved on dev $___DEV_F\n"; + print OUT "# We were before running iteration $iteration\n"; + print OUT "# finished ".`date`; + my $line = ; + while(1) { + last unless $line; + + # skip until hit [parameter] + if ($line !~ /^\[(.+)\]\s*$/) { + $line = ; + print OUT $line if $line =~ /^\#/ || $line =~ /^\s+$/; + next; + } + + # parameter name + my $parameter = $1; + $parameter = $ABBR2FULL{$parameter} if defined($ABBR2FULL{$parameter}); + print OUT "[$parameter]\n"; + + # change parameter, if new values + if (defined($P{$parameter})) { + # write new values + foreach (@{$P{$parameter}}) { + print OUT $_."\n"; + } + delete($P{$parameter}); + # skip until new parameter, only write comments + while($line = ) { + print OUT $line if $line =~ /^\#/ || $line =~ /^\s+$/; + last if $line =~ /^\[/; + last unless $line; + } + next; + } + # unchanged parameter, write old + while($line = ) { + last if $line =~ /^\[/; + print OUT $line; + } + } + + # write all additional parameters + foreach my $parameter (keys %P) { + print OUT "\n[$parameter]\n"; + foreach (@{$P{$parameter}}) { + print OUT $_."\n"; + } + } + + close(INI); + close(OUT); + print STDERR "Saved: $outfn\n"; +} + + + + +sub force_exit_submit_thu_host { + + my $argvlen = @_; + my $submithost = undef; + my $run = -1; + my $idx = ""; + my $batch_and_join = ""; + my $my_username = undef; + my $cmd = undef; + my $stdout = undef; + my $stderr = undef; + my $jidfile = undef; + my $pidfile = undef; + my $prevjid = undef; + my $prevjidarraysize = 0; + my @prevjidarray = (); + my $pid = undef; + my $qsubcmd=""; + my $hj=""; + + # if supply 8 arguments, then submit new job + # if supply 9 arguments, wait for the previous job to finish + ($submithost,$pidfile) = @_; + + #if ($argvlen == 6){ + # ($submithost,$run,$idx,$batch_and_join,$stdout,$stderr) = @_; + #} elsif ($argvlen == 8){ + # ($submithost,$run,$idx,$batch_and_join,$stdout,$stderr,$jidfile,$pidfile) = @_; + #} elsif ($argvlen == 9){ + # ($submithost,$run,$idx,$batch_and_join,$stdout,$stderr,$jidfile,$pidfile,$prevjid) = @_; + #} + + # parse prevjid ######################## + #$prevjid =~ s/^\s+|\s+$//g; + #@prevjidarray = split(/\s+/,$prevjid); + $prevjidarraysize = scalar(@prevjidarray); + ######################################## + + # print STDERR "exec: $stdout\n"; + + # read pid from file, and draft exit script ################## + chomp ($pid=`tail -n 1 $pidfile`); + open (OUT, ">forceexitjob$pid.sh"); + + my $scriptheader="\#\!/bin/bash\n\#\$ -S /bin/sh\n# Both lines are needed to invoke base\n#the above line is ignored by qsub, unless parameter \"-b yes\" is set!\n\n"; + $scriptheader .="uname -a\n\n"; + $scriptheader .="cd $___WORKING_DIR\n\n"; + + print OUT $scriptheader; + + print OUT "if $qsubwrapper_exit -submithost=$submithost -force-delete=1 -pidfile=$pidfile > forceexitjob$pid.out 2> forceexitjob$pid.err ; then + echo 'succeeded' +else + echo failed with exit status \$\? + die=1 +fi +"; + print OUT "\n\n"; + + close (OUT); + # setting permissions of the script + chmod(oct(755),"forceexitjob$pid.sh"); + ############################################################## + # + # log in submit host ######################################### + # chomp(my $my_username = `whoami`); + # my $ssh = Net::OpenSSH::Compat::Perl->new($submithost, debug=>0); + + # $ssh->login("$my_username",`cat /home/$my_username/accpw`); + ############################################################## + + + # $qsubcmd="qsub $queue_flags -sync y -o /dev/null -e /dev/null forceexitjob$pid.sh > forceexitjob$pid.log 2>&1"; + # $ssh->cmd("cd $___WORKING_DIR && $qsubcmd"); + safesystem("./forceexitjob$pid.sh"); + + print STDERR "Executing $qsubcmd in $___WORKING_DIR\n"; + +} + + + + diff --git a/contrib/mert-sge-nosync/training/sge-nosync/run-decoder-sge-nosync.pl b/contrib/mert-sge-nosync/training/sge-nosync/run-decoder-sge-nosync.pl new file mode 100755 index 0000000000..ab0c698af0 --- /dev/null +++ b/contrib/mert-sge-nosync/training/sge-nosync/run-decoder-sge-nosync.pl @@ -0,0 +1,271 @@ +#!/usr/bin/perl -w + +# $Id$ +# after filter-mode-given-input.pl, process the feature list + +# original code by Philipp Koehn +# changes by Ondrej Bojar +# adapted for hierarchical models by Phil Williams + +use strict; + +use FindBin qw($Bin); +use Getopt::Long; + + + +my $SCRIPTS_ROOTDIR; +if (defined($ENV{"SCRIPTS_ROOTDIR"})) { + $SCRIPTS_ROOTDIR = $ENV{"SCRIPTS_ROOTDIR"}; +} else { + $SCRIPTS_ROOTDIR = $Bin; + if ($SCRIPTS_ROOTDIR eq '') { + $SCRIPTS_ROOTDIR = dirname(__FILE__); + } + $SCRIPTS_ROOTDIR =~ s/\/training$//; + $ENV{"SCRIPTS_ROOTDIR"} = $SCRIPTS_ROOTDIR; +} + + +##!# # moses.ini file uses FULL names for lambdas, while this training script +##!# # internally (and on the command line) uses ABBR names. +##!# my @ABBR_FULL_MAP = qw(d=weight-d lm=weight-l tm=weight-t w=weight-w +##!# g=weight-generation lex=weight-lex I=weight-i); +##!# my %ABBR2FULL = map {split/=/,$_,2} @ABBR_FULL_MAP; +##!# my %FULL2ABBR = map {my ($a, $b) = split/=/,$_,2; ($b, $a);} @ABBR_FULL_MAP; + + +my $verbose = 0; +my $usage = 0; # request for --help + + + + +##!# # consider phrases in input up to $MAX_LENGTH +##!# # in other words, all phrase-tables will be truncated at least to 10 words per +##!# # phrase. +##!# my $MAX_LENGTH = 10; + +# utilities +##!# my $ZCAT = "gzip -cd"; + +# get optional parameters +##!# my $opt_hierarchical = 0; +##!# my $binarizer = undef; +##!# my $opt_min_non_initial_rule_count = undef; +##!# my $opt_gzip = 1; # gzip output files (so far only phrase-based ttable until someone tests remaining models and formats) + +my $___RANGES = undef; +my $___ACTIVATE_FEATURES = undef; # comma-separated (or blank-separated) list of features to work on + # if undef work on all features + # (others are fixed to the starting values) +my $___DECODER_FLAGS = ""; # additional parametrs to pass to the decoder + +# set 0 if input type is text, set 1 if input type is confusion network +my $___INPUTTYPE = 0; + +my $___DECODER = undef; # required, pathname to the decoder executable +my $___CONFIG = undef; # required, pathname to startup ini file + + +GetOptions( +##!# "activate-features=s" => \$___ACTIVATE_FEATURES, #comma-separated (or blank-separated) list of features to work on (others are fixed to the starting values) +##!# "range=s@" => \$___RANGES, +##!# "decoder-flags=s" => \$___DECODER_FLAGS, +##!# "inputtype=i" => \$___INPUTTYPE + "" +) or exit(1); + + + +# the ?? required parameters can be supplied on the command line directly +# or using the --options +if (scalar @ARGV == 2) { + # required parameters: options + $___DECODER = shift; + $___CONFIG = shift; +} + +if ($usage || !defined $___DECODER || !defined $___CONFIG) { + print STDERR "usage: $0 \$___DECODER \$___CONFIG(decoder.ini) +Options: + --activate-features=STRING ... comma-separated list of features to optimize, + others are fixed to the starting values + default: optimize all features + example: tm_0,tm_4,d_0 + --range=tm:0..1,-1..1 ... specify min and max value for some features + --range can be repeated as needed. + The order of the various --range specifications + is important only within a feature name. + E.g.: + --range=tm:0..1,-1..1 --range=tm:0..2 + is identical to: + --range=tm:0..1,-1..1,0..2 + but not to: + --range=tm:0..2 --range=tm:0..1,-1..1 + --decoder-flags=STRING ... extra parameters for the decoder + --inputtype=[0|1|2] ... Handle different input types: (0 for text, + 1 for confusion network, 2 for lattices, + default is 0) +"; + exit 1; +} + + + + +############################################################ +############################################################ +############################################################ + +# main + +# we run moses to check validity of moses.ini and to obtain all the feature +# names +my $featlist = get_featlist_from_moses($___CONFIG); +$featlist = insert_ranges_to_featlist($featlist, $___RANGES); + + +# Mark which features are disabled: +if (defined $___ACTIVATE_FEATURES) { + my %enabled = map { ($_, 1) } split /[, ]+/, $___ACTIVATE_FEATURES; + my %cnt; + for(my $i=0; $i{"names"}}); $i++) { + my $name = $featlist->{"names"}->[$i]; + $cnt{$name} = 0 if !defined $cnt{$name}; + $featlist->{"enabled"}->[$i] = $enabled{$name."_".$cnt{$name}}; + $cnt{$name}++; + } +} else { + # all enabled + for(my $i=0; $i{"names"}}); $i++) { + $featlist->{"enabled"}->[$i] = 1; + } +} + +print STDERR "MERT starting values and ranges for random generation:\n"; +for(my $i=0; $i{"names"}}); $i++) { + my $name = $featlist->{"names"}->[$i]; + my $val = $featlist->{"values"}->[$i]; + my $min = $featlist->{"mins"}->[$i]; + my $max = $featlist->{"maxs"}->[$i]; + my $enabled = $featlist->{"enabled"}->[$i]; + printf STDERR " %5s = %7.3f", $name, $val; + if ($enabled) { + printf STDERR " (%5.2f .. %5.2f)\n", $min, $max; + } else { + print STDERR " --- inactive, not optimized ---\n"; + } +} + + + + + +sub get_featlist_from_moses { + # run moses with the given config file and return the list of features and + # their initial values + my $configfn = shift; + my $featlistfn = "./features.list"; + if (-e $featlistfn) { + print STDERR "Using cached features list: $featlistfn\n"; + } else { + print STDERR "Asking moses for feature names and values from $___CONFIG\n"; + my $cmd = "$___DECODER $___DECODER_FLAGS -config $configfn -inputtype $___INPUTTYPE -show-weights > $featlistfn"; + print STDERR "$cmd\n"; #DEBUG + safesystem($cmd) or die "Failed to run moses with the config $configfn"; + } + + # read feature list + my @names = (); + my @startvalues = (); + open(INI,$featlistfn) or die "Can't read $featlistfn"; + my $nr = 0; + my @errs = (); + while () { + $nr++; + chomp; + /^(.+) (\S+) (\S+)$/ || die("invalid feature: $_"); + my ($longname, $feature, $value) = ($1,$2,$3); + next if $value eq "sparse"; + push @errs, "$featlistfn:$nr:Bad initial value of $feature: $value\n" + if $value !~ /^[+-]?[0-9.e]+$/; + push @errs, "$featlistfn:$nr:Unknown feature '$feature', please add it to \@ABBR_FULL_MAP\n" + if !defined $ABBR2FULL{$feature}; + push @names, $feature; + push @startvalues, $value; + } + close INI; + if (scalar @errs) { + print STDERR join("", @errs); + exit 1; + } + return {"names"=>\@names, "values"=>\@startvalues}; +} + + +sub insert_ranges_to_featlist { + my $featlist = shift; + my $ranges = shift; + + $ranges = [] if !defined $ranges; + + # first collect the ranges from options + my $niceranges; + foreach my $range (@$ranges) { + my $name = undef; + foreach my $namedpair (split /,/, $range) { + if ($namedpair =~ /^(.*?):/) { + $name = $1; + $namedpair =~ s/^.*?://; + die "Unrecognized name '$name' in --range=$range" + if !defined $ABBR2FULL{$name}; + } + my ($min, $max) = split /\.\./, $namedpair; + die "Bad min '$min' in --range=$range" if $min !~ /^-?[0-9.]+$/; + die "Bad max '$max' in --range=$range" if $min !~ /^-?[0-9.]+$/; + die "No name given in --range=$range" if !defined $name; + push @{$niceranges->{$name}}, [$min, $max]; + } + } + + # now populate featlist + my $seen = undef; + for(my $i=0; $i{"names"}}); $i++) { + my $name = $featlist->{"names"}->[$i]; + $seen->{$name} ++; + my $min = 0.0; + my $max = 1.0; + if (defined $niceranges->{$name}) { + my $minmax = shift @{$niceranges->{$name}}; + ($min, $max) = @$minmax if defined $minmax; + } + $featlist->{"mins"}->[$i] = $min; + $featlist->{"maxs"}->[$i] = $max; + } + return $featlist; +} + +sub safesystem { + print STDERR "Executing: @_\n"; + system(@_); + if ($? == -1) { + print STDERR "Failed to execute: @_\n $!\n"; + exit(1); + } + elsif ($? & 127) { + printf STDERR "Execution of: @_\n died with signal %d, %s coredump\n", + ($? & 127), ($? & 128) ? 'with' : 'without'; + exit(1); + } + else { + my $exitcode = $? >> 8; + print STDERR "Exit code: $exitcode\n" if $exitcode; + return ! $exitcode; + } +} + + + + + diff --git a/contrib/mert-sge-nosync/training/sge-nosync/zipextract-decoder-result.pl b/contrib/mert-sge-nosync/training/sge-nosync/zipextract-decoder-result.pl new file mode 100755 index 0000000000..defc4fda78 --- /dev/null +++ b/contrib/mert-sge-nosync/training/sge-nosync/zipextract-decoder-result.pl @@ -0,0 +1,832 @@ +#!/usr/bin/perl -w +# $Id$ +# Usage: +# mert-moses.pl +# For other options see below or run 'mert-moses.pl --help' + +# Notes: +# and should be raw text files, one sentence per line +# can be a prefix, in which case the files are 0, 1, etc. are used + +# Excerpts from revision history + +# Sept 2011 multi-threaded mert (Barry Haddow) +# 3 Aug 2011 Added random directions, historic best, pairwise ranked (PK) +# Jul 2011 simplifications (Ondrej Bojar) +# -- rely on moses' -show-weights instead of parsing moses.ini +# ... so moses is also run once *before* mert starts, checking +# the model to some extent +# -- got rid of the 'triples' mess; +# use --range to supply bounds for random starting values: +# --range tm:-3..3 --range lm:-3..3 +# 5 Aug 2009 Handling with different reference length policies (shortest, average, closest) for BLEU +# and case-sensistive/insensitive evaluation (Nicola Bertoldi) +# 5 Jun 2008 Forked previous version to support new mert implementation. +# 13 Feb 2007 Better handling of default values for lambda, now works with multiple +# models and lexicalized reordering +# 11 Oct 2006 Handle different input types through parameter --inputype=[0|1] +# (0 for text, 1 for confusion network, default is 0) (Nicola Bertoldi) +# 10 Oct 2006 Allow skip of filtering of phrase tables (--no-filter-phrase-table) +# useful if binary phrase tables are used (Nicola Bertoldi) +# 28 Aug 2006 Use either closest or average or shortest (default) reference +# length as effective reference length +# Use either normalization or not (default) of texts (Nicola Bertoldi) +# 31 Jul 2006 move gzip run*.out to avoid failure wit restartings +# adding default paths +# 29 Jul 2006 run-filter, score-nbest and mert run on the queue (Nicola; Ondrej had to type it in again) +# 28 Jul 2006 attempt at foolproof usage, strong checking of input validity, merged the parallel and nonparallel version (Ondrej Bojar) +# 27 Jul 2006 adding the safesystem() function to handle with process failure +# 22 Jul 2006 fixed a bug about handling relative path of configuration file (Nicola Bertoldi) +# 21 Jul 2006 adapted for Moses-in-parallel (Nicola Bertoldi) +# 18 Jul 2006 adapted for Moses and cleaned up (PK) +# 21 Jan 2005 unified various versions, thorough cleanup (DWC) +# now indexing accumulated n-best list solely by feature vectors +# 14 Dec 2004 reimplemented find_threshold_points in C (NMD) +# 25 Oct 2004 Use either average or shortest (default) reference +# length as effective reference length (DWC) +# 13 Oct 2004 Use alternative decoders (DWC) +# Original version by Philipp Koehn + +use strict; +use FindBin qw($Bin); +use File::Basename; +use File::Path; +use File::Spec; +use Cwd; + +my $SCRIPTS_ROOTDIR = $Bin; +$SCRIPTS_ROOTDIR =~ s/\/training$//; +$SCRIPTS_ROOTDIR = $ENV{"SCRIPTS_ROOTDIR"} if defined($ENV{"SCRIPTS_ROOTDIR"}); + +## We preserve this bit of comments to keep the traditional weight ranges. +# "w" => [ [ 0.0, -1.0, 1.0 ] ], # word penalty +# "d" => [ [ 1.0, 0.0, 2.0 ] ], # lexicalized reordering model +# "lm" => [ [ 1.0, 0.0, 2.0 ] ], # language model +# "g" => [ [ 1.0, 0.0, 2.0 ], # generation model +# [ 1.0, 0.0, 2.0 ] ], +# "tm" => [ [ 0.3, 0.0, 0.5 ], # translation model +# [ 0.2, 0.0, 0.5 ], +# [ 0.3, 0.0, 0.5 ], +# [ 0.2, 0.0, 0.5 ], +# [ 0.0,-1.0, 1.0 ] ], # ... last weight is phrase penalty +# "lex"=> [ [ 0.1, 0.0, 0.2 ] ], # global lexical model +# "I" => [ [ 0.0,-1.0, 1.0 ] ], # input lattice scores + + + +# moses.ini file uses FULL names for lambdas, while this training script +# internally (and on the command line) uses ABBR names. +my @ABBR_FULL_MAP = qw(d=weight-d lm=weight-l tm=weight-t w=weight-w + g=weight-generation lex=weight-lex I=weight-i); +my %ABBR2FULL = map {split/=/,$_,2} @ABBR_FULL_MAP; +my %FULL2ABBR = map {my ($a, $b) = split/=/,$_,2; ($b, $a);} @ABBR_FULL_MAP; + +my $minimum_required_change_in_weights = 0.00001; + # stop if no lambda changes more than this + +my $verbose = 0; +my $usage = 0; # request for --help + +# We assume that if you don't specify working directory, +# we set the default is set to `pwd`/mert-work +#@@# my $___WORKING_DIR = File::Spec->catfile(Cwd::getcwd(), "mert-work"); +my $___WORKING_DIR = undef; +my $___DEV_F = undef; # required, input text to decode +my $___DEV_E = undef; # required, basename of files with references +my $___DECODER = undef; # required, pathname to the decoder executable +my $___CONFIG = undef; # required, pathname to startup ini file +my $___N_BEST_LIST_SIZE = 100; +my $___LATTICE_SAMPLES = 0; +my $submithost = ""; +my $queue_flags = "-hard"; # extra parameters for parallelizer + # the -l ws0ssmt was relevant only to JHU 2006 workshop +my $___JOBS = undef; # if parallel, number of jobs to use (undef or 0 -> serial) +my $___DECODER_FLAGS = ""; # additional parametrs to pass to the decoder +my $continue = 0; # should we try to continue from the last saved step? +my $skip_decoder = 0; # and should we skip the first decoder run (assuming we got interrupted during mert) +my $___FILTER_PHRASE_TABLE = 1; # filter phrase table +my $___PREDICTABLE_SEEDS = 0; +my $___START_WITH_HISTORIC_BESTS = 0; # use best settings from all previous iterations as starting points [Foster&Kuhn,2009] +my $___RANDOM_DIRECTIONS = 0; # search in random directions only +my $___NUM_RANDOM_DIRECTIONS = 0; # number of random directions, also works with default optimizer [Cer&al.,2008] +my $___PAIRWISE_RANKED_OPTIMIZER = 0; # use Hopkins&May[2011] +my $___PRO_STARTING_POINT = 0; # get a starting point from pairwise ranked optimizer +my $___RANDOM_RESTARTS = 20; +my $___HISTORIC_INTERPOLATION = 0; # interpolate optimize weights with previous iteration's weights [Hopkins&May,2011,5.4.3] +my $__THREADS = 0; +my $run = 0; + +# Parameter for effective reference length when computing BLEU score +# Default is to use shortest reference +# Use "--shortest" to use shortest reference length +# Use "--average" to use average reference length +# Use "--closest" to use closest reference length +# Only one between --shortest, --average and --closest can be set +# If more than one choice the defualt (--shortest) is used +my $___SHORTEST = 0; +my $___AVERAGE = 0; +my $___CLOSEST = 0; + +# Use "--nocase" to compute case-insensitive scores +my $___NOCASE = 0; + +# Use "--nonorm" to non normalize translation before computing scores +my $___NONORM = 0; + +# set 0 if input type is text, set 1 if input type is confusion network +my $___INPUTTYPE = 0; + + +my $mertdir = undef; # path to new mert directory +my $mertargs = undef; # args to pass through to mert & extractor +my $mertmertargs = undef; # args to pass through to mert only +my $extractorargs = undef; # args to pass through to extractor only +my $filtercmd = undef; # path to filter-model-given-input.pl +my $filterfile = undef; +my $qsubwrapper = undef; +my $qsubwrapper_exit = undef; +my $moses_parallel_cmd = undef; +my $old_sge = 0; # assume sge<6.0 +my $___CONFIG_ORIG = undef; # pathname to startup ini file before filtering +my $___ACTIVATE_FEATURES = undef; # comma-separated (or blank-separated) list of features to work on + # if undef work on all features + # (others are fixed to the starting values) +my $___RANGES = undef; +my $prev_aggregate_nbl_size = -1; # number of previous step to consider when loading data (default =-1) + # -1 means all previous, i.e. from iteration 1 + # 0 means no previous data, i.e. from actual iteration + # 1 means 1 previous data , i.e. from the actual iteration and from the previous one + # and so on +my $maximum_iterations = 25; + +##################### +my $processfeatlistcmd = undef; +my $processfeatlistargs = undef; +my $createconfigcmd = undef; +my $createconfigargs = undef; +my $decoderargs = undef; +##################### + +use Getopt::Long; +GetOptions( + "working-dir=s" => \$___WORKING_DIR, + "input=s" => \$___DEV_F, + "inputtype=i" => \$___INPUTTYPE, + "refs=s" => \$___DEV_E, + "decoder=s" => \$___DECODER, + "config=s" => \$___CONFIG, + "nbest=i" => \$___N_BEST_LIST_SIZE, + "lattice-samples=i" => \$___LATTICE_SAMPLES, + "submithost=s" => \$submithost, + "queue-flags=s" => \$queue_flags, + "jobs=i" => \$___JOBS, + "decoder-flags=s" => \$___DECODER_FLAGS, + "continue" => \$continue, + "skip-decoder" => \$skip_decoder, + "shortest" => \$___SHORTEST, + "average" => \$___AVERAGE, + "closest" => \$___CLOSEST, + "nocase" => \$___NOCASE, + "nonorm" => \$___NONORM, + "help" => \$usage, + "verbose" => \$verbose, + "mertdir=s" => \$mertdir, + "mertargs=s" => \$mertargs, + "extractorargs=s" => \$extractorargs, + "mertmertargs=s" => \$mertmertargs, + "rootdir=s" => \$SCRIPTS_ROOTDIR, + "filtercmd=s" => \$filtercmd, # allow to override the default location + "filterfile=s" => \$filterfile, # input to filtering script (useful for lattices/confnets) + "qsubwrapper=s" => \$qsubwrapper, # allow to override the default location + "mosesparallelcmd=s" => \$moses_parallel_cmd, # allow to override the default location + "old-sge" => \$old_sge, #passed to moses-parallel + "filter-phrase-table!" => \$___FILTER_PHRASE_TABLE, # (dis)allow of phrase tables + "predictable-seeds" => \$___PREDICTABLE_SEEDS, # make random restarts deterministic + "historic-bests" => \$___START_WITH_HISTORIC_BESTS, # use best settings from all previous iterations as starting points + "random-directions" => \$___RANDOM_DIRECTIONS, # search only in random directions + "run=i" => \$run, + "number-of-random-directions=i" => \$___NUM_RANDOM_DIRECTIONS, # number of random directions + "random-restarts=i" => \$___RANDOM_RESTARTS, # number of random restarts + "activate-features=s" => \$___ACTIVATE_FEATURES, #comma-separated (or blank-separated) list of features to work on (others are fixed to the starting values) + "range=s@" => \$___RANGES, + "prev-aggregate-nbestlist=i" => \$prev_aggregate_nbl_size, #number of previous step to consider when loading data (default =-1, i.e. all previous) + "maximum-iterations=i" => \$maximum_iterations, + "pairwise-ranked" => \$___PAIRWISE_RANKED_OPTIMIZER, + "pro-starting-point" => \$___PRO_STARTING_POINT, + "historic-interpolation=f" => \$___HISTORIC_INTERPOLATION, + "threads=i" => \$__THREADS +) or exit(1); + +# the 4 required parameters can be supplied on the command line directly +# or using the --options +if (scalar @ARGV == 2) { + # required parameters: input_file references_basename decoder_executable +# $___DEV_F = shift; + $___DEV_E = shift; +# $___DECODER = shift; + $___CONFIG = shift; +} + +# if ($usage || !defined $___DEV_F || !defined $___DEV_E || !defined $___DECODER || !defined $___CONFIG) { +if ($usage || !defined $___CONFIG || !defined $___DEV_E ){ + print STDERR "usage: $0 reference decoder.ini +Options: + --working-dir=mert-dir ... where all the files are created + --nbest=100 ... how big nbestlist to generate + --lattice-samples ... how many lattice samples (Chatterjee & Cancedda, emnlp 2010) + --jobs=N ... set this to anything to run moses in parallel + --mosesparallelcmd=STR ... use a different script instead of moses-parallel + --queue-flags=STRING ... anything you with to pass to qsub, eg. + '-l ws06osssmt=true'. The default is: '-hard' + To reset the parameters, please use + --queue-flags=' ' + (i.e. a space between the quotes). + --decoder-flags=STRING ... extra parameters for the decoder + --continue ... continue from the last successful iteration + --skip-decoder ... skip the decoder run for the first time, + assuming that we got interrupted during + optimization + --shortest --average --closest + ... Use shortest/average/closest reference length + as effective reference length (mutually exclusive) + --nocase ... Do not preserve case information; i.e. + case-insensitive evaluation (default is false). + --nonorm ... Do not use text normalization (flag is not active, + i.e. text is NOT normalized) + --filtercmd=STRING ... path to filter-model-given-input.pl + --filterfile=STRING ... path to alternative to input-text for filtering + model. useful for lattice decoding + --rootdir=STRING ... where do helpers reside (if not given explicitly) + --mertdir=STRING ... path to new mert implementation + --mertargs=STRING ... extra args for both extractor and mert + --extractorargs=STRING ... extra args for extractor only + --mertmertargs=STRING ... extra args for mert only + --scorenbestcmd=STRING ... path to score-nbest.py + --old-sge ... passed to parallelizers, assume Grid Engine < 6.0 + --inputtype=[0|1|2] ... Handle different input types: (0 for text, + 1 for confusion network, 2 for lattices, + default is 0) + --no-filter-phrase-table ... disallow filtering of phrase tables + (useful if binary phrase tables are available) + --random-restarts=INT ... number of random restarts (default: 20) + --predictable-seeds ... provide predictable seeds to mert so that random + restarts are the same on every run + --range=tm:0..1,-1..1 ... specify min and max value for some features + --range can be repeated as needed. + The order of the various --range specifications + is important only within a feature name. + E.g.: + --range=tm:0..1,-1..1 --range=tm:0..2 + is identical to: + --range=tm:0..1,-1..1,0..2 + but not to: + --range=tm:0..2 --range=tm:0..1,-1..1 + --activate-features=STRING ... comma-separated list of features to optimize, + others are fixed to the starting values + default: optimize all features + example: tm_0,tm_4,d_0 + --prev-aggregate-nbestlist=INT ... number of previous step to consider when + loading data (default = $prev_aggregate_nbl_size) + -1 means all previous, i.e. from iteration 1 + 0 means no previous data, i.e. only the + current iteration + N means this and N previous iterations + + --maximum-iterations=ITERS ... Maximum number of iterations. Default: $maximum_iterations + --random-directions ... search only in random directions + --number-of-random-directions=int ... number of random directions + (also works with regular optimizer, default: 0) + --pairwise-ranked ... Use PRO for optimisation (Hopkins and May, emnlp 2011) + --pro-starting-point ... Use PRO to get a starting point for MERT + --threads=NUMBER ... Use multi-threaded mert (must be compiled in). + --historic-interpolation ... Interpolate optimized weights with prior iterations' weight + (parameter sets factor [0;1] given to current weights) +"; + exit 1; +} + + +# Check validity of input parameters and set defaults if needed + +print STDERR "Using SCRIPTS_ROOTDIR: $SCRIPTS_ROOTDIR\n"; + +# path of script for filtering phrase tables and running the decoder +$filtercmd="$SCRIPTS_ROOTDIR/training/filter-model-given-input.pl" if !defined $filtercmd; + +if ( ! -x $filtercmd && ! $___FILTER_PHRASE_TABLE) { + print STDERR "Filtering command not found: $filtercmd.\n"; + print STDERR "Use --filtercmd=PATH to specify a valid one or --no-filter-phrase-table\n"; + exit 1; +} + +# $qsubwrapper="$SCRIPTS_ROOTDIR/generic/qsub-wrapper.pl" if !defined $qsubwrapper; +$qsubwrapper = "$SCRIPTS_ROOTDIR/generic/qsub-wrapper-sge-nosync.pl" if !defined $qsubwrapper; + +$qsubwrapper_exit = "$SCRIPTS_ROOTDIR/generic/qsub-wrapper-exit-sge-nosync.pl" if !defined $qsubwrapper_exit; + +# $moses_parallel_cmd = "$SCRIPTS_ROOTDIR/generic/moses-parallel.pl" +# if !defined $moses_parallel_cmd; +$moses_parallel_cmd = "$SCRIPTS_ROOTDIR/generic/moses-parallel-sge-nosync.pl" + if !defined $moses_parallel_cmd; + +if (!defined $mertdir) { + $mertdir = "$SCRIPTS_ROOTDIR/../mert"; + print STDERR "Assuming --mertdir=$mertdir\n"; +} + +my $mert_extract_cmd = "$mertdir/extractor"; +my $mert_mert_cmd = "$mertdir/mert"; +my $mert_pro_cmd = "$mertdir/pro"; + +die "Not executable: $mert_extract_cmd" if ! -x $mert_extract_cmd; +die "Not executable: $mert_mert_cmd" if ! -x $mert_mert_cmd; +die "Not executable: $mert_pro_cmd" if ! -x $mert_pro_cmd; + +my $pro_optimizer = "$mertdir/megam_i686.opt"; # or set to your installation +if (($___PAIRWISE_RANKED_OPTIMIZER || $___PRO_STARTING_POINT) && ! -x $pro_optimizer) { + print "did not find $pro_optimizer, installing it in $mertdir\n"; + `cd $mertdir; wget http://www.cs.utah.edu/~hal/megam/megam_i686.opt.gz;`; + `gunzip $pro_optimizer.gz`; + `chmod +x $pro_optimizer`; + die("ERROR: Installation of megam_i686.opt failed! Install by hand from http://www.cs.utah.edu/~hal/megam/") unless -x $pro_optimizer; +} + +$mertargs = "" if !defined $mertargs; + +my $scconfig = undef; +if ($mertargs =~ /\-\-scconfig\s+(.+?)(\s|$)/){ + $scconfig=$1; + $scconfig =~ s/\,/ /g; + $mertargs =~ s/\-\-scconfig\s+(.+?)(\s|$)//; +} + +# handling reference lengh strategy +if (($___CLOSEST + $___AVERAGE + $___SHORTEST) > 1){ + die "You can specify just ONE reference length strategy (closest or shortest or average) not both\n"; +} + +if ($___SHORTEST){ + $scconfig .= " reflen:shortest"; +}elsif ($___AVERAGE){ + $scconfig .= " reflen:average"; +}elsif ($___CLOSEST){ + $scconfig .= " reflen:closest"; +} + +# handling case-insensitive flag +if ($___NOCASE) { + $scconfig .= " case:false"; +}else{ + $scconfig .= " case:true"; +} +$scconfig =~ s/^\s+//; +$scconfig =~ s/\s+$//; +$scconfig =~ s/\s+/,/g; + +$scconfig = "--scconfig $scconfig" if ($scconfig); + +my $mert_extract_args=$mertargs; +$mert_extract_args .=" $scconfig"; +$mert_extract_args .=" $extractorargs"; + +$mertmertargs = "" if !defined $mertmertargs; + +my $mert_mert_args="$mertargs $mertmertargs"; +$mert_mert_args =~ s/\-+(binary|b)\b//; +$mert_mert_args .=" $scconfig"; +if ($___ACTIVATE_FEATURES){ $mert_mert_args .=" -o \"$___ACTIVATE_FEATURES\""; } + +my ($just_cmd_filtercmd,$x) = split(/ /,$filtercmd); +die "Not executable: $just_cmd_filtercmd" if ! -x $just_cmd_filtercmd; +die "Not executable: $moses_parallel_cmd" if defined $___JOBS && ! -x $moses_parallel_cmd; +die "Not executable: $qsubwrapper" if defined $___JOBS && ! -x $qsubwrapper; +#@@# die "Not executable: $___DECODER" if ! -x $___DECODER; + +#@@# my $input_abs = ensure_full_path($___DEV_F); +#@@# die "File not found: $___DEV_F (interpreted as $input_abs)." +#@@# if ! -e $input_abs; +#@@# $___DEV_F = $input_abs; + +# Option to pass to qsubwrapper and moses-parallel +my $pass_old_sge = $old_sge ? "-old-sge" : ""; + +#@@# my $decoder_abs = ensure_full_path($___DECODER); +#@@# die "File not executable: $___DECODER (interpreted as $decoder_abs)." +#@@# if ! -x $decoder_abs; +#@@# $___DECODER = $decoder_abs; + +my $ref_abs = ensure_full_path($___DEV_E); +# check if English dev set (reference translations) exist and store a list of all references +my @references; +if (-e $ref_abs) { + push @references, $ref_abs; +} +else { + # if multiple file, get a full list of the files + my $part = 0; + if (! -e $ref_abs."0" && -e $ref_abs.".ref0") { + $ref_abs .= ".ref"; + } + while (-e $ref_abs.$part) { + push @references, $ref_abs.$part; + $part++; + } + die("Reference translations not found: $___DEV_E (interpreted as $ref_abs)") unless $part; +} + +my $config_abs = ensure_full_path($___CONFIG); +die "File not found: $___CONFIG (interpreted as $config_abs)." + if ! -e $config_abs; +$___CONFIG = $config_abs; + +# moses should use our config +if ($___DECODER_FLAGS =~ /(^|\s)-(config|f) / +|| $___DECODER_FLAGS =~ /(^|\s)-(ttable-file|t) / +|| $___DECODER_FLAGS =~ /(^|\s)-(distortion-file) / +|| $___DECODER_FLAGS =~ /(^|\s)-(generation-file) / +|| $___DECODER_FLAGS =~ /(^|\s)-(lmodel-file) / +|| $___DECODER_FLAGS =~ /(^|\s)-(global-lexical-file) / +) { + die "It is forbidden to supply any of -config, -ttable-file, -distortion-file, -generation-file or -lmodel-file in the --decoder-flags.\nPlease use only the --config option to give the config file that lists all the supplementary files."; +} + +# as weights are normalized in the next steps (by cmert) +# normalize initial LAMBDAs, too +my $need_to_normalize = 1; + +#store current directory and create the working directory (if needed) +my $cwd = `pawd 2>/dev/null`; +if(!$cwd){$cwd = `pwd`;} +chomp($cwd); + +$___WORKING_DIR = $cwd if (!defined $___WORKING_DIR); +chomp $___WORKING_DIR; + +print STDERR "working dir is $___WORKING_DIR\n"; +#@@# mkpath($___WORKING_DIR); + +{ +# open local scope + +#chdir to the working directory +chdir($___WORKING_DIR) or die "Can't chdir to $___WORKING_DIR"; + +# fixed file names +my $mert_outfile = "mert.out"; +my $mert_logfile = "mert.log"; +my $weights_in_file = "init.opt"; +my $weights_out_file = "weights.txt"; + +# set start run +my $start_run = 1; +my $bestpoint = undef; +my $devbleu = undef; +my $sparse_weights_file = undef; +my $jobid = -1; + +my $prev_feature_file = undef; +my $prev_score_file = undef; +my $prev_init_file = undef; + + +######################### +# set jobid to trace different jobs +my $prevjid = undef; + + + +#### my $run=$start_run-1; + +my $oldallsorted = undef; +my $allsorted = undef; + +my $nbest_file=undef; +my $lsamp_file=undef; #Lattice samples +my $orig_nbest_file=undef; # replaced if lattice sampling +my $cmd=undef; + + + + + + $nbest_file="run$run.best$___N_BEST_LIST_SIZE.out"; + safesystem("gzip -f $nbest_file") or die "Failed to gzip run*out"; + $nbest_file = $nbest_file.".gz"; + + + # extract score statistics and features from the nbest lists + print STDERR "Scoring the nbestlist.\n"; + + my $base_feature_file = "features.dat"; + my $base_score_file = "scores.dat"; + my $feature_file = "run$run.${base_feature_file}"; + my $score_file = "run$run.${base_score_file}"; + + $cmd = "$mert_extract_cmd $mert_extract_args --scfile $score_file --ffile $feature_file -r ".join(",", @references)." -n $nbest_file"; + $cmd = create_extractor_script($cmd, $___WORKING_DIR); + + &submit_or_exec($cmd,"extract.out","extract.err","extract.id"); + + + +} # end of local scope + +sub get_weights_from_mert { + my ($outfile,$logfile,$weight_count,$sparse_weights) = @_; + my ($bestpoint,$devbleu); + if ($___PAIRWISE_RANKED_OPTIMIZER || ($___PRO_STARTING_POINT && $logfile =~ /pro/)) { + open(IN,$outfile) or die "Can't open $outfile"; + my (@WEIGHT,$sum); + for(my $i=0;$i<$weight_count;$i++) { push @WEIGHT, 0; } + while() { + # regular features + if (/^F(\d+) ([\-\.\de]+)/) { + $WEIGHT[$1] = $2; + $sum += abs($2); + } + # sparse features + elsif(/^(.+_.+) ([\-\.\de]+)/) { + $$sparse_weights{$1} = $2; + } + } + $devbleu = "unknown"; + foreach (@WEIGHT) { $_ /= $sum; } + foreach (keys %{$sparse_weights}) { $$sparse_weights{$_} /= $sum; } + $bestpoint = join(" ",@WEIGHT); + close IN; + } + else { + open(IN,$logfile) or die "Can't open $logfile"; + while () { + if (/Best point:\s*([\s\d\.\-e]+?)\s*=> ([\-\d\.]+)/) { + $bestpoint = $1; + $devbleu = $2; + last; + } + } + close IN; + } + return ($bestpoint,$devbleu); +} + + + +sub sanity_check_order_of_lambdas { + my $featlist = shift; + my $filename_or_stream = shift; + + my @expected_lambdas = @{$featlist->{"names"}}; + my @got = get_order_of_scores_from_nbestlist($filename_or_stream); + die "Mismatched lambdas. Decoder returned @got, we expected @expected_lambdas" + if "@got" ne "@expected_lambdas"; +} + +sub get_featlist_from_moses { + # run moses with the given config file and return the list of features and + # their initial values + my $configfn = shift; + my $featlistfn = "./features.list"; + if (-e $featlistfn) { + print STDERR "Using cached features list: $featlistfn\n"; + } else { + print STDERR "Asking moses for feature names and values from $___CONFIG\n"; + my $cmd = "$___DECODER $___DECODER_FLAGS -config $configfn -inputtype $___INPUTTYPE -show-weights > $featlistfn"; + safesystem($cmd) or die "Failed to run moses with the config $configfn"; + } + + # read feature list + my @names = (); + my @startvalues = (); + open(INI,$featlistfn) or die "Can't read $featlistfn"; + my $nr = 0; + my @errs = (); + while () { + $nr++; + chomp; + /^(.+) (\S+) (\S+)$/ || die("invalid feature: $_"); + my ($longname, $feature, $value) = ($1,$2,$3); + next if $value eq "sparse"; + push @errs, "$featlistfn:$nr:Bad initial value of $feature: $value\n" + if $value !~ /^[+-]?[0-9.e]+$/; + push @errs, "$featlistfn:$nr:Unknown feature '$feature', please add it to \@ABBR_FULL_MAP\n" + if !defined $ABBR2FULL{$feature}; + push @names, $feature; + push @startvalues, $value; + } + close INI; + if (scalar @errs) { + print STDERR join("", @errs); + exit 1; + } + return {"names"=>\@names, "values"=>\@startvalues}; +} + +sub get_order_of_scores_from_nbestlist { + # read the first line and interpret the ||| label: num num num label2: num ||| column in nbestlist + # return the score labels in order + my $fname_or_source = shift; + # print STDERR "Peeking at the beginning of nbestlist to get order of scores: $fname_or_source\n"; + open IN, $fname_or_source or die "Failed to get order of scores from nbestlist '$fname_or_source'"; + my $line = ; + close IN; + die "Line empty in nbestlist '$fname_or_source'" if !defined $line; + my ($sent, $hypo, $scores, $total) = split /\|\|\|/, $line; + $scores =~ s/^\s*|\s*$//g; + die "No scores in line: $line" if $scores eq ""; + + my @order = (); + my $label = undef; + my $sparse = 0; # we ignore sparse features here + foreach my $tok (split /\s+/, $scores) { + if ($tok =~ /.+_.+:/) { + $sparse = 1; + } elsif ($tok =~ /^([a-z][0-9a-z]*):/i) { + $label = $1; + } elsif ($tok =~ /^-?[-0-9.e]+$/) { + if (!$sparse) { + # a score found, remember it + die "Found a score but no label before it! Bad nbestlist '$fname_or_source'!" + if !defined $label; + push @order, $label; + } + $sparse = 0; + } else { + die "Not a label, not a score '$tok'. Failed to parse the scores string: '$scores' of nbestlist '$fname_or_source'"; + } + } + print STDERR "The decoder returns the scores in this order: @order\n"; + return @order; +} + + +sub safesystem { + print STDERR "Executing: @_\n"; + system(@_); + if ($? == -1) { + print STDERR "Failed to execute: @_\n $!\n"; + exit(1); + } + elsif ($? & 127) { + printf STDERR "Execution of: @_\n died with signal %d, %s coredump\n", + ($? & 127), ($? & 128) ? 'with' : 'without'; + exit(1); + } + else { + my $exitcode = $? >> 8; + print STDERR "Exit code: $exitcode\n" if $exitcode; + return ! $exitcode; + } +} +sub ensure_full_path { + my $PATH = shift; +$PATH =~ s/\/nfsmnt//; + return $PATH if $PATH =~ /^\//; + my $dir = `pawd 2>/dev/null`; + if(!$dir){$dir = `pwd`;} + chomp($dir); + $PATH = $dir."/".$PATH; + $PATH =~ s/[\r\n]//g; + $PATH =~ s/\/\.\//\//g; + $PATH =~ s/\/+/\//g; + my $sanity = 0; + while($PATH =~ /\/\.\.\// && $sanity++<10) { + $PATH =~ s/\/+/\//g; + $PATH =~ s/\/[^\/]+\/\.\.\//\//g; + } + $PATH =~ s/\/[^\/]+\/\.\.$//; + $PATH =~ s/\/+$//; +$PATH =~ s/\/nfsmnt//; + return $PATH; +} + +sub submit_or_exec { + + my $argvlen = @_; + my $cmd = undef; + my $stdout = undef; + my $stderr = undef; + my $jidfile = undef; + my $prevjid = undef; + + # if supply 3 arguments, exec without submit + # if supply 4 arguments, then submit new job + # if supply 5 arguments, wait for the previous job to finish + if ($argvlen == 3){ + ($cmd,$stdout,$stderr) = @_; + } elsif ($argvlen == 4){ + ($cmd,$stdout,$stderr,$jidfile) = @_; + } elsif ($argvlen == 5){ + ($cmd,$stdout,$stderr,$jidfile,$prevjid) = @_; + } + + print STDERR "exec: $cmd\n"; + if (defined $___JOBS && $___JOBS > 0 && $argvlen==5) { + safesystem("$qsubwrapper $pass_old_sge -command='$cmd' -queue-parameters=\"$queue_flags\" -stdout=$stdout -stderr=$stderr -jidfile=$jidfile -prevjid=$prevjid" ) + or die "ERROR: Failed to submit '$cmd' (via $qsubwrapper)"; + } + elsif (defined $___JOBS && $___JOBS > 0 && $argvlen==4) { + safesystem("$qsubwrapper $pass_old_sge -command='$cmd' -queue-parameters=\"$queue_flags\" -stdout=$stdout -stderr=$stderr -jidfile=$jidfile" ) + or die "ERROR: Failed to submit '$cmd' (via $qsubwrapper)"; + } else { + safesystem("$cmd > $stdout 2> $stderr") or die "ERROR: Failed to run '$cmd'."; + } +} + +sub exit_submit { + + my $argvlen = @_; + my $cmd = undef; + my $stdout = undef; + my $stderr = undef; + my $jidfile = undef; + my $pidfile = undef; + my $prevjid = undef; + my $prevjidarraysize = 0; + my @prevjidarray = (); + my $pid = undef; + my $qsubcmd=""; + my $hj=""; + + # if supply 4 arguments, then submit new job + # if supply 5 arguments, wait for the previous job to finish + if ($argvlen == 2) { + ($stdout,$stderr) = @_; + } elsif ($argvlen == 4){ + ($stdout,$stderr,$jidfile,$pidfile) = @_; + } elsif ($argvlen == 5){ + ($stdout,$stderr,$jidfile,$pidfile,$prevjid) = @_; + } + + # parse prevjid ######################## + $prevjid =~ s/^\s+|\s+$//g; + @prevjidarray = split(/\s+/,$prevjid); + $prevjidarraysize = scalar(@prevjidarray); + ######################################## + + + # print STDERR "exec: $stdout\n"; + + # read pid from file, and draft exit script ################## + chomp ($pid=`tail -n 1 $pidfile`); + open (OUT, ">exitjob$pid.sh"); + + my $scriptheader="\#\!/bin/bash\n\#\$ -S /bin/sh\n# Both lines are needed to invoke base\n#the above line is ignored by qsub, unless parameter \"-b yes\" is set!\n\n"; + $scriptheader .="uname -a\n\n"; + $scriptheader .="cd $___WORKING_DIR\n\n"; + + print OUT $scriptheader; + + print OUT "if $qsubwrapper_exit -submithost=$submithost -stdout=$stdout -stderr=$stderr -jidfile=$jidfile -pidfile=$pidfile > exitjob$pid.out 2> exitjob$pid.err ; then + echo 'succeeded' +else + echo failed with exit status \$\? + die=1 +fi +"; + print OUT "\n\n"; + + close (OUT); + # setting permissions of the script + chmod(oct(755),"exitjob$pid.sh"); + ############################################################## + + + if (defined $___JOBS && $___JOBS > 0 && $argvlen==5) { + if (defined $prevjid && $prevjid!=-1 && $prevjidarraysize == 1){ + $hj = "-hold_jid $prevjid"; + } elsif (defined $prevjid && $prevjidarraysize > 1){ + $hj = "-hold_jid " . join(" -hold_jid ", @prevjidarray); + } + $qsubcmd="qsub $queue_flags -V $hj exitjob$pid.sh > exitjob$pid.log 2>&1"; + safesystem($qsubcmd) or die "ERROR: Failed to exit-submit $pid (via $qsubwrapper_exit)"; + } elsif (defined $___JOBS && $___JOBS > 0 && $argvlen==4) { + $qsubcmd="qsub $queue_flags -V exitjob$pid.sh > exitjob$pid.log 2>&1"; + safesystem($qsubcmd) or die "ERROR: Failed to exit-submit $pid (via $qsubwrapper_exit)"; + } else { + safesystem("rm $stdout") or die "ERROR: Failed to remove '$stdout'."; + safesystem("rm $stderr") or die "ERROR: Failed to remove '$stderr'."; + } +} + + + + + + + +sub create_extractor_script() +{ + my ($cmd, $outdir) = @_; + my $script_path = File::Spec->catfile($outdir, "extractor.sh"); + + open my $out, '>', $script_path + or die "Couldn't open $script_path for writing: $!\n"; + print $out "#!/bin/bash\n"; + print $out "cd $outdir\n"; + print $out "$cmd\n"; + close($out); + + `chmod +x $script_path`; + + return $script_path; +} diff --git a/mira/Decoder.cpp b/contrib/mira/Decoder.cpp similarity index 76% rename from mira/Decoder.cpp rename to contrib/mira/Decoder.cpp index 2f2beede0e..d9fe8a9f98 100644 --- a/mira/Decoder.cpp +++ b/contrib/mira/Decoder.cpp @@ -19,13 +19,13 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "Decoder.h" #include "moses/Manager.h" +#include "moses/Timer.h" #include "moses/ChartManager.h" #include "moses/Sentence.h" #include "moses/InputType.h" #include "moses/Phrase.h" #include "moses/TrellisPathList.h" -#include "moses/ChartTrellisPathList.h" -#include "moses/ChartTrellisPath.h" +#include "moses/ChartKBestExtractor.h" using namespace std; using namespace Moses; @@ -47,7 +47,7 @@ static char* strToChar(const string& s) MosesDecoder::MosesDecoder(const string& inifile, int debuglevel, int argc, vector decoder_params) : m_manager(NULL) { - static int BASE_ARGC = 8; + static int BASE_ARGC = 6; Parameter* params = new Parameter(); char ** mosesargv = new char*[BASE_ARGC + argc]; mosesargv[0] = strToChar("-f"); @@ -56,10 +56,15 @@ MosesDecoder::MosesDecoder(const string& inifile, int debuglevel, int argc, vect stringstream dbgin; dbgin << debuglevel; mosesargv[3] = strToChar(dbgin.str()); + + mosesargv[4] = strToChar("-no-cache"); + mosesargv[5] = strToChar("true"); + /* mosesargv[4] = strToChar("-use-persistent-cache"); mosesargv[5] = strToChar("0"); mosesargv[6] = strToChar("-persistent-cache-size"); mosesargv[7] = strToChar("0"); + */ for (int i = 0; i < argc; ++i) { char *cstr = &(decoder_params[i])[0]; @@ -70,14 +75,16 @@ MosesDecoder::MosesDecoder(const string& inifile, int debuglevel, int argc, vect cerr << "Loading static data failed, exit." << endl; exit(1); } + ResetUserTime(); StaticData::LoadDataStatic(params, "mira"); for (int i = 0; i < BASE_ARGC; ++i) { delete[] mosesargv[i]; } delete[] mosesargv; - //m_bleuScoreFeature = staticData.GetBleuScoreFeature(); TODO - assert(false); + const std::vector &bleuFFs = BleuScoreFeature::GetColl(); + assert(bleuFFs.size() == 1); + m_bleuScoreFeature = bleuFFs[0]; } void MosesDecoder::cleanup(bool chartDecoding) @@ -138,13 +145,13 @@ vector< vector > MosesDecoder::runDecoder(const std::string& source string filename) { // run the decoder - m_manager = new Moses::Manager(0,*m_sentence, search); - m_manager->ProcessSentence(); + m_manager = new Moses::Manager(*m_sentence); + m_manager->Decode(); TrellisPathList nBestList; m_manager->CalcNBest(nBestSize, nBestList, distinct); // optionally print nbest to file (to extract scores and features.. currently just for sentence bleu scoring) - if (filename != "") { + /*if (filename != "") { ofstream out(filename.c_str()); if (!out) { ostringstream msg; @@ -154,7 +161,7 @@ vector< vector > MosesDecoder::runDecoder(const std::string& source // TODO: handle sentence id (for now always 0) //OutputNBest(out, nBestList, StaticData::Instance().GetOutputFactorOrder(), 0, false); out.close(); - } + }*/ // read off the feature values and bleu scores for each sentence in the nbest list Moses::TrellisPathList::const_iterator iter; @@ -216,29 +223,29 @@ vector< vector > MosesDecoder::runChartDecoder(const std::string& s { // run the decoder m_chartManager = new ChartManager(*m_sentence); - m_chartManager->ProcessSentence(); - ChartTrellisPathList nBestList; + m_chartManager->Decode(); + ChartKBestExtractor::KBestVec nBestList; m_chartManager->CalcNBest(nBestSize, nBestList, distinct); // read off the feature values and bleu scores for each sentence in the nbest list - ChartTrellisPathList::const_iterator iter; - for (iter = nBestList.begin() ; iter != nBestList.end() ; ++iter) { - const Moses::ChartTrellisPath &path = **iter; - featureValues.push_back(path.GetScoreBreakdown()); + for (ChartKBestExtractor::KBestVec::const_iterator p = nBestList.begin(); + p != nBestList.end(); ++p) { + const ChartKBestExtractor::Derivation &derivation = **p; + featureValues.push_back(*ChartKBestExtractor::GetOutputScoreBreakdown(derivation)); float bleuScore, dynBleuScore, realBleuScore; dynBleuScore = getBleuScore(featureValues.back()); - realBleuScore = m_bleuScoreFeature->CalculateBleu(path.GetOutputPhrase()); + Phrase outputPhrase = ChartKBestExtractor::GetOutputPhrase(derivation); + realBleuScore = m_bleuScoreFeature->CalculateBleu(outputPhrase); bleuScore = realBleu ? realBleuScore : dynBleuScore; bleuScores.push_back(bleuScore); - //std::cout << "Score breakdown: " << path.GetScoreBreakdown() << endl; - float scoreWithoutBleu = path.GetTotalScore() - (bleuObjectiveWeight * bleuScoreWeight * bleuScore); + float scoreWithoutBleu = derivation.score - (bleuObjectiveWeight * bleuScoreWeight * bleuScore); modelScores.push_back(scoreWithoutBleu); - if (iter != nBestList.begin()) + if (p != nBestList.begin()) cerr << endl; - cerr << "Rank " << rank << ", epoch " << epoch << ", \"" << path.GetOutputPhrase() << "\", score: " - << scoreWithoutBleu << ", Bleu: " << bleuScore << ", total: " << path.GetTotalScore(); + cerr << "Rank " << rank << ", epoch " << epoch << ", \"" << outputPhrase << "\", score: " + << scoreWithoutBleu << ", Bleu: " << bleuScore << ", total: " << derivation.score; if (m_bleuScoreFeature->Enabled() && realBleu) cerr << " (d-bleu: " << dynBleuScore << ", r-bleu: " << realBleuScore << ") "; @@ -248,9 +255,10 @@ vector< vector > MosesDecoder::runChartDecoder(const std::string& s // prepare translations to return vector< vector > translations; - for (iter = nBestList.begin() ; iter != nBestList.end() ; ++iter) { - const ChartTrellisPath &path = **iter; - Phrase phrase = path.GetOutputPhrase(); + for (ChartKBestExtractor::KBestVec::const_iterator p = nBestList.begin(); + p != nBestList.end(); ++p) { + const ChartKBestExtractor::Derivation &derivation = **p; + Phrase phrase = ChartKBestExtractor::GetOutputPhrase(derivation); vector translation; for (size_t pos = 0; pos < phrase.GetSize(); ++pos) { @@ -264,61 +272,6 @@ vector< vector > MosesDecoder::runChartDecoder(const std::string& s return translations; } -void MosesDecoder::outputNBestList(const std::string& source, size_t sentenceid, - size_t nBestSize, float bleuObjectiveWeight, float bleuScoreWeight, - bool distinctNbest, bool avgRefLength, string filename, ofstream& streamOut) -{ - StaticData &staticData = StaticData::InstanceNonConst(); - bool chartDecoding = staticData.IsChart(); - initialize(staticData, source, sentenceid, bleuObjectiveWeight, bleuScoreWeight, avgRefLength, chartDecoding); - - if (chartDecoding) { - m_chartManager = new ChartManager(*m_sentence); - m_chartManager->ProcessSentence(); - ChartTrellisPathList nBestList; - m_chartManager->CalcNBest(nBestSize, nBestList, distinctNbest); - - cerr << "generate nbest list " << filename << endl; - cerr << "not implemented.." << endl; - exit(1); - if (filename != "") { - ofstream out(filename.c_str()); - if (!out) { - ostringstream msg; - msg << "Unable to open " << filename; - throw runtime_error(msg.str()); - } - // TODO: handle sentence id (for now always 0) -// OutputNBestList(const ChartTrellisPathList &nBestList, const ChartHypothesis *bestHypo, const TranslationSystem* system, long translationId, false) -// OutputNBest(out, nBestList, StaticData::Instance().GetOutputFactorOrder(),m_manager->GetTranslationSystem(), 0, false); - out.close(); - } else { -// OutputNBest(streamOut, nBestList, StaticData::Instance().GetOutputFactorOrder(),m_manager->GetTranslationSystem(), sentenceid, false); - } - } else { - // run the decoder - m_manager = new Moses::Manager(0,*m_sentence, staticData.GetSearchAlgorithm()); - m_manager->ProcessSentence(); - TrellisPathList nBestList; - m_manager->CalcNBest(nBestSize, nBestList, distinctNbest); - - if (filename != "") { - ofstream out(filename.c_str()); - if (!out) { - ostringstream msg; - msg << "Unable to open " << filename; - throw runtime_error(msg.str()); - } - // TODO: handle sentence id (for now always 0) - //OutputNBest(out, nBestList, StaticData::Instance().GetOutputFactorOrder(),m_manager->GetTranslationSystem(), 0, false); - out.close(); - } else { - //OutputNBest(streamOut, nBestList, StaticData::Instance().GetOutputFactorOrder(),m_manager->GetTranslationSystem(), sentenceid, false); - streamOut.flush(); - } - } -} - void MosesDecoder::initialize(StaticData& staticData, const std::string& source, size_t sentenceid, float bleuObjectiveWeight, float bleuScoreWeight, bool avgRefLength, bool chartDecoding) { diff --git a/mira/Decoder.h b/contrib/mira/Decoder.h similarity index 92% rename from mira/Decoder.h rename to contrib/mira/Decoder.h index ac8acc26b3..0cc1eb3ab6 100644 --- a/mira/Decoder.h +++ b/contrib/mira/Decoder.h @@ -24,7 +24,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include -#include "moses/ChartTrellisPathList.h" #include "moses/Hypothesis.h" #include "moses/Parameter.h" #include "moses/SearchNormal.h" @@ -95,15 +94,6 @@ class MosesDecoder bool distinct, size_t rank, size_t epoch); - void outputNBestList(const std::string& source, - size_t sentenceid, - size_t nBestSize, - float bleuObjectiveWeight, - float bleuScoreWeight, - bool distinctNbest, - bool avgRefLength, - std::string filename, - std::ofstream& streamOut); void initialize(Moses::StaticData& staticData, const std::string& source, size_t sentenceid, float bleuObjectiveWeight, float bleuScoreWeight, bool avgRefLength, bool chartDecoding); void updateHistory(const std::vector& words); diff --git a/mira/Hildreth.cpp b/contrib/mira/Hildreth.cpp similarity index 100% rename from mira/Hildreth.cpp rename to contrib/mira/Hildreth.cpp diff --git a/mira/Hildreth.h b/contrib/mira/Hildreth.h similarity index 100% rename from mira/Hildreth.h rename to contrib/mira/Hildreth.h diff --git a/mira/HildrethTest.cpp b/contrib/mira/HildrethTest.cpp similarity index 100% rename from mira/HildrethTest.cpp rename to contrib/mira/HildrethTest.cpp diff --git a/mira/HypothesisQueue.cpp b/contrib/mira/HypothesisQueue.cpp similarity index 100% rename from mira/HypothesisQueue.cpp rename to contrib/mira/HypothesisQueue.cpp diff --git a/mira/HypothesisQueue.h b/contrib/mira/HypothesisQueue.h similarity index 100% rename from mira/HypothesisQueue.h rename to contrib/mira/HypothesisQueue.h diff --git a/contrib/mira/Jamfile b/contrib/mira/Jamfile new file mode 100644 index 0000000000..c196c10329 --- /dev/null +++ b/contrib/mira/Jamfile @@ -0,0 +1,15 @@ +lib mira_lib : +[ glob *.cpp : *Test.cpp Main.cpp ] +../../mert//mert_lib ../../moses//moses ../../OnDiskPt//OnDiskPt ../..//boost_program_options ; + +exe mira : Main.cpp mira_lib ../../mert//mert_lib ../../moses//moses ../../OnDiskPt//OnDiskPt ../..//boost_program_options ../..//boost_filesystem ; + +alias programs : mira ; + +import testing ; + +unit-test mira_test : [ glob *Test.cpp ] mira_lib ..//boost_unit_test_framework ; + +explicit mira_test ; + + diff --git a/contrib/mira/Main.cpp b/contrib/mira/Main.cpp new file mode 100644 index 0000000000..acc2f88868 --- /dev/null +++ b/contrib/mira/Main.cpp @@ -0,0 +1,1849 @@ +/*********************************************************************** + Moses - factored phrase-based language decoder + Copyright (C) 2010 University of Edinburgh + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this library; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + ***********************************************************************/ + +#include +#include +#include +#include +#include +#include + +#include +#include + +#ifdef MPI_ENABLE +#include +namespace mpi = boost::mpi; +#endif + +#include "Main.h" +#include "Optimiser.h" +#include "Hildreth.h" +#include "HypothesisQueue.h" +#include "moses/StaticData.h" +#include "moses/ScoreComponentCollection.h" +#include "moses/ThreadPool.h" +#include "mert/BleuScorer.h" +#include "moses/FeatureVector.h" + +#include "moses/FF/WordTranslationFeature.h" +#include "moses/FF/PhrasePairFeature.h" +#include "moses/FF/WordPenaltyProducer.h" +#include "moses/LM/Base.h" +#include "util/random.hh" + +using namespace Mira; +using namespace std; +using namespace Moses; +namespace po = boost::program_options; + +int main(int argc, char** argv) +{ + util::rand_init(); + size_t rank = 0; + size_t size = 1; +#ifdef MPI_ENABLE + mpi::environment env(argc,argv); + mpi::communicator world; + rank = world.rank(); + size = world.size(); +#endif + + bool help; + int verbosity; + string mosesConfigFile; + string inputFile; + vector referenceFiles; + vector mosesConfigFilesFolds, inputFilesFolds, referenceFilesFolds; + // string coreWeightFile, startWeightFile; + size_t epochs; + string learner; + bool shuffle; + size_t mixingFrequency; + size_t weightDumpFrequency; + string weightDumpStem; + bool scale_margin; + bool scale_update; + size_t n; + size_t batchSize; + bool distinctNbest; + bool accumulateWeights; + float historySmoothing; + bool scaleByInputLength, scaleByAvgInputLength; + bool scaleByInverseLength, scaleByAvgInverseLength; + float scaleByX; + float slack; + bool averageWeights; + bool weightConvergence; + float learning_rate; + float mira_learning_rate; + float perceptron_learning_rate; + string decoder_settings; + float min_weight_change; + bool normaliseWeights, normaliseMargin; + bool print_feature_values; + bool historyBleu ; + bool sentenceBleu; + bool perceptron_update; + bool hope_fear; + bool model_hope_fear; + size_t hope_n, fear_n; + size_t bleu_smoothing_scheme; + float min_oracle_bleu; + float minBleuRatio, maxBleuRatio; + bool boost; + bool decode_hope, decode_fear, decode_model; + string decode_filename; + bool batchEqualsShard; + bool sparseAverage, dumpMixedWeights, sparseNoAverage; + int featureCutoff; + bool pruneZeroWeights; + bool printFeatureCounts, printNbestWithFeatures; + bool avgRefLength; + bool print_weights, print_core_weights, debug_model, scale_lm, scale_wp; + float scale_lm_factor, scale_wp_factor; + bool kbest; + string moses_src; + float sigmoidParam; + float bleuWeight, bleuWeight_hope, bleuWeight_fear; + bool bleu_weight_lm; + float bleu_weight_lm_factor; + bool l1_regularize, l2_regularize, l1_reg_sparse, l2_reg_sparse; + float l1_lambda, l2_lambda; + bool most_violated, most_violated_reg, all_violated, max_bleu_diff; + bool feature_confidence, signed_counts; + float decay_core, decay_sparse, core_r0, sparse_r0; + float bleu_weight_fear_factor; + bool hildreth; + float add2lm; + + // compute real sentence Bleu scores on complete translations, disable Bleu feature + bool realBleu, disableBleuFeature; + bool rescaleSlack; + bool makePairs; + bool debug; + bool reg_on_every_mix; + size_t continue_epoch; + bool modelPlusBleu, simpleHistoryBleu; + po::options_description desc("Allowed options"); + desc.add_options() + ("continue-epoch", po::value(&continue_epoch)->default_value(0), "Continue an interrupted experiment from this epoch on") + ("freq-reg", po::value(®_on_every_mix)->default_value(false), "Regularize after every weight mixing") + ("l1sparse", po::value(&l1_reg_sparse)->default_value(true), "L1-regularization for sparse weights only") + ("l2sparse", po::value(&l2_reg_sparse)->default_value(true), "L2-regularization for sparse weights only") + ("mv-reg", po::value(&most_violated_reg)->default_value(false), "Regularize most violated constraint") + ("most-violated", po::value(&most_violated)->default_value(false), "Add most violated constraint") + ("all-violated", po::value(&all_violated)->default_value(false), "Add all violated constraints") + ("feature-confidence", po::value(&feature_confidence)->default_value(false), "Confidence-weighted learning") + ("signed-counts", po::value(&signed_counts)->default_value(false), "Use signed feature counts for CWL") + ("dbg", po::value(&debug)->default_value(true), "More debug output") + ("make-pairs", po::value(&makePairs)->default_value(true), "Make pairs of hypotheses for 1slack") + ("debug", po::value(&debug)->default_value(true), "More debug output") + ("rescale-slack", po::value(&rescaleSlack)->default_value(false), "Rescale slack in 1-slack formulation") + ("add2lm", po::value(&add2lm)->default_value(0.0), "Add the specified amount to all LM weights") + ("hildreth", po::value(&hildreth)->default_value(false), "Prefer Hildreth over analytical update") + ("model-plus-bleu", po::value(&modelPlusBleu)->default_value(false), "Use the sum of model score and +/- bleu to select hope and fear translations") + ("simple-history-bleu", po::value(&simpleHistoryBleu)->default_value(false), "Simple history Bleu") + + ("bleu-weight", po::value(&bleuWeight)->default_value(1.0), "Bleu weight used in decoder objective") + ("bw-hope", po::value(&bleuWeight_hope)->default_value(-1.0), "Bleu weight used in decoder objective for hope") + ("bw-fear", po::value(&bleuWeight_fear)->default_value(-1.0), "Bleu weight used in decoder objective for fear") + + ("core-r0", po::value(&core_r0)->default_value(1.0), "Start learning rate for core features") + ("sparse-r0", po::value(&sparse_r0)->default_value(1.0), "Start learning rate for sparse features") + ("decay-core", po::value(&decay_core)->default_value(0.01), "Decay for core feature learning rate") + ("decay-sparse", po::value(&decay_sparse)->default_value(0.01), "Decay for sparse feature learning rate") + + ("tie-bw-to-lm", po::value(&bleu_weight_lm)->default_value(true), "Make bleu weight depend on lm weight") + ("bw-lm-factor", po::value(&bleu_weight_lm_factor)->default_value(2.0), "Make bleu weight depend on lm weight by this factor") + ("bw-factor-fear", po::value(&bleu_weight_fear_factor)->default_value(1.0), "Multiply fear weight by this factor") + ("accumulate-weights", po::value(&accumulateWeights)->default_value(false), "Accumulate and average weights over all epochs") + ("average-weights", po::value(&averageWeights)->default_value(false), "Set decoder weights to average weights after each update") + ("avg-ref-length", po::value(&avgRefLength)->default_value(false), "Use average reference length instead of shortest for BLEU score feature") + ("batch-equals-shard", po::value(&batchEqualsShard)->default_value(false), "Batch size is equal to shard size (purely batch)") + ("batch-size,b", po::value(&batchSize)->default_value(1), "Size of batch that is send to optimiser for weight adjustments") + ("bleu-smoothing-scheme", po::value(&bleu_smoothing_scheme)->default_value(1), "Set a smoothing scheme for sentence-Bleu: +1 (1), +0.1 (2), papineni (3) (default:1)") + ("boost", po::value(&boost)->default_value(false), "Apply boosting factor to updates on misranked candidates") + ("config,f", po::value(&mosesConfigFile), "Moses ini-file") + ("configs-folds", po::value >(&mosesConfigFilesFolds), "Moses ini-files, one for each fold") + ("debug-model", po::value(&debug_model)->default_value(false), "Get best model translation for debugging purposes") + ("decode-hope", po::value(&decode_hope)->default_value(false), "Decode dev input set according to hope objective") + ("decode-fear", po::value(&decode_fear)->default_value(false), "Decode dev input set according to fear objective") + ("decode-model", po::value(&decode_model)->default_value(false), "Decode dev input set according to normal objective") + ("decode-filename", po::value(&decode_filename), "Filename for Bleu objective translations") + ("decoder-settings", po::value(&decoder_settings)->default_value(""), "Decoder settings for tuning runs") + ("distinct-nbest", po::value(&distinctNbest)->default_value(true), "Use n-best list with distinct translations in inference step") + ("dump-mixed-weights", po::value(&dumpMixedWeights)->default_value(false), "Dump mixed weights instead of averaged weights") + ("epochs,e", po::value(&epochs)->default_value(10), "Number of epochs") + ("feature-cutoff", po::value(&featureCutoff)->default_value(-1), "Feature cutoff as additional regularization for sparse features") + ("fear-n", po::value(&fear_n)->default_value(1), "Number of fear translations used") + ("help", po::value(&help)->zero_tokens()->default_value(false), "Print this help message and exit") + ("history-bleu", po::value(&historyBleu)->default_value(false), "Use 1best translations to update the history") + ("history-smoothing", po::value(&historySmoothing)->default_value(0.9), "Adjust the factor for history smoothing") + ("hope-fear", po::value(&hope_fear)->default_value(true), "Use only hope and fear translations for optimisation (not model)") + ("hope-n", po::value(&hope_n)->default_value(2), "Number of hope translations used") + ("input-file,i", po::value(&inputFile), "Input file containing tokenised source") + ("input-files-folds", po::value >(&inputFilesFolds), "Input files containing tokenised source, one for each fold") + ("learner,l", po::value(&learner)->default_value("mira"), "Learning algorithm") + ("l1-lambda", po::value(&l1_lambda)->default_value(0.0001), "Lambda for l1-regularization (w_i +/- lambda)") + ("l2-lambda", po::value(&l2_lambda)->default_value(0.01), "Lambda for l2-regularization (w_i * (1 - lambda))") + ("l1-reg", po::value(&l1_regularize)->default_value(false), "L1-regularization") + ("l2-reg", po::value(&l2_regularize)->default_value(false), "L2-regularization") + ("min-bleu-ratio", po::value(&minBleuRatio)->default_value(-1), "Set a minimum BLEU ratio between hope and fear") + ("max-bleu-ratio", po::value(&maxBleuRatio)->default_value(-1), "Set a maximum BLEU ratio between hope and fear") + ("max-bleu-diff", po::value(&max_bleu_diff)->default_value(true), "Select hope/fear with maximum Bleu difference") + ("min-oracle-bleu", po::value(&min_oracle_bleu)->default_value(0), "Set a minimum oracle BLEU score") + ("min-weight-change", po::value(&min_weight_change)->default_value(0.0001), "Set minimum weight change for stopping criterion") + ("mira-learning-rate", po::value(&mira_learning_rate)->default_value(1), "Learning rate for MIRA (fixed or flexible)") + ("mixing-frequency", po::value(&mixingFrequency)->default_value(10), "How often per epoch to mix weights, when using mpi") + ("model-hope-fear", po::value(&model_hope_fear)->default_value(false), "Use model, hope and fear translations for optimisation") + ("moses-src", po::value(&moses_src)->default_value(""), "Moses source directory") + ("nbest,n", po::value(&n)->default_value(30), "Number of translations in n-best list") + ("normalise-weights", po::value(&normaliseWeights)->default_value(false), "Whether to normalise the updated weights before passing them to the decoder") + ("normalise-margin", po::value(&normaliseMargin)->default_value(false), "Normalise the margin: squash between 0 and 1") + ("perceptron-learning-rate", po::value(&perceptron_learning_rate)->default_value(0.01), "Perceptron learning rate") + ("print-feature-values", po::value(&print_feature_values)->default_value(false), "Print out feature values") + ("print-feature-counts", po::value(&printFeatureCounts)->default_value(false), "Print out feature values, print feature list with hope counts after 1st epoch") + ("print-nbest-with-features", po::value(&printNbestWithFeatures)->default_value(false), "Print out feature values, print feature list with hope counts after 1st epoch") + ("print-weights", po::value(&print_weights)->default_value(false), "Print out current weights") + ("print-core-weights", po::value(&print_core_weights)->default_value(true), "Print out current core weights") + ("prune-zero-weights", po::value(&pruneZeroWeights)->default_value(false), "Prune zero-valued sparse feature weights") + ("reference-files,r", po::value >(&referenceFiles), "Reference translation files for training") + ("reference-files-folds", po::value >(&referenceFilesFolds), "Reference translation files for training, one for each fold") + ("kbest", po::value(&kbest)->default_value(true), "Select hope/fear pairs from a list of nbest translations") + + ("scale-by-inverse-length", po::value(&scaleByInverseLength)->default_value(false), "Scale BLEU by (history of) inverse input length") + ("scale-by-input-length", po::value(&scaleByInputLength)->default_value(true), "Scale BLEU by (history of) input length") + ("scale-by-avg-input-length", po::value(&scaleByAvgInputLength)->default_value(false), "Scale BLEU by average input length") + ("scale-by-avg-inverse-length", po::value(&scaleByAvgInverseLength)->default_value(false), "Scale BLEU by average inverse input length") + ("scale-by-x", po::value(&scaleByX)->default_value(0.1), "Scale the BLEU score by value x") + ("scale-lm", po::value(&scale_lm)->default_value(true), "Scale the language model feature") + ("scale-factor-lm", po::value(&scale_lm_factor)->default_value(0.5), "Scale the language model feature by this factor") + ("scale-wp", po::value(&scale_wp)->default_value(false), "Scale the word penalty feature") + ("scale-factor-wp", po::value(&scale_wp_factor)->default_value(2), "Scale the word penalty feature by this factor") + ("scale-margin", po::value(&scale_margin)->default_value(0), "Scale the margin by the Bleu score of the oracle translation") + ("sentence-level-bleu", po::value(&sentenceBleu)->default_value(true), "Use a sentences level Bleu scoring function") + ("shuffle", po::value(&shuffle)->default_value(false), "Shuffle input sentences before processing") + ("sigmoid-param", po::value(&sigmoidParam)->default_value(1), "y=sigmoidParam is the axis that this sigmoid approaches") + ("slack", po::value(&slack)->default_value(0.05), "Use slack in optimiser") + ("sparse-average", po::value(&sparseAverage)->default_value(false), "Average weights by the number of processes") + ("sparse-no-average", po::value(&sparseNoAverage)->default_value(false), "Don't average sparse weights, just sum") + ("stop-weights", po::value(&weightConvergence)->default_value(true), "Stop when weights converge") + ("verbosity,v", po::value(&verbosity)->default_value(0), "Verbosity level") + ("weight-dump-frequency", po::value(&weightDumpFrequency)->default_value(2), "How often per epoch to dump weights (mpi)") + ("weight-dump-stem", po::value(&weightDumpStem)->default_value("weights"), "Stem of filename to use for dumping weights"); + + po::options_description cmdline_options; + cmdline_options.add(desc); + po::variables_map vm; + po::store(po::command_line_parser(argc, argv). options(cmdline_options).run(), vm); + po::notify(vm); + + if (help) { + std::cout << "Usage: " + string(argv[0]) + + " -f mosesini-file -i input-file -r reference-file(s) [options]" << std::endl; + std::cout << desc << std::endl; + return 0; + } + + const StaticData &staticData = StaticData::Instance(); + + bool trainWithMultipleFolds = false; + if (mosesConfigFilesFolds.size() > 0 || inputFilesFolds.size() > 0 || referenceFilesFolds.size() > 0) { + if (rank == 0) + cerr << "Training with " << mosesConfigFilesFolds.size() << " folds" << endl; + trainWithMultipleFolds = true; + } + + if (dumpMixedWeights && (mixingFrequency != weightDumpFrequency)) { + cerr << "Set mixing frequency = weight dump frequency for dumping mixed weights!" << endl; + exit(1); + } + + if ((sparseAverage || sparseNoAverage) && averageWeights) { + cerr << "Parameters --sparse-average 1/--sparse-no-average 1 and --average-weights 1 are incompatible (not implemented)" << endl; + exit(1); + } + + if (trainWithMultipleFolds) { + if (!mosesConfigFilesFolds.size()) { + cerr << "Error: No moses ini files specified for training with folds" << endl; + exit(1); + } + + if (!inputFilesFolds.size()) { + cerr << "Error: No input files specified for training with folds" << endl; + exit(1); + } + + if (!referenceFilesFolds.size()) { + cerr << "Error: No reference files specified for training with folds" << endl; + exit(1); + } + } else { + if (mosesConfigFile.empty()) { + cerr << "Error: No moses ini file specified" << endl; + return 1; + } + + if (inputFile.empty()) { + cerr << "Error: No input file specified" << endl; + return 1; + } + + if (!referenceFiles.size()) { + cerr << "Error: No reference files specified" << endl; + return 1; + } + } + + // load input and references + vector inputSentences; + size_t inputSize = trainWithMultipleFolds? inputFilesFolds.size(): 0; + size_t refSize = trainWithMultipleFolds? referenceFilesFolds.size(): referenceFiles.size(); + vector > inputSentencesFolds(inputSize); + vector > referenceSentences(refSize); + + // number of cores for each fold + size_t coresPerFold = 0, myFold = 0; + if (trainWithMultipleFolds) { + if (mosesConfigFilesFolds.size() > size) { + cerr << "Number of cores has to be a multiple of the number of folds" << endl; + exit(1); + } + coresPerFold = size/mosesConfigFilesFolds.size(); + if (size % coresPerFold > 0) { + cerr << "Number of cores has to be a multiple of the number of folds" << endl; + exit(1); + } + + if (rank == 0) + cerr << "Number of cores per fold: " << coresPerFold << endl; + myFold = rank/coresPerFold; + cerr << "Rank " << rank << ", my fold: " << myFold << endl; + } + + // NOTE: we do not actually need the references here, because we are reading them in from StaticData + if (trainWithMultipleFolds) { + if (!loadSentences(inputFilesFolds[myFold], inputSentencesFolds[myFold])) { + cerr << "Error: Failed to load input sentences from " << inputFilesFolds[myFold] << endl; + exit(1); + } + VERBOSE(1, "Rank " << rank << " reading inputs from " << inputFilesFolds[myFold] << endl); + + if (!loadSentences(referenceFilesFolds[myFold], referenceSentences[myFold])) { + cerr << "Error: Failed to load reference sentences from " << referenceFilesFolds[myFold] << endl; + exit(1); + } + if (referenceSentences[myFold].size() != inputSentencesFolds[myFold].size()) { + cerr << "Error: Input file length (" << inputSentencesFolds[myFold].size() << ") != (" + << referenceSentences[myFold].size() << ") reference file length (rank " << rank << ")" << endl; + exit(1); + } + VERBOSE(1, "Rank " << rank << " reading references from " << referenceFilesFolds[myFold] << endl); + } else { + if (!loadSentences(inputFile, inputSentences)) { + cerr << "Error: Failed to load input sentences from " << inputFile << endl; + return 1; + } + + for (size_t i = 0; i < referenceFiles.size(); ++i) { + if (!loadSentences(referenceFiles[i], referenceSentences[i])) { + cerr << "Error: Failed to load reference sentences from " + << referenceFiles[i] << endl; + return 1; + } + if (referenceSentences[i].size() != inputSentences.size()) { + cerr << "Error: Input file length (" << inputSentences.size() << ") != (" + << referenceSentences[i].size() << ") length of reference file " << i + << endl; + return 1; + } + } + } + + if (scaleByAvgInputLength || scaleByInverseLength || scaleByAvgInverseLength) + scaleByInputLength = false; + + if (historyBleu || simpleHistoryBleu) { + sentenceBleu = false; + cerr << "Using history Bleu. " << endl; + } + + if (kbest) { + realBleu = true; + disableBleuFeature = true; + cerr << "Use kbest lists and real Bleu scores, disable Bleu feature.." << endl; + } + + // initialise Moses + // add references to initialize Bleu feature + boost::trim(decoder_settings); + decoder_settings += " -mira -n-best-list - " + boost::lexical_cast(n) + " distinct"; + + vector decoder_params; + boost::split(decoder_params, decoder_settings, boost::is_any_of("\t ")); + + // bleu feature + decoder_params.push_back("-feature-add"); + + decoder_settings = "BleuScoreFeature tuneable=false references="; + if (trainWithMultipleFolds) { + decoder_settings += referenceFilesFolds[myFold]; + } else { + decoder_settings += referenceFiles[0]; + for (size_t i=1; i < referenceFiles.size(); ++i) { + decoder_settings += ","; + decoder_settings += referenceFiles[i]; + } + } + decoder_params.push_back(decoder_settings); + + string configFile = trainWithMultipleFolds? mosesConfigFilesFolds[myFold] : mosesConfigFile; + VERBOSE(1, "Rank " << rank << " reading config file from " << configFile << endl); + MosesDecoder* decoder = new MosesDecoder(configFile, verbosity, decoder_params.size(), decoder_params); + decoder->setBleuParameters(disableBleuFeature, sentenceBleu, scaleByInputLength, scaleByAvgInputLength, + scaleByInverseLength, scaleByAvgInverseLength, + scaleByX, historySmoothing, bleu_smoothing_scheme, simpleHistoryBleu); + bool chartDecoding = staticData.IsChart(); + + // Optionally shuffle the sentences + vector order; + if (trainWithMultipleFolds) { + for (size_t i = 0; i < inputSentencesFolds[myFold].size(); ++i) { + order.push_back(i); + } + } else { + if (rank == 0) { + for (size_t i = 0; i < inputSentences.size(); ++i) { + order.push_back(i); + } + } + } + + // initialise optimizer + Optimiser* optimiser = NULL; + if (learner == "mira") { + if (rank == 0) { + cerr << "Optimising using Mira" << endl; + cerr << "slack: " << slack << ", learning rate: " << mira_learning_rate << endl; + if (normaliseMargin) + cerr << "sigmoid parameter: " << sigmoidParam << endl; + } + optimiser = new MiraOptimiser(slack, scale_margin, scale_update, boost, normaliseMargin, sigmoidParam); + learning_rate = mira_learning_rate; + perceptron_update = false; + } else if (learner == "perceptron") { + if (rank == 0) { + cerr << "Optimising using Perceptron" << endl; + } + optimiser = new Perceptron(); + learning_rate = perceptron_learning_rate; + perceptron_update = true; + model_hope_fear = false; // mira only + hope_fear = false; // mira only + n = 1; + hope_n = 1; + fear_n = 1; + } else { + cerr << "Error: Unknown optimiser: " << learner << endl; + return 1; + } + + // resolve parameter dependencies + if (batchSize > 1 && perceptron_update) { + batchSize = 1; + cerr << "Info: Setting batch size to 1 for perceptron update" << endl; + } + + if (hope_n == 0) + hope_n = n; + if (fear_n == 0) + fear_n = n; + + if (model_hope_fear || kbest) + hope_fear = false; // is true by default + if (learner == "mira" && !(hope_fear || model_hope_fear || kbest)) { + cerr << "Error: Need to select one of parameters --hope-fear/--model-hope-fear/--kbest for mira update." << endl; + return 1; + } + +#ifdef MPI_ENABLE + if (!trainWithMultipleFolds) + mpi::broadcast(world, order, 0); +#endif + + // Create shards according to the number of processes used + vector shard; + if (trainWithMultipleFolds) { + size_t shardSize = order.size()/coresPerFold; + size_t shardStart = (size_t) (shardSize * (rank % coresPerFold)); + size_t shardEnd = shardStart + shardSize; + if (rank % coresPerFold == coresPerFold - 1) { // last rank of each fold + shardEnd = order.size(); + shardSize = shardEnd - shardStart; + } + VERBOSE(1, "Rank: " << rank << ", shard size: " << shardSize << endl); + VERBOSE(1, "Rank: " << rank << ", shard start: " << shardStart << " shard end: " << shardEnd << endl); + shard.resize(shardSize); + copy(order.begin() + shardStart, order.begin() + shardEnd, shard.begin()); + batchSize = 1; + } else { + size_t shardSize = order.size() / size; + size_t shardStart = (size_t) (shardSize * rank); + size_t shardEnd = (size_t) (shardSize * (rank + 1)); + if (rank == size - 1) { + shardEnd = order.size(); + shardSize = shardEnd - shardStart; + } + VERBOSE(1, "Rank: " << rank << " Shard size: " << shardSize << endl); + VERBOSE(1, "Rank: " << rank << " Shard start: " << shardStart << " Shard end: " << shardEnd << endl); + shard.resize(shardSize); + copy(order.begin() + shardStart, order.begin() + shardEnd, shard.begin()); + if (batchEqualsShard) + batchSize = shardSize; + } + + // get reference to feature functions + // const vector &featureFunctions = FeatureFunction::GetFeatureFunctions(); + ScoreComponentCollection initialWeights = decoder->getWeights(); + + if (add2lm != 0) { + const std::vector &statefulFFs = StatefulFeatureFunction::GetStatefulFeatureFunctions(); + for (size_t i = 0; i < statefulFFs.size(); ++i) { + const StatefulFeatureFunction *ff = statefulFFs[i]; + const LanguageModel *lm = dynamic_cast(ff); + + if (lm) { + float lmWeight = initialWeights.GetScoreForProducer(lm) + add2lm; + initialWeights.Assign(lm, lmWeight); + cerr << "Rank " << rank << ", add " << add2lm << " to lm weight." << endl; + } + } + } + + if (normaliseWeights) { + initialWeights.L1Normalise(); + cerr << "Rank " << rank << ", normalised initial weights: " << initialWeights << endl; + } + + decoder->setWeights(initialWeights); + + // set bleu weight to twice the size of the language model weight(s) + if (bleu_weight_lm) { + float lmSum = 0; + const std::vector &statefulFFs = StatefulFeatureFunction::GetStatefulFeatureFunctions(); + for (size_t i = 0; i < statefulFFs.size(); ++i) { + const StatefulFeatureFunction *ff = statefulFFs[i]; + const LanguageModel *lm = dynamic_cast(ff); + + if (lm) { + lmSum += abs(initialWeights.GetScoreForProducer(lm)); + } + } + + bleuWeight = lmSum * bleu_weight_lm_factor; + if (!kbest) cerr << "Set bleu weight to lm weight * " << bleu_weight_lm_factor << endl; + } + + // bleu weights can be set separately for hope and fear; otherwise they are both set to 'lm weight * bleu_weight_lm_factor' + if (bleuWeight_hope == -1) { + bleuWeight_hope = bleuWeight; + } + if (bleuWeight_fear == -1) { + bleuWeight_fear = bleuWeight; + } + bleuWeight_fear *= bleu_weight_fear_factor; + if (!kbest) { + cerr << "Bleu weight: " << bleuWeight << endl; + cerr << "Bleu weight fear: " << bleuWeight_fear << endl; + } + + if (decode_hope || decode_fear || decode_model) { + size_t decode = 1; + if (decode_fear) decode = 2; + if (decode_model) decode = 3; + decodeHopeOrFear(rank, size, decode, decode_filename, inputSentences, decoder, n, bleuWeight); + } + + //Main loop: + ScoreComponentCollection cumulativeWeights; // collect weights per epoch to produce an average + ScoreComponentCollection cumulativeWeightsBinary; + size_t numberOfUpdates = 0; + size_t numberOfUpdatesThisEpoch = 0; + + time_t now; + time(&now); + cerr << "Rank " << rank << ", " << ctime(&now); + + float avgInputLength = 0; + float sumOfInputs = 0; + size_t numberOfInputs = 0; + + ScoreComponentCollection mixedWeights; + ScoreComponentCollection mixedWeightsPrevious; + ScoreComponentCollection mixedWeightsBeforePrevious; + ScoreComponentCollection mixedAverageWeights; + ScoreComponentCollection mixedAverageWeightsPrevious; + ScoreComponentCollection mixedAverageWeightsBeforePrevious; + + bool stop = false; +// int sumStillViolatedConstraints; + float epsilon = 0.0001; + + // Variables for feature confidence + ScoreComponentCollection confidenceCounts, mixedConfidenceCounts, featureLearningRates; + featureLearningRates.UpdateLearningRates(decay_core, decay_sparse, confidenceCounts, core_r0, sparse_r0); //initialise core learning rates + cerr << "Initial learning rates, core: " << core_r0 << ", sparse: " << sparse_r0 << endl; + + for (size_t epoch = continue_epoch; epoch < epochs && !stop; ++epoch) { + if (shuffle) { + if (trainWithMultipleFolds || rank == 0) { + cerr << "Rank " << rank << ", epoch " << epoch << ", shuffling input sentences.." << endl; + RandomIndex rindex; + random_shuffle(order.begin(), order.end(), rindex); + } + +#ifdef MPI_ENABLE + if (!trainWithMultipleFolds) + mpi::broadcast(world, order, 0); +#endif + + // redo shards + if (trainWithMultipleFolds) { + size_t shardSize = order.size()/coresPerFold; + size_t shardStart = (size_t) (shardSize * (rank % coresPerFold)); + size_t shardEnd = shardStart + shardSize; + if (rank % coresPerFold == coresPerFold - 1) { // last rank of each fold + shardEnd = order.size(); + shardSize = shardEnd - shardStart; + } + VERBOSE(1, "Rank: " << rank << ", shard size: " << shardSize << endl); + VERBOSE(1, "Rank: " << rank << ", shard start: " << shardStart << " shard end: " << shardEnd << endl); + shard.resize(shardSize); + copy(order.begin() + shardStart, order.begin() + shardEnd, shard.begin()); + batchSize = 1; + } else { + size_t shardSize = order.size()/size; + size_t shardStart = (size_t) (shardSize * rank); + size_t shardEnd = (size_t) (shardSize * (rank + 1)); + if (rank == size - 1) { + shardEnd = order.size(); + shardSize = shardEnd - shardStart; + } + VERBOSE(1, "Shard size: " << shardSize << endl); + VERBOSE(1, "Rank: " << rank << " Shard start: " << shardStart << " Shard end: " << shardEnd << endl); + shard.resize(shardSize); + copy(order.begin() + shardStart, order.begin() + shardEnd, shard.begin()); + if (batchEqualsShard) + batchSize = shardSize; + } + } + + // sum of violated constraints in an epoch + // sumStillViolatedConstraints = 0; + + numberOfUpdatesThisEpoch = 0; + // Sum up weights over one epoch, final average uses weights from last epoch + if (!accumulateWeights) { + cumulativeWeights.ZeroAll(); + cumulativeWeightsBinary.ZeroAll(); + } + + // number of weight dumps this epoch + size_t weightMixingThisEpoch = 0; + size_t weightEpochDump = 0; + + size_t shardPosition = 0; + vector::const_iterator sid = shard.begin(); + while (sid != shard.end()) { + // feature values for hypotheses i,j (matrix: batchSize x 3*n x featureValues) + vector > featureValues; + vector > bleuScores; + vector > modelScores; + + // variables for hope-fear/perceptron setting + vector > featureValuesHope; + vector > featureValuesFear; + vector > bleuScoresHope; + vector > bleuScoresFear; + vector > modelScoresHope; + vector > modelScoresFear; + + // get moses weights + ScoreComponentCollection mosesWeights = decoder->getWeights(); + VERBOSE(1, "\nRank " << rank << ", epoch " << epoch << ", weights: " << mosesWeights << endl); + + if (historyBleu || simpleHistoryBleu) { + decoder->printBleuFeatureHistory(cerr); + } + + // BATCHING: produce nbest lists for all input sentences in batch + vector oracleBleuScores; + vector oracleModelScores; + vector > oneBests; + vector oracleFeatureValues; + vector inputLengths; + vector ref_ids; + size_t actualBatchSize = 0; + + size_t examples_in_batch = 0; + bool skip_example = false; + for (size_t batchPosition = 0; batchPosition < batchSize && sid + != shard.end(); ++batchPosition) { + string input; + if (trainWithMultipleFolds) + input = inputSentencesFolds[myFold][*sid]; + else + input = inputSentences[*sid]; + + Moses::Sentence *sentence = new Sentence(); + stringstream in(input + "\n"); + const vector inputFactorOrder = staticData.GetInputFactorOrder(); + sentence->Read(in,inputFactorOrder); + cerr << "\nRank " << rank << ", epoch " << epoch << ", input sentence " << *sid << ": \""; + sentence->Print(cerr); + cerr << "\"" << " (batch pos " << batchPosition << ")" << endl; + size_t current_input_length = (*sentence).GetSize(); + + if (epoch == 0 && (scaleByAvgInputLength || scaleByAvgInverseLength)) { + sumOfInputs += current_input_length; + ++numberOfInputs; + avgInputLength = sumOfInputs/numberOfInputs; + decoder->setAvgInputLength(avgInputLength); + cerr << "Rank " << rank << ", epoch 0, average input length: " << avgInputLength << endl; + } + + vector newFeatureValues; + vector newScores; + if (model_hope_fear) { + featureValues.push_back(newFeatureValues); + bleuScores.push_back(newScores); + modelScores.push_back(newScores); + } + if (hope_fear || perceptron_update) { + featureValuesHope.push_back(newFeatureValues); + featureValuesFear.push_back(newFeatureValues); + bleuScoresHope.push_back(newScores); + bleuScoresFear.push_back(newScores); + modelScoresHope.push_back(newScores); + modelScoresFear.push_back(newScores); + if (historyBleu || simpleHistoryBleu || debug_model) { + featureValues.push_back(newFeatureValues); + bleuScores.push_back(newScores); + modelScores.push_back(newScores); + } + } + if (kbest) { + // for decoding + featureValues.push_back(newFeatureValues); + bleuScores.push_back(newScores); + modelScores.push_back(newScores); + + // for storing selected examples + featureValuesHope.push_back(newFeatureValues); + featureValuesFear.push_back(newFeatureValues); + bleuScoresHope.push_back(newScores); + bleuScoresFear.push_back(newScores); + modelScoresHope.push_back(newScores); + modelScoresFear.push_back(newScores); + } + + size_t ref_length; + float avg_ref_length; + + if (print_weights) + cerr << "Rank " << rank << ", epoch " << epoch << ", current weights: " << mosesWeights << endl; + if (print_core_weights) { + cerr << "Rank " << rank << ", epoch " << epoch << ", current weights: "; + mosesWeights.PrintCoreFeatures(); + cerr << endl; + } + + // check LM weight + const std::vector &statefulFFs = StatefulFeatureFunction::GetStatefulFeatureFunctions(); + for (size_t i = 0; i < statefulFFs.size(); ++i) { + const StatefulFeatureFunction *ff = statefulFFs[i]; + const LanguageModel *lm = dynamic_cast(ff); + + if (lm) { + float lmWeight = mosesWeights.GetScoreForProducer(lm); + cerr << "Rank " << rank << ", epoch " << epoch << ", lm weight: " << lmWeight << endl; + if (lmWeight <= 0) { + cerr << "Rank " << rank << ", epoch " << epoch << ", ERROR: language model weight should never be <= 0." << endl; + mosesWeights.Assign(lm, 0.1); + cerr << "Rank " << rank << ", epoch " << epoch << ", assign lm weights of 0.1" << endl; + } + } + } + + // select inference scheme + cerr << "Rank " << rank << ", epoch " << epoch << ", real Bleu? " << realBleu << endl; + if (hope_fear || perceptron_update) { + // HOPE + cerr << "Rank " << rank << ", epoch " << epoch << ", " << hope_n << + "best hope translations" << endl; + vector< vector > outputHope = decoder->getNBest(input, *sid, hope_n, 1.0, bleuWeight_hope, + featureValuesHope[batchPosition], bleuScoresHope[batchPosition], modelScoresHope[batchPosition], + 1, realBleu, distinctNbest, avgRefLength, rank, epoch, ""); + vector oracle = outputHope[0]; + decoder->cleanup(chartDecoding); + ref_length = decoder->getClosestReferenceLength(*sid, oracle.size()); + avg_ref_length = ref_length; + float hope_length_ratio = (float)oracle.size()/ref_length; + cerr << endl; + + // count sparse features occurring in hope translation + featureValuesHope[batchPosition][0].IncrementSparseHopeFeatures(); + + vector bestModel; + if (debug_model || historyBleu || simpleHistoryBleu) { + // MODEL (for updating the history only, using dummy vectors) + cerr << "Rank " << rank << ", epoch " << epoch << ", 1best wrt model score (debug or history)" << endl; + vector< vector > outputModel = decoder->getNBest(input, *sid, n, 0.0, bleuWeight, + featureValues[batchPosition], bleuScores[batchPosition], modelScores[batchPosition], + 1, realBleu, distinctNbest, avgRefLength, rank, epoch, ""); + bestModel = outputModel[0]; + decoder->cleanup(chartDecoding); + cerr << endl; + ref_length = decoder->getClosestReferenceLength(*sid, bestModel.size()); + } + + // FEAR + //float fear_length_ratio = 0; + float bleuRatioHopeFear = 0; + //int fearSize = 0; + cerr << "Rank " << rank << ", epoch " << epoch << ", " << fear_n << "best fear translations" << endl; + vector< vector > outputFear = decoder->getNBest(input, *sid, fear_n, -1.0, bleuWeight_fear, + featureValuesFear[batchPosition], bleuScoresFear[batchPosition], modelScoresFear[batchPosition], + 1, realBleu, distinctNbest, avgRefLength, rank, epoch, ""); + vector fear = outputFear[0]; + decoder->cleanup(chartDecoding); + ref_length = decoder->getClosestReferenceLength(*sid, fear.size()); + avg_ref_length += ref_length; + avg_ref_length /= 2; + //fear_length_ratio = (float)fear.size()/ref_length; + //fearSize = (int)fear.size(); + cerr << endl; + for (size_t i = 0; i < fear.size(); ++i) + delete fear[i]; + + // count sparse features occurring in fear translation + featureValuesFear[batchPosition][0].IncrementSparseFearFeatures(); + + // Bleu-related example selection + bool skip = false; + bleuRatioHopeFear = bleuScoresHope[batchPosition][0] / bleuScoresFear[batchPosition][0]; + if (minBleuRatio != -1 && bleuRatioHopeFear < minBleuRatio) + skip = true; + if(maxBleuRatio != -1 && bleuRatioHopeFear > maxBleuRatio) + skip = true; + + // sanity check + if (historyBleu || simpleHistoryBleu) { + if (bleuScores[batchPosition][0] > bleuScoresHope[batchPosition][0] && + modelScores[batchPosition][0] > modelScoresHope[batchPosition][0]) { + if (abs(bleuScores[batchPosition][0] - bleuScoresHope[batchPosition][0]) > epsilon && + abs(modelScores[batchPosition][0] - modelScoresHope[batchPosition][0]) > epsilon) { + cerr << "Rank " << rank << ", epoch " << epoch << ", ERROR: MODEL translation better than HOPE translation." << endl; + skip = true; + } + } + if (bleuScoresFear[batchPosition][0] > bleuScores[batchPosition][0] && + modelScoresFear[batchPosition][0] > modelScores[batchPosition][0]) { + if (abs(bleuScoresFear[batchPosition][0] - bleuScores[batchPosition][0]) > epsilon && + abs(modelScoresFear[batchPosition][0] - modelScores[batchPosition][0]) > epsilon) { + cerr << "Rank " << rank << ", epoch " << epoch << ", ERROR: FEAR translation better than MODEL translation." << endl; + skip = true; + } + } + } + if (bleuScoresFear[batchPosition][0] > bleuScoresHope[batchPosition][0]) { + if (abs(bleuScoresFear[batchPosition][0] - bleuScoresHope[batchPosition][0]) > epsilon) { + // check if it's an error or a warning + skip = true; + if (modelScoresFear[batchPosition][0] > modelScoresHope[batchPosition][0] && abs(modelScoresFear[batchPosition][0] - modelScoresHope[batchPosition][0]) > epsilon) { + cerr << "Rank " << rank << ", epoch " << epoch << ", ERROR: FEAR translation better than HOPE translation. (abs-diff: " << abs(bleuScoresFear[batchPosition][0] - bleuScoresHope[batchPosition][0]) << ")" <getNBest(input, *sid, n, 1.0, bleuWeight_hope, + featureValues[batchPosition], bleuScores[batchPosition], modelScores[batchPosition], + 0, realBleu, distinctNbest, avgRefLength, rank, epoch, ""); + //vector oracle = outputHope[0]; + // needed for history + inputLengths.push_back(current_input_length); + ref_ids.push_back(*sid); + decoder->cleanup(chartDecoding); + //ref_length = decoder->getClosestReferenceLength(*sid, oracle.size()); + //float hope_length_ratio = (float)oracle.size()/ref_length; + cerr << endl; + + oracleFeatureValues.push_back(featureValues[batchPosition][oraclePos]); + oracleBleuScores.push_back(bleuScores[batchPosition][oraclePos]); + oracleModelScores.push_back(modelScores[batchPosition][oraclePos]); + + // MODEL + cerr << "Rank " << rank << ", epoch " << epoch << ", " << n << "best wrt model score" << endl; + if (historyBleu || simpleHistoryBleu) { + vector< vector > outputModel = decoder->getNBest(input, *sid, n, 0.0, + bleuWeight, featureValues[batchPosition], bleuScores[batchPosition], + modelScores[batchPosition], 1, realBleu, distinctNbest, avgRefLength, rank, epoch, ""); + vector bestModel = outputModel[0]; + oneBests.push_back(bestModel); + inputLengths.push_back(current_input_length); + ref_ids.push_back(*sid); + } else { + decoder->getNBest(input, *sid, n, 0.0, bleuWeight, + featureValues[batchPosition], bleuScores[batchPosition], modelScores[batchPosition], + 0, realBleu, distinctNbest, avgRefLength, rank, epoch, ""); + } + decoder->cleanup(chartDecoding); + //ref_length = decoder->getClosestReferenceLength(*sid, bestModel.size()); + //float model_length_ratio = (float)bestModel.size()/ref_length; + cerr << endl; + + // FEAR + cerr << "Rank " << rank << ", epoch " << epoch << ", " << n << "best fear translations" << endl; + decoder->getNBest(input, *sid, n, -1.0, bleuWeight_fear, + featureValues[batchPosition], bleuScores[batchPosition], modelScores[batchPosition], + 0, realBleu, distinctNbest, avgRefLength, rank, epoch, ""); + decoder->cleanup(chartDecoding); + //ref_length = decoder->getClosestReferenceLength(*sid, fear.size()); + //float fear_length_ratio = (float)fear.size()/ref_length; + + examples_in_batch++; + } + if (kbest) { + // MODEL + cerr << "Rank " << rank << ", epoch " << epoch << ", " << n << "best wrt model score" << endl; + if (historyBleu || simpleHistoryBleu) { + vector< vector > outputModel = decoder->getNBest(input, *sid, n, 0.0, + bleuWeight, featureValues[batchPosition], bleuScores[batchPosition], + modelScores[batchPosition], 1, realBleu, distinctNbest, avgRefLength, rank, epoch, ""); + vector bestModel = outputModel[0]; + oneBests.push_back(bestModel); + inputLengths.push_back(current_input_length); + ref_ids.push_back(*sid); + } else { + decoder->getNBest(input, *sid, n, 0.0, bleuWeight, + featureValues[batchPosition], bleuScores[batchPosition], + modelScores[batchPosition], 0, realBleu, distinctNbest, avgRefLength, rank, epoch, ""); + } + decoder->cleanup(chartDecoding); + //ref_length = decoder->getClosestReferenceLength(*sid, bestModel.size()); + //float model_length_ratio = (float)bestModel.size()/ref_length; + cerr << endl; + + examples_in_batch++; + + HypothesisQueue queueHope(hope_n); + HypothesisQueue queueFear(fear_n); + cerr << endl; + if (most_violated || all_violated) { + float bleuHope = -1000; + float bleuFear = 1000; + int indexHope = -1; + int indexFear = -1; + + vector bleuHopeList; + vector bleuFearList; + vector indexHopeList; + vector indexFearList; + + if (most_violated) + cerr << "Rank " << rank << ", epoch " << epoch << ", pick pair with most violated constraint" << endl; + else if (all_violated) + cerr << "Rank " << rank << ", epoch " << epoch << ", pick all pairs with violated constraints"; + else + cerr << "Rank " << rank << ", epoch " << epoch << ", pick all pairs with hope"; + + // find best hope, then find fear that violates our constraint most + for (size_t i=0; i modelScores[batchPosition][indexHope]) { + if (abs(modelScores[batchPosition][i] - modelScores[batchPosition][indexHope]) > epsilon) { + // better model score + bleuHope = bleuScores[batchPosition][i]; + indexHope = i; + } + } + } else if (bleuScores[batchPosition][i] > bleuHope) { // better than current best + bleuHope = bleuScores[batchPosition][i]; + indexHope = i; + } + } + + float currentViolation = 0; + for (size_t i=0; i epsilon) && (modelDiff < bleuDiff)) { + float diff = bleuDiff - modelDiff; + if (diff > epsilon) { + if (all_violated) { + cerr << ".. adding pair"; + bleuHopeList.push_back(bleuHope); + bleuFearList.push_back(bleuScores[batchPosition][i]); + indexHopeList.push_back(indexHope); + indexFearList.push_back(i); + } else if (most_violated && diff > currentViolation) { + currentViolation = diff; + bleuFear = bleuScores[batchPosition][i]; + indexFear = i; + cerr << "Rank " << rank << ", epoch " << epoch << ", current violation: " << currentViolation << " (" << modelDiff << " >= " << bleuDiff << ")" << endl; + } + } + } + } + + if (most_violated) { + if (currentViolation > 0) { + cerr << "Rank " << rank << ", epoch " << epoch << ", adding pair with violation " << currentViolation << endl; + cerr << "Rank " << rank << ", epoch " << epoch << ", hope: " << bleuHope << " (" << indexHope << "), fear: " << bleuFear << " (" << indexFear << ")" << endl; + bleuScoresHope[batchPosition].push_back(bleuHope); + bleuScoresFear[batchPosition].push_back(bleuFear); + featureValuesHope[batchPosition].push_back(featureValues[batchPosition][indexHope]); + featureValuesFear[batchPosition].push_back(featureValues[batchPosition][indexFear]); + float modelScoreHope = modelScores[batchPosition][indexHope]; + float modelScoreFear = modelScores[batchPosition][indexFear]; + if (most_violated_reg) { + // reduce model score difference by factor ~0.5 + float reg = currentViolation/4; + modelScoreHope += abs(reg); + modelScoreFear -= abs(reg); + float newViolation = (bleuHope - bleuFear) - (modelScoreHope - modelScoreFear); + cerr << "Rank " << rank << ", epoch " << epoch << ", regularized violation: " << newViolation << endl; + } + modelScoresHope[batchPosition].push_back(modelScoreHope); + modelScoresFear[batchPosition].push_back(modelScoreFear); + + featureValues[batchPosition][indexHope].IncrementSparseHopeFeatures(); + featureValues[batchPosition][indexFear].IncrementSparseFearFeatures(); + } else { + cerr << "Rank " << rank << ", epoch " << epoch << ", no violated constraint found." << endl; + skip_example = 1; + } + } else cerr << endl; + } + if (max_bleu_diff) { + cerr << "Rank " << rank << ", epoch " << epoch << ", pick pair with max Bleu diff from list: " << bleuScores[batchPosition].size() << endl; + for (size_t i=0; i hopeList, fearList; + for (size_t i=0; i > losses(actualBatchSize); + if (model_hope_fear) { + // Set loss for each sentence as BLEU(oracle) - BLEU(hypothesis) + for (size_t batchPosition = 0; batchPosition < actualBatchSize; ++batchPosition) { + for (size_t j = 0; j < bleuScores[batchPosition].size(); ++j) { + losses[batchPosition].push_back(oracleBleuScores[batchPosition] - bleuScores[batchPosition][j]); + } + } + } + + // set weight for bleu feature to 0 before optimizing + vector::const_iterator iter; + const vector &featureFunctions2 = FeatureFunction::GetFeatureFunctions(); + for (iter = featureFunctions2.begin(); iter != featureFunctions2.end(); ++iter) { + if ((*iter)->GetScoreProducerDescription() == "BleuScoreFeature") { + mosesWeights.Assign(*iter, 0); + break; + } + } + + // scale LM feature (to avoid rapid changes) + if (scale_lm) { + cerr << "scale lm" << endl; + const std::vector &statefulFFs = StatefulFeatureFunction::GetStatefulFeatureFunctions(); + for (size_t i = 0; i < statefulFFs.size(); ++i) { + const StatefulFeatureFunction *ff = statefulFFs[i]; + const LanguageModel *lm = dynamic_cast(ff); + + if (lm) { + // scale down score + if (model_hope_fear) { + scaleFeatureScore(lm, scale_lm_factor, featureValues, rank, epoch); + } else { + scaleFeatureScore(lm, scale_lm_factor, featureValuesHope, rank, epoch); + scaleFeatureScore(lm, scale_lm_factor, featureValuesFear, rank, epoch); + } + } + } + } + + // scale WP + if (scale_wp) { + // scale up weight + WordPenaltyProducer &wp = WordPenaltyProducer::InstanceNonConst(); + + // scale down score + if (model_hope_fear) { + scaleFeatureScore(&wp, scale_wp_factor, featureValues, rank, epoch); + } else { + scaleFeatureScore(&wp, scale_wp_factor, featureValuesHope, rank, epoch); + scaleFeatureScore(&wp, scale_wp_factor, featureValuesFear, rank, epoch); + } + } + + // print out the feature values + if (print_feature_values) { + cerr << "\nRank " << rank << ", epoch " << epoch << ", feature values: " << endl; + if (model_hope_fear) printFeatureValues(featureValues); + else { + cerr << "hope: " << endl; + printFeatureValues(featureValuesHope); + cerr << "fear: " << endl; + printFeatureValues(featureValuesFear); + } + } + + // apply learning rates to feature vectors before optimization + if (feature_confidence) { + cerr << "Rank " << rank << ", epoch " << epoch << ", apply feature learning rates with decays " << decay_core << "/" << decay_sparse << ": " << featureLearningRates << endl; + if (model_hope_fear) { + applyPerFeatureLearningRates(featureValues, featureLearningRates, sparse_r0); + } else { + applyPerFeatureLearningRates(featureValuesHope, featureLearningRates, sparse_r0); + applyPerFeatureLearningRates(featureValuesFear, featureLearningRates, sparse_r0); + } + } else { + // apply fixed learning rates + cerr << "Rank " << rank << ", epoch " << epoch << ", apply fixed learning rates, core: " << core_r0 << ", sparse: " << sparse_r0 << endl; + if (core_r0 != 1.0 || sparse_r0 != 1.0) { + if (model_hope_fear) { + applyLearningRates(featureValues, core_r0, sparse_r0); + } else { + applyLearningRates(featureValuesHope, core_r0, sparse_r0); + applyLearningRates(featureValuesFear, core_r0, sparse_r0); + } + } + } + + // Run optimiser on batch: + VERBOSE(1, "\nRank " << rank << ", epoch " << epoch << ", run optimiser:" << endl); + size_t update_status = 1; + ScoreComponentCollection weightUpdate; + if (perceptron_update) { + vector > dummy1; + update_status = optimiser->updateWeightsHopeFear( weightUpdate, featureValuesHope, + featureValuesFear, dummy1, dummy1, dummy1, dummy1, learning_rate, rank, epoch); + } else if (hope_fear) { + if (bleuScoresHope[0][0] >= min_oracle_bleu) { + if (hope_n == 1 && fear_n ==1 && batchSize == 1 && !hildreth) { + update_status = ((MiraOptimiser*) optimiser)->updateWeightsAnalytically(weightUpdate, + featureValuesHope[0][0], featureValuesFear[0][0], bleuScoresHope[0][0], + bleuScoresFear[0][0], modelScoresHope[0][0], modelScoresFear[0][0], learning_rate, rank, epoch); + } else + update_status = optimiser->updateWeightsHopeFear(weightUpdate, featureValuesHope, + featureValuesFear, bleuScoresHope, bleuScoresFear, modelScoresHope, + modelScoresFear, learning_rate, rank, epoch); + } else + update_status = 1; + } else if (kbest) { + if (batchSize == 1 && featureValuesHope[0].size() == 1 && !hildreth) { + cerr << "Rank " << rank << ", epoch " << epoch << ", model score hope: " << modelScoresHope[0][0] << endl; + cerr << "Rank " << rank << ", epoch " << epoch << ", model score fear: " << modelScoresFear[0][0] << endl; + update_status = ((MiraOptimiser*) optimiser)->updateWeightsAnalytically( + weightUpdate, featureValuesHope[0][0], featureValuesFear[0][0], + bleuScoresHope[0][0], bleuScoresFear[0][0], modelScoresHope[0][0], + modelScoresFear[0][0], learning_rate, rank, epoch); + } else { + cerr << "Rank " << rank << ", epoch " << epoch << ", model score hope: " << modelScoresHope[0][0] << endl; + cerr << "Rank " << rank << ", epoch " << epoch << ", model score fear: " << modelScoresFear[0][0] << endl; + update_status = optimiser->updateWeightsHopeFear(weightUpdate, featureValuesHope, + featureValuesFear, bleuScoresHope, bleuScoresFear, modelScoresHope, + modelScoresFear, learning_rate, rank, epoch); + } + } else { + // model_hope_fear + update_status = ((MiraOptimiser*) optimiser)->updateWeights(weightUpdate, + featureValues, losses, bleuScores, modelScores, oracleFeatureValues, + oracleBleuScores, oracleModelScores, learning_rate, rank, epoch); + } + + // sumStillViolatedConstraints += update_status; + + if (update_status == 0) { // if weights were updated + // apply weight update + if (debug) + cerr << "Rank " << rank << ", epoch " << epoch << ", update: " << weightUpdate << endl; + + if (feature_confidence) { + // update confidence counts based on weight update + confidenceCounts.UpdateConfidenceCounts(weightUpdate, signed_counts); + + // update feature learning rates + featureLearningRates.UpdateLearningRates(decay_core, decay_sparse, confidenceCounts, core_r0, sparse_r0); + } + + // apply weight update to Moses weights + mosesWeights.PlusEquals(weightUpdate); + + if (normaliseWeights) + mosesWeights.L1Normalise(); + + cumulativeWeights.PlusEquals(mosesWeights); + if (sparseAverage) { + ScoreComponentCollection binary; + binary.SetToBinaryOf(mosesWeights); + cumulativeWeightsBinary.PlusEquals(binary); + } + + ++numberOfUpdates; + ++numberOfUpdatesThisEpoch; + if (averageWeights) { + ScoreComponentCollection averageWeights(cumulativeWeights); + if (accumulateWeights) { + averageWeights.DivideEquals(numberOfUpdates); + } else { + averageWeights.DivideEquals(numberOfUpdatesThisEpoch); + } + + mosesWeights = averageWeights; + } + + // set new Moses weights + decoder->setWeights(mosesWeights); + //cerr << "Rank " << rank << ", epoch " << epoch << ", new weights: " << mosesWeights << endl; + } + + // update history (for approximate document Bleu) + if (historyBleu || simpleHistoryBleu) { + for (size_t i = 0; i < oneBests.size(); ++i) + cerr << "Rank " << rank << ", epoch " << epoch << ", update history with 1best length: " << oneBests[i].size() << " "; + decoder->updateHistory(oneBests, inputLengths, ref_ids, rank, epoch); + deleteTranslations(oneBests); + } + } // END TRANSLATE AND UPDATE BATCH + + // size of all shards except for the last one + size_t generalShardSize; + if (trainWithMultipleFolds) + generalShardSize = order.size()/coresPerFold; + else + generalShardSize = order.size()/size; + + size_t mixing_base = mixingFrequency == 0 ? 0 : generalShardSize / mixingFrequency; + size_t dumping_base = weightDumpFrequency == 0 ? 0 : generalShardSize / weightDumpFrequency; + bool mix = evaluateModulo(shardPosition, mixing_base, actualBatchSize); + + // mix weights? + if (mix) { +#ifdef MPI_ENABLE + cerr << "Rank " << rank << ", epoch " << epoch << ", mixing weights.. " << endl; + // collect all weights in mixedWeights and divide by number of processes + mpi::reduce(world, mosesWeights, mixedWeights, SCCPlus(), 0); + + // mix confidence counts + //mpi::reduce(world, confidenceCounts, mixedConfidenceCounts, SCCPlus(), 0); + ScoreComponentCollection totalBinary; + if (sparseAverage) { + ScoreComponentCollection binary; + binary.SetToBinaryOf(mosesWeights); + mpi::reduce(world, binary, totalBinary, SCCPlus(), 0); + } + if (rank == 0) { + // divide by number of processes + if (sparseNoAverage) + mixedWeights.CoreDivideEquals(size); // average only core weights + else if (sparseAverage) + mixedWeights.DivideEquals(totalBinary); + else + mixedWeights.DivideEquals(size); + + // divide confidence counts + //mixedConfidenceCounts.DivideEquals(size); + + // normalise weights after averaging + if (normaliseWeights) { + mixedWeights.L1Normalise(); + } + + ++weightMixingThisEpoch; + + if (pruneZeroWeights) { + size_t pruned = mixedWeights.PruneZeroWeightFeatures(); + cerr << "Rank " << rank << ", epoch " << epoch << ", " + << pruned << " zero-weighted features pruned from mixedWeights." << endl; + + pruned = cumulativeWeights.PruneZeroWeightFeatures(); + cerr << "Rank " << rank << ", epoch " << epoch << ", " + << pruned << " zero-weighted features pruned from cumulativeWeights." << endl; + } + + if (featureCutoff != -1 && weightMixingThisEpoch == mixingFrequency) { + size_t pruned = mixedWeights.PruneSparseFeatures(featureCutoff); + cerr << "Rank " << rank << ", epoch " << epoch << ", " + << pruned << " features pruned from mixedWeights." << endl; + + pruned = cumulativeWeights.PruneSparseFeatures(featureCutoff); + cerr << "Rank " << rank << ", epoch " << epoch << ", " + << pruned << " features pruned from cumulativeWeights." << endl; + } + + if (weightMixingThisEpoch == mixingFrequency || reg_on_every_mix) { + if (l1_regularize) { + size_t pruned; + if (l1_reg_sparse) + pruned = mixedWeights.SparseL1Regularize(l1_lambda); + else + pruned = mixedWeights.L1Regularize(l1_lambda); + cerr << "Rank " << rank << ", epoch " << epoch << ", " + << "l1-reg. on mixedWeights with lambda=" << l1_lambda << ", pruned: " << pruned << endl; + } + if (l2_regularize) { + if (l2_reg_sparse) + mixedWeights.SparseL2Regularize(l2_lambda); + else + mixedWeights.L2Regularize(l2_lambda); + cerr << "Rank " << rank << ", epoch " << epoch << ", " + << "l2-reg. on mixedWeights with lambda=" << l2_lambda << endl; + } + } + } + + // broadcast average weights from process 0 + mpi::broadcast(world, mixedWeights, 0); + decoder->setWeights(mixedWeights); + mosesWeights = mixedWeights; + + // broadcast summed confidence counts + //mpi::broadcast(world, mixedConfidenceCounts, 0); + //confidenceCounts = mixedConfidenceCounts; +#endif +#ifndef MPI_ENABLE + //cerr << "\nRank " << rank << ", no mixing, weights: " << mosesWeights << endl; + mixedWeights = mosesWeights; +#endif + } // end mixing + + // Dump weights? + if (trainWithMultipleFolds || weightEpochDump == weightDumpFrequency) { + // dump mixed weights at end of every epoch to enable continuing a crashed experiment + // (for jackknife every time the weights are mixed) + ostringstream filename; + if (epoch < 10) + filename << weightDumpStem << "_mixed_0" << epoch; + else + filename << weightDumpStem << "_mixed_" << epoch; + + if (weightDumpFrequency > 1) + filename << "_" << weightEpochDump; + + mixedWeights.Save(filename.str()); + cerr << "Dumping mixed weights during epoch " << epoch << " to " << filename.str() << endl << endl; + } + if (dumpMixedWeights) { + if (mix && rank == 0 && !weightDumpStem.empty()) { + // dump mixed weights instead of average weights + ostringstream filename; + if (epoch < 10) + filename << weightDumpStem << "_0" << epoch; + else + filename << weightDumpStem << "_" << epoch; + + if (weightDumpFrequency > 1) + filename << "_" << weightEpochDump; + + cerr << "Dumping mixed weights during epoch " << epoch << " to " << filename.str() << endl << endl; + mixedWeights.Save(filename.str()); + ++weightEpochDump; + } + } else { + if (evaluateModulo(shardPosition, dumping_base, actualBatchSize)) { + cerr << "Rank " << rank << ", epoch " << epoch << ", dump weights.. (pos: " << shardPosition << ", base: " << dumping_base << ")" << endl; + ScoreComponentCollection tmpAverageWeights(cumulativeWeights); + bool proceed = false; + if (accumulateWeights) { + if (numberOfUpdates > 0) { + tmpAverageWeights.DivideEquals(numberOfUpdates); + proceed = true; + } + } else { + if (numberOfUpdatesThisEpoch > 0) { + if (sparseNoAverage) // average only core weights + tmpAverageWeights.CoreDivideEquals(numberOfUpdatesThisEpoch); + else if (sparseAverage) + tmpAverageWeights.DivideEquals(cumulativeWeightsBinary); + else + tmpAverageWeights.DivideEquals(numberOfUpdatesThisEpoch); + proceed = true; + } + } + + if (proceed) { +#ifdef MPI_ENABLE + // average across processes + mpi::reduce(world, tmpAverageWeights, mixedAverageWeights, SCCPlus(), 0); + ScoreComponentCollection totalBinary; + if (sparseAverage) { + ScoreComponentCollection binary; + binary.SetToBinaryOf(mosesWeights); + mpi::reduce(world, binary, totalBinary, SCCPlus(), 0); + } +#endif +#ifndef MPI_ENABLE + mixedAverageWeights = tmpAverageWeights; + //FIXME: What do to for non-mpi version + ScoreComponentCollection totalBinary; +#endif + if (rank == 0 && !weightDumpStem.empty()) { + // divide by number of processes + if (sparseNoAverage) + mixedAverageWeights.CoreDivideEquals(size); // average only core weights + else if (sparseAverage) + mixedAverageWeights.DivideEquals(totalBinary); + else + mixedAverageWeights.DivideEquals(size); + + // normalise weights after averaging + if (normaliseWeights) { + mixedAverageWeights.L1Normalise(); + } + + // dump final average weights + ostringstream filename; + if (epoch < 10) { + filename << weightDumpStem << "_0" << epoch; + } else { + filename << weightDumpStem << "_" << epoch; + } + + if (weightDumpFrequency > 1) { + filename << "_" << weightEpochDump; + } + + /*if (accumulateWeights) { + cerr << "\nMixed average weights (cumulative) during epoch " << epoch << ": " << mixedAverageWeights << endl; + } else { + cerr << "\nMixed average weights during epoch " << epoch << ": " << mixedAverageWeights << endl; + }*/ + + cerr << "Dumping mixed average weights during epoch " << epoch << " to " << filename.str() << endl << endl; + mixedAverageWeights.Save(filename.str()); + ++weightEpochDump; + + if (weightEpochDump == weightDumpFrequency) { + if (l1_regularize) { + size_t pruned = mixedAverageWeights.SparseL1Regularize(l1_lambda); + cerr << "Rank " << rank << ", epoch " << epoch << ", " + << "l1-reg. on mixedAverageWeights with lambda=" << l1_lambda << ", pruned: " << pruned << endl; + + } + if (l2_regularize) { + mixedAverageWeights.SparseL2Regularize(l2_lambda); + cerr << "Rank " << rank << ", epoch " << epoch << ", " + << "l2-reg. on mixedAverageWeights with lambda=" << l2_lambda << endl; + } + + if (l1_regularize || l2_regularize) { + filename << "_reg"; + cerr << "Dumping regularized mixed average weights during epoch " << epoch << " to " << filename.str() << endl << endl; + mixedAverageWeights.Save(filename.str()); + } + } + + if (weightEpochDump == weightDumpFrequency && printFeatureCounts) { + // print out all features with counts + stringstream s1, s2; + s1 << "sparse_feature_hope_counts" << "_" << epoch; + s2 << "sparse_feature_fear_counts" << "_" << epoch; + ofstream sparseFeatureCountsHope(s1.str().c_str()); + ofstream sparseFeatureCountsFear(s2.str().c_str()); + + mixedAverageWeights.PrintSparseHopeFeatureCounts(sparseFeatureCountsHope); + mixedAverageWeights.PrintSparseFearFeatureCounts(sparseFeatureCountsFear); + sparseFeatureCountsHope.close(); + sparseFeatureCountsFear.close(); + } + } + } + }// end dumping + } // end if dump + } // end of shard loop, end of this epoch + cerr << "Rank " << rank << ", epoch " << epoch << ", end of epoch.." << endl; + + if (historyBleu || simpleHistoryBleu) { + cerr << "Bleu feature history after epoch " << epoch << endl; + decoder->printBleuFeatureHistory(cerr); + } + // cerr << "Rank " << rank << ", epoch " << epoch << ", sum of violated constraints: " << sumStillViolatedConstraints << endl; + + // Check whether there were any weight updates during this epoch + size_t sumUpdates; + size_t *sendbuf_uint, *recvbuf_uint; + sendbuf_uint = (size_t *) malloc(sizeof(size_t)); + recvbuf_uint = (size_t *) malloc(sizeof(size_t)); +#ifdef MPI_ENABLE + sendbuf_uint[0] = numberOfUpdatesThisEpoch; + recvbuf_uint[0] = 0; + MPI_Reduce(sendbuf_uint, recvbuf_uint, 1, MPI_UNSIGNED, MPI_SUM, 0, world); + sumUpdates = recvbuf_uint[0]; +#endif +#ifndef MPI_ENABLE + sumUpdates = numberOfUpdatesThisEpoch; +#endif + if (rank == 0 && sumUpdates == 0) { + cerr << "\nNo weight updates during this epoch.. stopping." << endl; + stop = true; +#ifdef MPI_ENABLE + mpi::broadcast(world, stop, 0); +#endif + } + + if (!stop) { + // Test if weights have converged + if (weightConvergence) { + bool reached = true; + if (rank == 0 && (epoch >= 2)) { + ScoreComponentCollection firstDiff, secondDiff; + if (dumpMixedWeights) { + firstDiff = mixedWeights; + firstDiff.MinusEquals(mixedWeightsPrevious); + secondDiff = mixedWeights; + secondDiff.MinusEquals(mixedWeightsBeforePrevious); + } else { + firstDiff = mixedAverageWeights; + firstDiff.MinusEquals(mixedAverageWeightsPrevious); + secondDiff = mixedAverageWeights; + secondDiff.MinusEquals(mixedAverageWeightsBeforePrevious); + } + VERBOSE(1, "Average weight changes since previous epoch: " << firstDiff << " (max: " << firstDiff.GetLInfNorm() << ")" << endl); + VERBOSE(1, "Average weight changes since before previous epoch: " << secondDiff << " (max: " << secondDiff.GetLInfNorm() << ")" << endl << endl); + + // check whether stopping criterion has been reached + // (both difference vectors must have all weight changes smaller than min_weight_change) + if (firstDiff.GetLInfNorm() >= min_weight_change) + reached = false; + if (secondDiff.GetLInfNorm() >= min_weight_change) + reached = false; + if (reached) { + // stop MIRA + stop = true; + cerr << "\nWeights have converged after epoch " << epoch << ".. stopping MIRA." << endl; + ScoreComponentCollection dummy; + ostringstream endfilename; + endfilename << "stopping"; + dummy.Save(endfilename.str()); + } + } + + mixedWeightsBeforePrevious = mixedWeightsPrevious; + mixedWeightsPrevious = mixedWeights; + mixedAverageWeightsBeforePrevious = mixedAverageWeightsPrevious; + mixedAverageWeightsPrevious = mixedAverageWeights; +#ifdef MPI_ENABLE + mpi::broadcast(world, stop, 0); +#endif + } //end if (weightConvergence) + } + } // end of epoch loop + +#ifdef MPI_ENABLE + MPI_Finalize(); +#endif + + time(&now); + cerr << "Rank " << rank << ", " << ctime(&now); + + if (rank == 0) { + ScoreComponentCollection dummy; + ostringstream endfilename; + endfilename << "finished"; + dummy.Save(endfilename.str()); + } + + delete decoder; + exit(0); +} + +bool loadSentences(const string& filename, vector& sentences) +{ + ifstream in(filename.c_str()); + if (!in) + return false; + string line; + while (getline(in, line)) + sentences.push_back(line); + return true; +} + +bool evaluateModulo(size_t shard_position, size_t mix_or_dump_base, size_t actual_batch_size) +{ + if (mix_or_dump_base == 0) return 0; + if (actual_batch_size > 1) { + bool mix_or_dump = false; + size_t numberSubtracts = actual_batch_size; + do { + if (shard_position % mix_or_dump_base == 0) { + mix_or_dump = true; + break; + } + --shard_position; + --numberSubtracts; + } while (numberSubtracts > 0); + return mix_or_dump; + } else { + return ((shard_position % mix_or_dump_base) == 0); + } +} + +void printFeatureValues(vector > &featureValues) +{ + for (size_t i = 0; i < featureValues.size(); ++i) { + for (size_t j = 0; j < featureValues[i].size(); ++j) { + cerr << featureValues[i][j] << endl; + } + } + cerr << endl; +} + +void deleteTranslations(vector > &translations) +{ + for (size_t i = 0; i < translations.size(); ++i) { + for (size_t j = 0; j < translations[i].size(); ++j) { + delete translations[i][j]; + } + } +} + +void decodeHopeOrFear(size_t rank, size_t size, size_t decode, string filename, vector &inputSentences, MosesDecoder* decoder, size_t n, float bleuWeight) +{ + if (decode == 1) + cerr << "Rank " << rank << ", decoding dev input set according to hope objective.. " << endl; + else if (decode == 2) + cerr << "Rank " << rank << ", decoding dev input set according to fear objective.. " << endl; + else + cerr << "Rank " << rank << ", decoding dev input set according to normal objective.. " << endl; + + // Create shards according to the number of processes used + vector order; + for (size_t i = 0; i < inputSentences.size(); ++i) + order.push_back(i); + + vector shard; + float shardSize = (float) (order.size()) / size; + size_t shardStart = (size_t) (shardSize * rank); + size_t shardEnd = (size_t) (shardSize * (rank + 1)); + if (rank == size - 1) { + shardEnd = inputSentences.size(); + shardSize = shardEnd - shardStart; + } + VERBOSE(1, "Rank " << rank << ", shard start: " << shardStart << " Shard end: " << shardEnd << endl); + VERBOSE(1, "Rank " << rank << ", shard size: " << shardSize << endl); + shard.resize(shardSize); + copy(order.begin() + shardStart, order.begin() + shardEnd, shard.begin()); + + // open files for writing + stringstream fname; + fname << filename << ".rank" << rank; + filename = fname.str(); + ostringstream filename_nbest; + filename_nbest << filename << "." << n << "best"; + ofstream out(filename.c_str()); + ofstream nbest_out((filename_nbest.str()).c_str()); + if (!out) { + ostringstream msg; + msg << "Unable to open " << fname.str(); + throw runtime_error(msg.str()); + } + if (!nbest_out) { + ostringstream msg; + msg << "Unable to open " << filename_nbest; + throw runtime_error(msg.str()); + } + + for (size_t i = 0; i < shard.size(); ++i) { + size_t sid = shard[i]; + string& input = inputSentences[sid]; + + vector > dummyFeatureValues; + vector > dummyBleuScores; + vector > dummyModelScores; + + vector newFeatureValues; + vector newScores; + dummyFeatureValues.push_back(newFeatureValues); + dummyBleuScores.push_back(newScores); + dummyModelScores.push_back(newScores); + + float factor = 0.0; + if (decode == 1) factor = 1.0; + if (decode == 2) factor = -1.0; + cerr << "Rank " << rank << ", translating sentence " << sid << endl; + bool realBleu = false; + vector< vector > nbestOutput = decoder->getNBest(input, sid, n, factor, bleuWeight, dummyFeatureValues[0], + dummyBleuScores[0], dummyModelScores[0], n, realBleu, true, false, rank, 0, ""); + cerr << endl; + decoder->cleanup(StaticData::Instance().IsChart()); + + for (size_t i = 0; i < nbestOutput.size(); ++i) { + vector output = nbestOutput[i]; + stringstream translation; + for (size_t k = 0; k < output.size(); ++k) { + Word* w = const_cast(output[k]); + translation << w->GetString(0); + translation << " "; + } + + if (i == 0) + out << translation.str() << endl; + nbest_out << sid << " ||| " << translation.str() << " ||| " << dummyFeatureValues[0][i] << + " ||| " << dummyModelScores[0][i] << " ||| sBleu=" << dummyBleuScores[0][i] << endl; + } + } + + out.close(); + nbest_out.close(); + cerr << "Closing files " << filename << " and " << filename_nbest.str() << endl; + +#ifdef MPI_ENABLE + MPI_Finalize(); +#endif + + time_t now; + time(&now); + cerr << "Rank " << rank << ", " << ctime(&now); + + delete decoder; + exit(0); +} + +void applyLearningRates(vector > &featureValues, float core_r0, float sparse_r0) +{ + for (size_t i=0; i > &featureValues, ScoreComponentCollection featureLearningRates, float sparse_r0) +{ + for (size_t i=0; i > &featureValues, size_t rank, size_t epoch) +{ + string name = sp->GetScoreProducerDescription(); + + // scale down score + float featureScore; + for (size_t i=0; i > &featureValues, size_t rank, size_t epoch) +{ + string name = sp->GetScoreProducerDescription(); + + // scale down score + for (size_t i=0; i featureScores = featureValues[i][j].GetScoresForProducer(sp); + for (size_t k=0; k + +#include "moses/ScoreComponentCollection.h" +#include "moses/Word.h" +#include "moses/FF/FeatureFunction.h" +#include "Decoder.h" +#include "util/random.hh" + +typedef std::map > ProducerWeightMap; +typedef std::pair > ProducerWeightPair; + +template bool from_string(T& t, const std::string& s, std::ios_base& (*f)(std::ios_base&)) +{ + std::istringstream iss(s); + return !(iss >> f >> t).fail(); +} + +struct RandomIndex { + ptrdiff_t operator()(ptrdiff_t max) { + return util::rand_excl(max); + } +}; + +//void OutputNBestList(const MosesChart::TrellisPathList &nBestList, const TranslationSystem* system, long translationId); +bool loadSentences(const std::string& filename, std::vector& sentences); +bool evaluateModulo(size_t shard_position, size_t mix_or_dump_base, size_t actual_batch_size); +void printFeatureValues(std::vector > &featureValues); +void ignoreCoreFeatures(std::vector > &featureValues, ProducerWeightMap &coreWeightMap); +void takeLogs(std::vector > &featureValues, size_t base); +void deleteTranslations(std::vector > &translations); +void decodeHopeOrFear(size_t rank, size_t size, size_t decode, std::string decode_filename, std::vector &inputSentences, Mira::MosesDecoder* decoder, size_t n, float bleuWeight); +void applyLearningRates(std::vector > &featureValues, float core_r0, float sparse_r0); +void applyPerFeatureLearningRates(std::vector > &featureValues, Moses::ScoreComponentCollection featureLearningRates, float sparse_r0); +void scaleFeatureScore(const Moses::FeatureFunction *sp, float scaling_factor, std::vector > &featureValues, size_t rank, size_t epoch); +void scaleFeatureScores(const Moses::FeatureFunction *sp, float scaling_factor, std::vector > &featureValues, size_t rank, size_t epoch); + +#endif /* MAIN_H_ */ diff --git a/contrib/mira/MiraOptimiser.cpp b/contrib/mira/MiraOptimiser.cpp new file mode 100644 index 0000000000..d4854a1c4a --- /dev/null +++ b/contrib/mira/MiraOptimiser.cpp @@ -0,0 +1,446 @@ +#include +#include "Optimiser.h" +#include "Hildreth.h" +#include "moses/StaticData.h" + +using namespace Moses; +using namespace std; + +namespace Mira +{ + +size_t MiraOptimiser::updateWeights( + ScoreComponentCollection& weightUpdate, + const vector >& featureValues, + const vector >& losses, + const vector >& bleuScores, + const vector >& modelScores, + const vector& oracleFeatureValues, + const vector oracleBleuScores, + const vector oracleModelScores, + float learning_rate, + size_t rank, + size_t epoch) +{ + + // vector of feature values differences for all created constraints + vector featureValueDiffs; + vector lossMinusModelScoreDiffs; + vector all_losses; + + // most violated constraint in batch + ScoreComponentCollection max_batch_featureValueDiff; + + // Make constraints for new hypothesis translations + float epsilon = 0.0001; + int violatedConstraintsBefore = 0; + float oldDistanceFromOptimum = 0; + // iterate over input sentences (1 (online) or more (batch)) + for (size_t i = 0; i < featureValues.size(); ++i) { + //size_t sentenceId = sentenceIds[i]; + // iterate over hypothesis translations for one input sentence + for (size_t j = 0; j < featureValues[i].size(); ++j) { + ScoreComponentCollection featureValueDiff = oracleFeatureValues[i]; + featureValueDiff.MinusEquals(featureValues[i][j]); + + // cerr << "Rank " << rank << ", epoch " << epoch << ", feature value diff: " << featureValueDiff << endl; + if (featureValueDiff.GetL1Norm() == 0) { + cerr << "Rank " << rank << ", epoch " << epoch << ", features equal --> skip" << endl; + continue; + } + + float loss = losses[i][j]; + + // check if constraint is violated + bool violated = false; +// float modelScoreDiff = featureValueDiff.InnerProduct(currWeights); + float modelScoreDiff = oracleModelScores[i] - modelScores[i][j]; + float diff = 0; + + if (loss > modelScoreDiff) + diff = loss - modelScoreDiff; + cerr << "Rank " << rank << ", epoch " << epoch << ", constraint: " << modelScoreDiff << " >= " << loss << " (current violation: " << diff << ")" << endl; + if (diff > epsilon) + violated = true; + + if (m_normaliseMargin) { + modelScoreDiff = (2*m_sigmoidParam/(1 + exp(-modelScoreDiff))) - m_sigmoidParam; + loss = (2*m_sigmoidParam/(1 + exp(-loss))) - m_sigmoidParam; + diff = 0; + if (loss > modelScoreDiff) { + diff = loss - modelScoreDiff; + } + cerr << "Rank " << rank << ", epoch " << epoch << ", normalised constraint: " << modelScoreDiff << " >= " << loss << " (current violation: " << diff << ")" << endl; + } + + if (m_scale_margin) { + diff *= oracleBleuScores[i]; + cerr << "Rank " << rank << ", epoch " << epoch << ", scaling margin with oracle bleu score " << oracleBleuScores[i] << endl; + } + + featureValueDiffs.push_back(featureValueDiff); + lossMinusModelScoreDiffs.push_back(diff); + all_losses.push_back(loss); + if (violated) { + ++violatedConstraintsBefore; + oldDistanceFromOptimum += diff; + } + } + } + + // run optimisation: compute alphas for all given constraints + vector alphas; + ScoreComponentCollection summedUpdate; + if (violatedConstraintsBefore > 0) { + cerr << "Rank " << rank << ", epoch " << epoch << ", number of constraints passed to optimizer: " << + featureValueDiffs.size() << " (of which violated: " << violatedConstraintsBefore << ")" << endl; + if (m_slack != 0) { + alphas = Hildreth::optimise(featureValueDiffs, lossMinusModelScoreDiffs, m_slack); + } else { + alphas = Hildreth::optimise(featureValueDiffs, lossMinusModelScoreDiffs); + } + + // Update the weight vector according to the alphas and the feature value differences + // * w' = w' + SUM alpha_i * (h_i(oracle) - h_i(hypothesis)) + for (size_t k = 0; k < featureValueDiffs.size(); ++k) { + float alpha = alphas[k]; + cerr << "Rank " << rank << ", epoch " << epoch << ", alpha: " << alpha << endl; + ScoreComponentCollection update(featureValueDiffs[k]); + update.MultiplyEquals(alpha); + + // sum updates + summedUpdate.PlusEquals(update); + } + } else { + cerr << "Rank " << rank << ", epoch " << epoch << ", no constraint violated for this batch" << endl; +// return 0; + return 1; + } + + // apply learning rate + if (learning_rate != 1) { + cerr << "Rank " << rank << ", epoch " << epoch << ", apply learning rate " << learning_rate << " to update." << endl; + summedUpdate.MultiplyEquals(learning_rate); + } + + // scale update by BLEU of oracle (for batch size 1 only) + if (oracleBleuScores.size() == 1) { + if (m_scale_update) { + cerr << "Rank " << rank << ", epoch " << epoch << ", scaling summed update with oracle bleu score " << oracleBleuScores[0] << endl; + summedUpdate.MultiplyEquals(oracleBleuScores[0]); + } + } + + // cerr << "Rank " << rank << ", epoch " << epoch << ", update: " << summedUpdate << endl; + weightUpdate.PlusEquals(summedUpdate); + + // Sanity check: are there still violated constraints after optimisation? + /* int violatedConstraintsAfter = 0; + float newDistanceFromOptimum = 0; + for (size_t i = 0; i < featureValueDiffs.size(); ++i) { + float modelScoreDiff = featureValueDiffs[i].InnerProduct(currWeights); + float loss = all_losses[i]; + float diff = loss - modelScoreDiff; + if (diff > epsilon) { + ++violatedConstraintsAfter; + newDistanceFromOptimum += diff; + } + } + VERBOSE(1, "Rank " << rank << ", epoch " << epoch << ", violated constraint before: " << violatedConstraintsBefore << ", after: " << violatedConstraintsAfter << ", change: " << violatedConstraintsBefore - violatedConstraintsAfter << endl); + VERBOSE(1, "Rank " << rank << ", epoch " << epoch << ", error before: " << oldDistanceFromOptimum << ", after: " << newDistanceFromOptimum << ", change: " << oldDistanceFromOptimum - newDistanceFromOptimum << endl);*/ +// return violatedConstraintsAfter; + return 0; +} + +size_t MiraOptimiser::updateWeightsHopeFear( + Moses::ScoreComponentCollection& weightUpdate, + const std::vector< std::vector >& featureValuesHope, + const std::vector< std::vector >& featureValuesFear, + const std::vector >& bleuScoresHope, + const std::vector >& bleuScoresFear, + const std::vector >& modelScoresHope, + const std::vector >& modelScoresFear, + float learning_rate, + size_t rank, + size_t epoch, + int updatePosition) +{ + + // vector of feature values differences for all created constraints + vector featureValueDiffs; + vector lossMinusModelScoreDiffs; + vector modelScoreDiffs; + vector all_losses; + + // most violated constraint in batch + ScoreComponentCollection max_batch_featureValueDiff; + + // Make constraints for new hypothesis translations + float epsilon = 0.0001; + int violatedConstraintsBefore = 0; + float oldDistanceFromOptimum = 0; + + // iterate over input sentences (1 (online) or more (batch)) + for (size_t i = 0; i < featureValuesHope.size(); ++i) { + if (updatePosition != -1) { + if (int(i) < updatePosition) + continue; + else if (int(i) > updatePosition) + break; + } + + // Pick all pairs[j,j] of hope and fear translations for one input sentence + for (size_t j = 0; j < featureValuesHope[i].size(); ++j) { + ScoreComponentCollection featureValueDiff = featureValuesHope[i][j]; + featureValueDiff.MinusEquals(featureValuesFear[i][j]); + //cerr << "Rank " << rank << ", epoch " << epoch << ", feature value diff: " << featureValueDiff << endl; + if (featureValueDiff.GetL1Norm() == 0) { + cerr << "Rank " << rank << ", epoch " << epoch << ", features equal --> skip" << endl; + continue; + } + + float loss = bleuScoresHope[i][j] - bleuScoresFear[i][j]; + + // check if constraint is violated + bool violated = false; + //float modelScoreDiff = featureValueDiff.InnerProduct(currWeights); + float modelScoreDiff = modelScoresHope[i][j] - modelScoresFear[i][j]; + float diff = 0; + if (loss > modelScoreDiff) + diff = loss - modelScoreDiff; + cerr << "Rank " << rank << ", epoch " << epoch << ", constraint: " << modelScoreDiff << " >= " << loss << " (current violation: " << diff << ")" << endl; + + if (diff > epsilon) + violated = true; + + if (m_normaliseMargin) { + modelScoreDiff = (2*m_sigmoidParam/(1 + exp(-modelScoreDiff))) - m_sigmoidParam; + loss = (2*m_sigmoidParam/(1 + exp(-loss))) - m_sigmoidParam; + diff = 0; + if (loss > modelScoreDiff) { + diff = loss - modelScoreDiff; + } + cerr << "Rank " << rank << ", epoch " << epoch << ", normalised constraint: " << modelScoreDiff << " >= " << loss << " (current violation: " << diff << ")" << endl; + } + + if (m_scale_margin) { + diff *= bleuScoresHope[i][j]; + cerr << "Rank " << rank << ", epoch " << epoch << ", scaling margin with oracle bleu score " << bleuScoresHope[i][j] << endl; + } + + featureValueDiffs.push_back(featureValueDiff); + lossMinusModelScoreDiffs.push_back(diff); + modelScoreDiffs.push_back(modelScoreDiff); + all_losses.push_back(loss); + if (violated) { + ++violatedConstraintsBefore; + oldDistanceFromOptimum += diff; + } + } + } + + // run optimisation: compute alphas for all given constraints + vector alphas; + ScoreComponentCollection summedUpdate; + if (violatedConstraintsBefore > 0) { + cerr << "Rank " << rank << ", epoch " << epoch << ", number of constraints passed to optimizer: " << + featureValueDiffs.size() << " (of which violated: " << violatedConstraintsBefore << ")" << endl; + if (m_slack != 0) { + alphas = Hildreth::optimise(featureValueDiffs, lossMinusModelScoreDiffs, m_slack); + } else { + alphas = Hildreth::optimise(featureValueDiffs, lossMinusModelScoreDiffs); + } + + // Update the weight vector according to the alphas and the feature value differences + // * w' = w' + SUM alpha_i * (h_i(oracle) - h_i(hypothesis)) + for (size_t k = 0; k < featureValueDiffs.size(); ++k) { + float alpha = alphas[k]; + cerr << "Rank " << rank << ", epoch " << epoch << ", alpha: " << alpha << endl; + if (alpha != 0) { + // apply boosting factor + if (m_boost && modelScoreDiffs[k] <= 0) { + // factor between 1.5 and 3 (for Bleu scores between 5 and 20, the factor is within the boundaries) + float factor = std::min(1.5f, (float) log2(bleuScoresHope[0][0])); // TODO: make independent of number of oracles!! + factor = min(3.0f, factor); + alpha = alpha * factor; + cerr << "Rank " << rank << ", epoch " << epoch << ", apply boosting factor " << factor << " to update." << endl; + } + + ScoreComponentCollection update(featureValueDiffs[k]); + update.MultiplyEquals(alpha); + + // sum updates + summedUpdate.PlusEquals(update); + } + } + } else { + cerr << "Rank " << rank << ", epoch " << epoch << ", no constraint violated for this batch" << endl; + // return 0; + return 1; + } + + // apply learning rate + if (learning_rate != 1) { + cerr << "Rank " << rank << ", epoch " << epoch << ", apply learning rate " << learning_rate << " to update." << endl; + summedUpdate.MultiplyEquals(learning_rate); + } + + // scale update by BLEU of oracle (for batch size 1 only) + if (featureValuesHope.size() == 1) { + if (m_scale_update) { + cerr << "Rank " << rank << ", epoch " << epoch << ", scaling summed update with oracle bleu score " << bleuScoresHope[0][0] << endl; + summedUpdate.MultiplyEquals(bleuScoresHope[0][0]); + } + } + + //cerr << "Rank " << rank << ", epoch " << epoch << ", update: " << summedUpdate << endl; + weightUpdate.PlusEquals(summedUpdate); + + // Sanity check: are there still violated constraints after optimisation? + /* int violatedConstraintsAfter = 0; + float newDistanceFromOptimum = 0; + for (size_t i = 0; i < featureValueDiffs.size(); ++i) { + float modelScoreDiff = featureValueDiffs[i].InnerProduct(currWeights); + float loss = all_losses[i]; + float diff = loss - modelScoreDiff; + if (diff > epsilon) { + ++violatedConstraintsAfter; + newDistanceFromOptimum += diff; + } + } + VERBOSE(1, "Rank " << rank << ", epoch " << epoch << ", violated constraint before: " << violatedConstraintsBefore << ", after: " << violatedConstraintsAfter << ", change: " << violatedConstraintsBefore - violatedConstraintsAfter << endl); + VERBOSE(1, "Rank " << rank << ", epoch " << epoch << ", error before: " << oldDistanceFromOptimum << ", after: " << newDistanceFromOptimum << ", change: " << oldDistanceFromOptimum - newDistanceFromOptimum << endl);*/ +// return violatedConstraintsAfter; + return 0; +} + +size_t MiraOptimiser::updateWeightsAnalytically( + ScoreComponentCollection& weightUpdate, + ScoreComponentCollection& featureValuesHope, + ScoreComponentCollection& featureValuesFear, + float bleuScoreHope, + float bleuScoreFear, + float modelScoreHope, + float modelScoreFear, + float learning_rate, + size_t rank, + size_t epoch) +{ + + float epsilon = 0.0001; + float oldDistanceFromOptimum = 0; + bool constraintViolatedBefore = false; + +// cerr << "Rank " << rank << ", epoch " << epoch << ", hope: " << featureValuesHope << endl; +// cerr << "Rank " << rank << ", epoch " << epoch << ", fear: " << featureValuesFear << endl; + ScoreComponentCollection featureValueDiff = featureValuesHope; + featureValueDiff.MinusEquals(featureValuesFear); + if (featureValueDiff.GetL1Norm() == 0) { + cerr << "Rank " << rank << ", epoch " << epoch << ", features equal --> skip" << endl; + return 1; + } + +// cerr << "Rank " << rank << ", epoch " << epoch << ", hope - fear: " << featureValueDiff << endl; +// float modelScoreDiff = featureValueDiff.InnerProduct(currWeights); + float modelScoreDiff = modelScoreHope - modelScoreFear; + float loss = bleuScoreHope - bleuScoreFear; + float diff = 0; + if (loss > modelScoreDiff) + diff = loss - modelScoreDiff; + cerr << "Rank " << rank << ", epoch " << epoch << ", constraint: " << modelScoreDiff << " >= " << loss << " (current violation: " << diff << ")" << endl; + + if (m_normaliseMargin) { + modelScoreDiff = (2*m_sigmoidParam/(1 + exp(-modelScoreDiff))) - m_sigmoidParam; + loss = (2*m_sigmoidParam/(1 + exp(-loss))) - m_sigmoidParam; + if (loss > modelScoreDiff) + diff = loss - modelScoreDiff; + cerr << "Rank " << rank << ", epoch " << epoch << ", normalised constraint: " << modelScoreDiff << " >= " << loss << " (current violation: " << diff << ")" << endl; + } + + if (diff > epsilon) { + // squash it between 0 and 1 + //diff = tanh(diff); + //diff = (2/(1 + pow(2,-diff))) - 1; + /* if (m_normaliseMargin) { + diff = (2/(1 + exp(-diff))) - 1; + cerr << "Rank " << rank << ", epoch " << epoch << ", new margin: " << diff << endl; + }*/ + + // constraint violated + oldDistanceFromOptimum += diff; + constraintViolatedBefore = true; + + // compute alpha for given constraint: (loss - model score diff) / || feature value diff ||^2 + // featureValueDiff.GetL2Norm() * featureValueDiff.GetL2Norm() == featureValueDiff.InnerProduct(featureValueDiff) + // from Crammer&Singer 2006: alpha = min {C , l_t/ ||x||^2} + float squaredNorm = featureValueDiff.GetL2Norm() * featureValueDiff.GetL2Norm(); + + float alpha = diff / squaredNorm; + cerr << "Rank " << rank << ", epoch " << epoch << ", unclipped alpha: " << alpha << endl; + if (m_slack > 0 ) { + if (alpha > m_slack) { + alpha = m_slack; + } else if (alpha < m_slack*(-1)) { + alpha = m_slack*(-1); + } + } + + // apply learning rate + if (learning_rate != 1) + alpha = alpha * learning_rate; + + if (m_scale_update) { + cerr << "Rank " << rank << ", epoch " << epoch << ", scaling update with oracle bleu score " << bleuScoreHope << endl; + alpha *= bleuScoreHope; + } + + cerr << "Rank " << rank << ", epoch " << epoch << ", clipped/scaled alpha: " << alpha << endl; + + // apply boosting factor + if (m_boost && modelScoreDiff <= 0) { + // factor between 1.5 and 3 (for Bleu scores between 5 and 20, the factor is within the boundaries) + float factor = min(1.5f, (float) log2(bleuScoreHope)); + factor = min(3.0f, factor); + alpha = alpha * factor; + cerr << "Rank " << rank << ", epoch " << epoch << ", boosted alpha: " << alpha << endl; + } + + featureValueDiff.MultiplyEquals(alpha); + weightUpdate.PlusEquals(featureValueDiff); +// cerr << "Rank " << rank << ", epoch " << epoch << ", update: " << weightUpdate << endl; + } + + if (!constraintViolatedBefore) { + // constraint satisfied, nothing to do + cerr << "Rank " << rank << ", epoch " << epoch << ", constraint already satisfied" << endl; + return 1; + } + + // sanity check: constraint still violated after optimisation? + /* ScoreComponentCollection newWeights(currWeights); + newWeights.PlusEquals(weightUpdate); + bool constraintViolatedAfter = false; + float newDistanceFromOptimum = 0; + featureValueDiff = featureValuesHope; + featureValueDiff.MinusEquals(featureValuesFear); + modelScoreDiff = featureValueDiff.InnerProduct(newWeights); + diff = loss - modelScoreDiff; + // approximate comparison between floats! + if (diff > epsilon) { + constraintViolatedAfter = true; + newDistanceFromOptimum += (loss - modelScoreDiff); + } + + float hopeScore = featureValuesHope.InnerProduct(newWeights); + float fearScore = featureValuesFear.InnerProduct(newWeights); + cerr << "New hope score: " << hopeScore << endl; + cerr << "New fear score: " << fearScore << endl; + + VERBOSE(0, "Rank " << rank << ", epoch " << epoch << ", check, constraint violated before? " << constraintViolatedBefore << ", after? " << constraintViolatedAfter << endl); + VERBOSE(0, "Rank " << rank << ", epoch " << epoch << ", check, error before: " << oldDistanceFromOptimum << ", after: " << newDistanceFromOptimum << ", change: " << oldDistanceFromOptimum - newDistanceFromOptimum << endl); + */ + return 0; +} + +} + diff --git a/mira/MiraTest.cpp b/contrib/mira/MiraTest.cpp similarity index 100% rename from mira/MiraTest.cpp rename to contrib/mira/MiraTest.cpp diff --git a/contrib/mira/Optimiser.h b/contrib/mira/Optimiser.h new file mode 100644 index 0000000000..6bae230553 --- /dev/null +++ b/contrib/mira/Optimiser.h @@ -0,0 +1,153 @@ +/*********************************************************************** +Moses - factored phrase-based language decoder +Copyright (C) 2010 University of Edinburgh + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +***********************************************************************/ +#ifndef _MIRA_OPTIMISER_H_ +#define _MIRA_OPTIMISER_H_ + +#include + +#include "moses/ScoreComponentCollection.h" + + +namespace Mira +{ + +class Optimiser +{ +public: + Optimiser() {} + + virtual size_t updateWeightsHopeFear( + Moses::ScoreComponentCollection& weightUpdate, + const std::vector >& featureValuesHope, + const std::vector >& featureValuesFear, + const std::vector >& bleuScoresHope, + const std::vector >& bleuScoresFear, + const std::vector >& modelScoresHope, + const std::vector >& modelScoresFear, + float learning_rate, + size_t rank, + size_t epoch, + int updatePosition = -1) = 0; +}; + +class Perceptron : public Optimiser +{ +public: + virtual size_t updateWeightsHopeFear( + Moses::ScoreComponentCollection& weightUpdate, + const std::vector >& featureValuesHope, + const std::vector >& featureValuesFear, + const std::vector >& bleuScoresHope, + const std::vector >& bleuScoresFear, + const std::vector >& modelScoresHope, + const std::vector >& modelScoresFear, + float learning_rate, + size_t rank, + size_t epoch, + int updatePosition = -1); +}; + +class MiraOptimiser : public Optimiser +{ +public: + MiraOptimiser() : + Optimiser() { } + + MiraOptimiser(float slack) : + Optimiser(), + m_slack(slack), + m_scale_margin(false), + m_scale_update(false), + m_boost(false), + m_normaliseMargin(false), + m_sigmoidParam(1.0) { } + + MiraOptimiser(float slack, bool scale_margin, bool scale_update, + bool boost, bool normaliseMargin, float sigmoidParam) : + Optimiser(), + m_slack(slack), + m_scale_margin(scale_margin), + m_scale_update(scale_update), + m_boost(boost), + m_normaliseMargin(normaliseMargin), + m_sigmoidParam(sigmoidParam) { } + + size_t updateWeights( + Moses::ScoreComponentCollection& weightUpdate, + const std::vector >& featureValues, + const std::vector >& losses, + const std::vector >& bleuScores, + const std::vector >& modelScores, + const std::vector< Moses::ScoreComponentCollection>& oracleFeatureValues, + const std::vector< float> oracleBleuScores, + const std::vector< float> oracleModelScores, + float learning_rate, + size_t rank, + size_t epoch); + virtual size_t updateWeightsHopeFear( + Moses::ScoreComponentCollection& weightUpdate, + const std::vector >& featureValuesHope, + const std::vector >& featureValuesFear, + const std::vector >& bleuScoresHope, + const std::vector >& bleuScoresFear, + const std::vector >& modelScoresHope, + const std::vector >& modelScoresFear, + float learning_rate, + size_t rank, + size_t epoch, + int updatePosition = -1); + size_t updateWeightsAnalytically( + Moses::ScoreComponentCollection& weightUpdate, + Moses::ScoreComponentCollection& featureValuesHope, + Moses::ScoreComponentCollection& featureValuesFear, + float bleuScoreHope, + float bleuScoreFear, + float modelScoreHope, + float modelScoreFear, + float learning_rate, + size_t rank, + size_t epoch); + + void setSlack(float slack) { + m_slack = slack; + } + +private: + // regularise Hildreth updates + float m_slack; + + + // scale margin with BLEU score + bool m_scale_margin; + + // scale update with oracle BLEU score + bool m_scale_update; + + // boosting of updates on misranked candidates + bool m_boost; + + // squash margin between 0 and 1 (or depending on m_sigmoidParam) + bool m_normaliseMargin; + + // y=sigmoidParam is the axis that this sigmoid approaches + float m_sigmoidParam ; +}; +} + +#endif diff --git a/mira/Perceptron.cpp b/contrib/mira/Perceptron.cpp similarity index 100% rename from mira/Perceptron.cpp rename to contrib/mira/Perceptron.cpp diff --git a/mira/expt.cfg b/contrib/mira/expt.cfg similarity index 100% rename from mira/expt.cfg rename to contrib/mira/expt.cfg diff --git a/mira/mira.xcodeproj/project.pbxproj b/contrib/mira/mira.xcodeproj/project.pbxproj similarity index 100% rename from mira/mira.xcodeproj/project.pbxproj rename to contrib/mira/mira.xcodeproj/project.pbxproj diff --git a/mira/training-expt.perl b/contrib/mira/training-expt.perl similarity index 99% rename from mira/training-expt.perl rename to contrib/mira/training-expt.perl index c143871b26..097ee7220c 100755 --- a/mira/training-expt.perl +++ b/contrib/mira/training-expt.perl @@ -289,8 +289,8 @@ my $batch = ¶m("train.batch", 1); # don't print this param twice (when printing training file) my $extra_args = ¶m("train.extra-args"); my $by_node = ¶m("train.by-node"); -my $slots = ¶m("train.slots",8); -my $jobs = ¶m("train.jobs",8); +my $slots = ¶m("train.slots",10); +my $jobs = ¶m("train.jobs",10); my $mixing_frequency = ¶m("train.mixing-frequency", 1); # don't print this param twice my $weight_dump_frequency = ¶m("train.weight-dump-frequency", 1); # don't print this param twice my $burn_in = ¶m("train.burn-in"); diff --git a/contrib/moses-speedtest/README.md b/contrib/moses-speedtest/README.md new file mode 100644 index 0000000000..cdf3eb6528 --- /dev/null +++ b/contrib/moses-speedtest/README.md @@ -0,0 +1,146 @@ +# Moses speedtesting framework + +### Description + +This is an automatic test framework that is designed to test the day to day performance changes in Moses. + +### Set up + +#### Set up a Moses repo +Set up a Moses repo and build it with the desired configuration. +```bash +git clone https://github.com/moses-smt/mosesdecoder.git +cd mosesdecoder +./bjam -j10 --with-cmph=/usr/include/ +``` +You need to build Moses first, so that the testsuite knows what command you want it to use when rebuilding against newer revisions. + +#### Create a parent directory. +Create a parent directory where the **runtests.py** and related scripts and configuration file should reside. +This should also be the location of the TEST_DIR and TEST_LOG_DIR as explained in the next section. + +#### Set up a global configuration file. +You need a configuration file for the testsuite. A sample configuration file is provided in **testsuite\_config** +
    +MOSES_REPO_PATH: /home/moses-speedtest/moses-standard/mosesdecoder
    +DROP_CACHES_COMM: sys_drop_caches 3
    +TEST_DIR: /home/moses-speedtest/phrase_tables/tests
    +TEST_LOG_DIR: /home/moses-speedtest/phrase_tables/testlogs
    +BASEBRANCH: RELEASE-2.1.1
    +MOSES_PROFILER_REPO: /home/moses-speedtest/moses-standard/mosesdecoder-variant-prof
    +MOSES_GOOGLE_PROFILER_REPO: /home/moses-speedtest/moses-standard/mosesdecoder-variant-gperftools
    +
    + +The _MOSES\_REPO\_PATH_ is the place where you have set up and built moses. +The _DROP\_CACHES\_COMM_ is the command that would be used to drop caches. It should run without needing root access. +_TEST\_DIR_ is the directory where all the tests will reside. +_TEST\_LOG\_DIR_ is the directory where the performance logs will be gathered. It should be created before running the testsuite for the first time. +_BASEBRANCH_ is the branch against which all new tests will be compared. It should normally be set to be the latest Moses stable release. +_MOSES\_PROFILER\_REPO_ is a path to a moses repository set up and built with profiling enabled. Optional if you want to produce profiling results. +_MOSES\_GOOGLE\_PROFILER\_REPO is a path to moses repository set up with full tcmalloc and profiler, as well as shared link for use with gperftools. +### Creating tests + +In order to create a test one should go into the TEST_DIR and create a new folder. That folder will be used for the name of the test. +Inside that folder one should place a configuration file named **config**. The naming is mandatory. +An example such configuration file is **test\_config** + +
    +Command: moses -f ... -i fff #Looks for the command in the /bin directory of the repo specified in the testsuite_config
    +LDPRE: ldpreloads #Comma separated LD_LIBRARY_PATH:/, 
    +Variants: vanilla, cached, ldpre, profile, google-profiler #Can't have cached without ldpre or vanilla
    +
    + +The _Command:_ line specifies the executable (which is looked up in the /bin directory of the repo.) and any arguments necessary. Before running the test, the script cds to the current test directory so you can use relative paths. +The _LDPRE:_ specifies if tests should be run with any LD\_PRELOAD flags. +The _Variants:_ line specifies what type of tests should we run. This particular line will run the following tests: +1. A Vanilla test meaning just the command after _Command_ will be issued. +2. A vanilla cached test meaning that after the vanilla test, the test will be run again without dropping caches in order to benchmark performance on cached filesystem. +3. A test with LD_PRELOAD ldpreloads moses -f command. For each available LDPRELOAD comma separated library to preload. +4. A cached version of all LD_PRELOAD tests. +5. A profile variant is only available if you have setup the profiler repository. It produces gprof outputs for all of the above in a subdirectory inside the _TEST\_LOG\_DIR. + +#### Produce profiler results. +If you want to produce profiler results together in some tests you need to specify the _MOSES\_PROFILER\_REPO_ in the config +```bash +git clone https://github.com/moses-smt/mosesdecoder.git mosesdecoder-profile +cd mosesdecoder-profile +./bjam -j10 --with-cmph=/usr/include/ variant=profile +``` + +Afterwards for testcases which contain the **profile** keyword in **Variants** you will see a directory inside _TEST\_LOG\_DIR which contains the **gprof** output from every run (files ending in **\_profile**). + +#### Produce google profiler results. +If you want to produce profiler results together in some tests you need to specify the _MOSES\_GOOGLE\_PROFILER\_REPO in the config +```bash +git clone https://github.com/moses-smt/mosesdecoder.git mosesdecoder-google-profile +cd mosesdecoder +./bjam link=shared -j10 --full-tcmalloc --with-cmph=/usr/include/ +``` + +Afterwards for testcases which contain the **google-profiler** keyword in **Variants** you will see a directory inside _TEST\_LOG\_DIR which contains the **google-profiler** output from every run (files prefixed with **pprof**). To analyze the output you need to use [pprof](http://google-perftools.googlecode.com/svn/trunk/doc/cpuprofile.html). + +### Running tests. +Running the tests is done through the **runtests.py** script. + +#### Running all tests. +To run all tests, with the base branch and the latests revision (and generate new basebranch test data if such is missing) do a: +```bash +python3 runtests.py -c testsuite_config +``` + +#### Running specific tests. +The script allows the user to manually run a particular test or to test against a specific branch or revision: +
    +moses-speedtest@crom:~/phrase_tables$ python3 runtests.py --help
    +usage: runtests.py [-h] -c CONFIGFILE [-s SINGLETESTDIR] [-r REVISION]
    +                   [-b BRANCH]
    +
    +A python based speedtest suite for moses.
    +
    +optional arguments:
    +  -h, --help            show this help message and exit
    +  -c CONFIGFILE, --configfile CONFIGFILE
    +                        Specify test config file
    +  -s SINGLETESTDIR, --singletest SINGLETESTDIR
    +                        Single test name directory. Specify directory name,
    +                        not full path!
    +  -r REVISION, --revision REVISION
    +                        Specify a specific revison for the test.
    +  -b BRANCH, --branch BRANCH
    +                        Specify a branch for the test.
    +
    + +### Generating HTML report. +To generate a summary of the test results use the **html\_gen.py** script. It places a file named *index.html* in the current script directory. +```bash +python3 html_gen.py testsuite_config +``` +You should use the generated file with the **style.css** file provided in the html directory. + +### Command line regression testing. +Alternatively you could check for regressions from the command line using the **check\_fo\r_regression.py** script: +```bash +python3 check_for_regression.py TESTLOGS_DIRECTORY +``` + +Alternatively the results of all tests are logged inside the the specified TESTLOGS directory so you can manually check them for additional information such as date, time, revision, branch, etc... + +### Create a cron job: +Create a cron job to run the tests daily and generate an html report. An example *cronjob* is available. +```bash +#!/bin/sh +cd /home/moses-speedtest/phrase_tables + +python3 runtests.py -c testsuite_config #Run the tests. +python3 html_gen.py testsuite_config #Generate html + +cp index.html /fs/thor4/html/www/speed-test/ #Update the html +``` + +Place the script in _/etc/cron.daily_ for dayly testing + +###### Author +Nikolay Bogoychev, 2014 + +###### License +This software is licensed under the LGPL. \ No newline at end of file diff --git a/contrib/moses-speedtest/check_for_regression.py b/contrib/moses-speedtest/check_for_regression.py new file mode 100644 index 0000000000..1e269c0c67 --- /dev/null +++ b/contrib/moses-speedtest/check_for_regression.py @@ -0,0 +1,63 @@ +"""Checks if any of the latests tests has performed considerably different than + the previous ones. Takes the log directory as an argument.""" +import os +import sys +from testsuite_common import Result, processLogLine, bcolors, getLastTwoLines + +LOGDIR = sys.argv[1] #Get the log directory as an argument +PERCENTAGE = 5 #Default value for how much a test shoudl change +if len(sys.argv) == 3: + PERCENTAGE = float(sys.argv[2]) #Default is 5%, but we can specify more + #line parameter + +def printResults(regressed, better, unchanged, firsttime): + """Pretty print the results in different colours""" + if regressed != []: + for item in regressed: + print(bcolors.RED + "REGRESSION! " + item.testname + " Was: "\ + + str(item.previous) + " Is: " + str(item.current) + " Change: "\ + + str(abs(item.percentage)) + "%. Revision: " + item.revision\ + + bcolors.ENDC) + print('\n') + if unchanged != []: + for item in unchanged: + print(bcolors.BLUE + "UNCHANGED: " + item.testname + " Revision: " +\ + item.revision + bcolors.ENDC) + print('\n') + if better != []: + for item in better: + print(bcolors.GREEN + "IMPROVEMENT! " + item.testname + " Was: "\ + + str(item.previous) + " Is: " + str(item.current) + " Change: "\ + + str(abs(item.percentage)) + "%. Revision: " + item.revision\ + + bcolors.ENDC) + if firsttime != []: + for item in firsttime: + print(bcolors.PURPLE + "First time test! " + item.testname +\ + " Took: " + str(item.real) + " seconds. Revision: " +\ + item.revision + bcolors.ENDC) + + +all_files = os.listdir(LOGDIR) +regressed = [] +better = [] +unchanged = [] +firsttime = [] + +#Go through all log files and find which tests have performed better. +for logfile in all_files: + (line1, line2) = getLastTwoLines(logfile, LOGDIR) + log1 = processLogLine(line1) + if line2 == '\n': # Empty line, only one test ever run + firsttime.append(log1) + continue + log2 = processLogLine(line2) + res = Result(log1.testname, log1.real, log2.real, log2.revision,\ + log2.branch, log1.revision, log1.branch) + if res.percentage < -PERCENTAGE: + regressed.append(res) + elif res.change > PERCENTAGE: + better.append(res) + else: + unchanged.append(res) + +printResults(regressed, better, unchanged, firsttime) diff --git a/contrib/moses-speedtest/cronjob b/contrib/moses-speedtest/cronjob new file mode 100644 index 0000000000..4f7183a480 --- /dev/null +++ b/contrib/moses-speedtest/cronjob @@ -0,0 +1,7 @@ +#!/bin/sh +cd /home/moses-speedtest/phrase_tables + +python3 runtests.py -c testsuite_config #Run the tests. +python3 html_gen.py testsuite_config #Generate html + +cp index.html /fs/thor4/html/www/speed-test/ #Update the html \ No newline at end of file diff --git a/contrib/moses-speedtest/helpers/README.md b/contrib/moses-speedtest/helpers/README.md new file mode 100644 index 0000000000..87efbc78f6 --- /dev/null +++ b/contrib/moses-speedtest/helpers/README.md @@ -0,0 +1,5 @@ +###Helpers + +This is a python script that basically gives you the equivalent of: +```echo 3 > /proc/sys/vm/drop_caches``` +You need to set it up so it is executed with root access without needing a password so that the tests can be automated. \ No newline at end of file diff --git a/contrib/moses-speedtest/helpers/sys_drop_caches.py b/contrib/moses-speedtest/helpers/sys_drop_caches.py new file mode 100644 index 0000000000..d4796e0905 --- /dev/null +++ b/contrib/moses-speedtest/helpers/sys_drop_caches.py @@ -0,0 +1,22 @@ +#!/usr/bin/spython +from sys import argv, stderr, exit +from os import linesep as ls +procfile = "/proc/sys/vm/drop_caches" +options = ["1","2","3"] +flush_type = None +try: + flush_type = argv[1][0:1] + if not flush_type in options: + raise IndexError, "not in options" + with open(procfile, "w") as f: + f.write("%s%s" % (flush_type,ls)) + exit(0) +except IndexError, e: + stderr.write("Argument %s required.%s" % (options, ls)) +except IOError, e: + stderr.write("Error writing to file.%s" % ls) +except StandardError, e: + stderr.write("Unknown Error.%s" % ls) + +exit(1) + diff --git a/contrib/moses-speedtest/html/README.md b/contrib/moses-speedtest/html/README.md new file mode 100644 index 0000000000..342a8cedf7 --- /dev/null +++ b/contrib/moses-speedtest/html/README.md @@ -0,0 +1,5 @@ +###HTML files. + +_index.html_ is a sample generated file by this testsuite. + +_style.css_ should be placed in the html directory in which _index.html_ will be placed in order to visualize the test results in a browser. diff --git a/contrib/moses-speedtest/html/index.html b/contrib/moses-speedtest/html/index.html new file mode 100644 index 0000000000..fc75b10284 --- /dev/null +++ b/contrib/moses-speedtest/html/index.html @@ -0,0 +1,32 @@ + + +Moses speed testing +Basebranch: RELEASE-2.1 Revision: c977ca2f434ed6f12a352806c088061c492b1676 + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    DateTimeTestnameRevisionBranchTimePrevtimePrevrevChange (%)Time (Basebranch)Change (%, Basebranch)Time (Days -2)Change (%, Days -2)Time (Days -3)Change (%, Days -3)Time (Days -4)Change (%, Days -4)Time (Days -5)Change (%, Days -5)Time (Days -6)Change (%, Days -6)Time (Days -7)Change (%, Days -7)Time (Days -14)Change (%, Days -14)Time (Years -1)Change (%, Years -1)
    10.06.201410:27:57ondisk_minreord_vanilla169c3fce383bc66ae580884bfa72d60712beffefmaster21.3621.49169c3fce383bc66ae580884bfa72d60712beffef0.00625.890.1699N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
    10.06.201410:29:38minpt_reord_vanilla_cached169c3fce383bc66ae580884bfa72d60712beffefmaster9.739.52169c3fce383bc66ae580884bfa72d60712beffef-0.022112.20.2197N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
    10.06.201410:22:32ondisk_hierarchical_vanilla_cached169c3fce383bc66ae580884bfa72d60712beffefmaster25.7325.77169c3fce383bc66ae580884bfa72d60712beffef0.001633.630.2337N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
    10.06.201410:22:06ondisk_hierarchical_vanilla169c3fce383bc66ae580884bfa72d60712beffefmaster83.282.6169c3fce383bc66ae580884bfa72d60712beffef-0.0073127.590.3526N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
    10.06.201410:28:57binary_reord_vanilla169c3fce383bc66ae580884bfa72d60712beffefmaster24.5424.85169c3fce383bc66ae580884bfa72d60712beffef0.012529.090.1458N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
    10.06.201410:28:08ondisk_minreord_vanilla_cached169c3fce383bc66ae580884bfa72d60712beffefmaster10.7110.54169c3fce383bc66ae580884bfa72d60712beffef-0.016114.820.2888N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
    10.06.201410:30:00binary_minreord_vanilla169c3fce383bc66ae580884bfa72d60712beffefmaster20.8220.77169c3fce383bc66ae580884bfa72d60712beffef-0.002425.770.194N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
    10.06.201410:27:35score.hiero_vanilla_cached169c3fce383bc66ae580884bfa72d60712beffefmaster131.37130.63169c3fce383bc66ae580884bfa72d60712beffef-0.0057141.850.0791N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
    10.06.201410:29:10binary_reord_vanilla_cached169c3fce383bc66ae580884bfa72d60712beffefmaster13.4113.4169c3fce383bc66ae580884bfa72d60712beffef-0.000718.120.2605N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
    10.06.201410:29:28minpt_reord_vanilla169c3fce383bc66ae580884bfa72d60712beffefmaster17.4617.37169c3fce383bc66ae580884bfa72d60712beffef-0.005220.00.1315N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
    10.06.201410:28:22minpt_minreord_vanilla169c3fce383bc66ae580884bfa72d60712beffefmaster13.7513.56169c3fce383bc66ae580884bfa72d60712beffef-0.01417.190.2112N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
    10.06.201410:22:59ondisk_reord_vanilla169c3fce383bc66ae580884bfa72d60712beffefmaster25.2825.0169c3fce383bc66ae580884bfa72d60712beffef-0.011229.110.1412N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
    10.06.201410:28:31minpt_minreord_vanilla_cached169c3fce383bc66ae580884bfa72d60712beffefmaster8.638.6169c3fce383bc66ae580884bfa72d60712beffef-0.003511.780.2699N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
    10.06.201410:23:10ondisk_reord_vanilla_cached169c3fce383bc66ae580884bfa72d60712beffefmaster11.5711.59169c3fce383bc66ae580884bfa72d60712beffef0.001715.40.2474N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
    10.06.201410:25:24score.hiero_vanilla169c3fce383bc66ae580884bfa72d60712beffefmaster132.33130.02169c3fce383bc66ae580884bfa72d60712beffef-0.0178141.350.0802N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
    10.06.201410:30:12binary_minreord_vanilla_cached169c3fce383bc66ae580884bfa72d60712beffefmaster12.4712.61169c3fce383bc66ae580884bfa72d60712beffef0.011117.890.2951N/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/AN/A
    diff --git a/contrib/moses-speedtest/html/style.css b/contrib/moses-speedtest/html/style.css new file mode 100644 index 0000000000..16221f91fb --- /dev/null +++ b/contrib/moses-speedtest/html/style.css @@ -0,0 +1,21 @@ +table,th,td +{ +border:1px solid black; + border-collapse:collapse +} + +tr:nth-child(odd) { + background-color: Gainsboro; +} + +.better { + color: Green; +} + +.worse { + color: Red; +} + +.unchanged { + color: SkyBlue; +} \ No newline at end of file diff --git a/contrib/moses-speedtest/html_gen.py b/contrib/moses-speedtest/html_gen.py new file mode 100644 index 0000000000..80e88329c1 --- /dev/null +++ b/contrib/moses-speedtest/html_gen.py @@ -0,0 +1,192 @@ +"""Generates HTML page containing the testresults""" +from testsuite_common import Result, processLogLine, getLastTwoLines +from runtests import parse_testconfig +import os +import sys + +from datetime import datetime, timedelta + +HTML_HEADING = """ + +Moses speed testing +""" +HTML_ENDING = "\n" + +TABLE_HEADING = """ + + + + + + + + + + + + + + + + + + + + + + + + + + + + """ + +def get_prev_days(date, numdays): + """Gets the date numdays previous days so that we could search for + that test in the config file""" + date_obj = datetime.strptime(date, '%d.%m.%Y').date() + past_date = date_obj - timedelta(days=numdays) + return past_date.strftime('%d.%m.%Y') + +def gather_necessary_lines(logfile, date): + """Gathers the necessary lines corresponding to past dates + and parses them if they exist""" + #Get a dictionary of dates + dates = {} + dates[get_prev_days(date, 2)] = ('-2', None) + dates[get_prev_days(date, 3)] = ('-3', None) + dates[get_prev_days(date, 4)] = ('-4', None) + dates[get_prev_days(date, 5)] = ('-5', None) + dates[get_prev_days(date, 6)] = ('-6', None) + dates[get_prev_days(date, 7)] = ('-7', None) + dates[get_prev_days(date, 14)] = ('-14', None) + dates[get_prev_days(date, 365)] = ('-365', None) + + openfile = open(logfile, 'r') + for line in openfile: + if line.split()[0] in dates.keys(): + day = dates[line.split()[0]][0] + dates[line.split()[0]] = (day, processLogLine(line)) + openfile.close() + return dates + +def append_date_to_table(resline): + """Appends past dates to the html""" + cur_html = '' + + if resline.percentage > 0.05: #If we have improvement of more than 5% + cur_html = cur_html + '' + elif resline.percentage < -0.05: #We have a regression of more than 5% + cur_html = cur_html + '' + else: + cur_html = cur_html + '' + return cur_html + +def compare_rev(filename, rev1, rev2, branch1=False, branch2=False): + """Compare the test results of two lines. We can specify either a + revision or a branch for comparison. The first rev should be the + base version and the second revision should be the later version""" + + #In the log file the index of the revision is 2 but the index of + #the branch is 12. Alternate those depending on whether we are looking + #for a specific revision or branch. + firstidx = 2 + secondidx = 2 + if branch1 == True: + firstidx = 12 + if branch2 == True: + secondidx = 12 + + rev1line = '' + rev2line = '' + resfile = open(filename, 'r') + for line in resfile: + if rev1 == line.split()[firstidx]: + rev1line = line + elif rev2 == line.split()[secondidx]: + rev2line = line + if rev1line != '' and rev2line != '': + break + resfile.close() + if rev1line == '': + raise ValueError('Revision ' + rev1 + " was not found!") + if rev2line == '': + raise ValueError('Revision ' + rev2 + " was not found!") + + logLine1 = processLogLine(rev1line) + logLine2 = processLogLine(rev2line) + res = Result(logLine1.testname, logLine1.real, logLine2.real,\ + logLine2.revision, logLine2.branch, logLine1.revision, logLine1.branch) + + return res + +def produce_html(path, global_config): + """Produces html file for the report.""" + html = '' #The table HTML + for filenam in os.listdir(global_config.testlogs): + #Generate html for the newest two lines + #Get the lines from the config file + (ll1, ll2) = getLastTwoLines(filenam, global_config.testlogs) + logLine1 = processLogLine(ll1) + logLine2 = processLogLine(ll2) #This is the life from the latest revision + + #Generate html + res1 = Result(logLine1.testname, logLine1.real, logLine2.real,\ + logLine2.revision, logLine2.branch, logLine1.revision, logLine1.branch) + html = html + '' + + #Add fancy colours depending on the change + if res1.percentage > 0.05: #If we have improvement of more than 5% + html = html + '' + elif res1.percentage < -0.05: #We have a regression of more than 5% + html = html + '' + else: + html = html + '' + + #Get comparison against the base version + filenam = global_config.testlogs + '/' + filenam #Get proper directory + res2 = compare_rev(filenam, global_config.basebranch, res1.revision, branch1=True) + html = html + '' + + #Add fancy colours depending on the change + if res2.percentage > 0.05: #If we have improvement of more than 5% + html = html + '' + elif res2.percentage < -0.05: #We have a regression of more than 5% + html = html + '' + else: + html = html + '' + + #Add extra dates comparison dating from the beginning of time if they exist + past_dates = list(range(2, 8)) + past_dates.append(14) + past_dates.append(365) # Get the 1 year ago day + linesdict = gather_necessary_lines(filenam, logLine2.date) + + for days in past_dates: + act_date = get_prev_days(logLine2.date, days) + if linesdict[act_date][1] is not None: + logline_date = linesdict[act_date][1] + restemp = Result(logline_date.testname, logline_date.real, logLine2.real,\ + logLine2.revision, logLine2.branch, logline_date.revision, logline_date.branch) + html = html + append_date_to_table(restemp) + else: + html = html + '' + + + + html = html + '' #End row + + #Write out the file + basebranch_info = 'Basebranch: ' + res2.prevbranch + ' Revision: ' +\ + res2.prevrev + '' + writeoutstr = HTML_HEADING + basebranch_info + TABLE_HEADING + html + HTML_ENDING + writefile = open(path, 'w') + writefile.write(writeoutstr) + writefile.close() + +if __name__ == '__main__': + CONFIG = parse_testconfig(sys.argv[1]) + produce_html('index.html', CONFIG) diff --git a/contrib/moses-speedtest/runtests.py b/contrib/moses-speedtest/runtests.py new file mode 100644 index 0000000000..19d601d427 --- /dev/null +++ b/contrib/moses-speedtest/runtests.py @@ -0,0 +1,439 @@ +"""Given a config file, runs tests""" +import os +import subprocess +import time +import shutil +from argparse import ArgumentParser +from testsuite_common import processLogLine + +def parse_cmd(): + """Parse the command line arguments""" + description = "A python based speedtest suite for moses." + parser = ArgumentParser(description=description) + parser.add_argument("-c", "--configfile", action="store",\ + dest="configfile", required=True,\ + help="Specify test config file") + parser.add_argument("-s", "--singletest", action="store",\ + dest="singletestdir", default=None,\ + help="Single test name directory. Specify directory name,\ + not full path!") + parser.add_argument("-r", "--revision", action="store",\ + dest="revision", default=None,\ + help="Specify a specific revison for the test.") + parser.add_argument("-b", "--branch", action="store",\ + dest="branch", default=None,\ + help="Specify a branch for the test.") + + arguments = parser.parse_args() + return arguments + +def repoinit(testconfig, profiler=None): + """Determines revision and sets up the repo. If given the profiler optional + argument, wil init the profiler repo instead of the default one.""" + revision = '' + #Update the repo + if profiler == "gnu-profiler": + if testconfig.repo_prof is not None: + os.chdir(testconfig.repo_prof) + else: + raise ValueError('Profiling repo is not defined') + elif profiler == "google-profiler": + if testconfig.repo_gprof is not None: + os.chdir(testconfig.repo_gprof) + else: + raise ValueError('Profiling repo is not defined') + else: + os.chdir(testconfig.repo) + #Checkout specific branch, else maintain main branch + if testconfig.branch != 'master': + subprocess.call(['git', 'checkout', testconfig.branch]) + rev, _ = subprocess.Popen(['git', 'rev-parse', 'HEAD'],\ + stdout=subprocess.PIPE, stderr=subprocess.PIPE).communicate() + revision = str(rev).replace("\\n'", '').replace("b'", '') + else: + subprocess.call(['git checkout master'], shell=True) + + #Check a specific revision. Else checkout master. + if testconfig.revision: + subprocess.call(['git', 'checkout', testconfig.revision]) + revision = testconfig.revision + elif testconfig.branch == 'master': + subprocess.call(['git pull'], shell=True) + rev, _ = subprocess.Popen(['git rev-parse HEAD'], stdout=subprocess.PIPE,\ + stderr=subprocess.PIPE, shell=True).communicate() + revision = str(rev).replace("\\n'", '').replace("b'", '') + + return revision + +class Configuration: + """A simple class to hold all of the configuration constatns""" + def __init__(self, repo, drop_caches, tests, testlogs, basebranch, baserev, repo_prof=None, repo_gprof=None): + self.repo = repo + self.repo_prof = repo_prof + self.repo_gprof = repo_gprof + self.drop_caches = drop_caches + self.tests = tests + self.testlogs = testlogs + self.basebranch = basebranch + self.baserev = baserev + self.singletest = None + self.revision = None + self.branch = 'master' # Default branch + + def additional_args(self, singletest, revision, branch): + """Additional configuration from command line arguments""" + self.singletest = singletest + if revision is not None: + self.revision = revision + if branch is not None: + self.branch = branch + + def set_revision(self, revision): + """Sets the current revision that is being tested""" + self.revision = revision + + +class Test: + """A simple class to contain all information about tests""" + def __init__(self, name, command, ldopts, permutations, prof_command=None, gprof_command=None): + self.name = name + self.command = command + self.prof_command = prof_command + self.gprof_command = gprof_command + self.ldopts = ldopts.replace(' ', '').split(',') #Not tested yet + self.permutations = permutations + +def parse_configfile(conffile, testdir, moses_repo, moses_prof_repo=None, moses_gprof_repo=None): + """Parses the config file""" + command, ldopts, prof_command, gprof_command = '', '', None, None + permutations = [] + fileopen = open(conffile, 'r') + for line in fileopen: + line = line.split('#')[0] # Discard comments + if line == '' or line == '\n': + continue # Discard lines with comments only and empty lines + opt, args = line.split(' ', 1) # Get arguments + + if opt == 'Command:': + command = args.replace('\n', '') + if moses_prof_repo is not None: # Get optional command for profiling + prof_command = moses_prof_repo + '/bin/' + command + if moses_gprof_repo is not None: # Get optional command for google-perftools + gprof_command = moses_gprof_repo + '/bin/' + command + command = moses_repo + '/bin/' + command + elif opt == 'LDPRE:': + ldopts = args.replace('\n', '') + elif opt == 'Variants:': + permutations = args.replace('\n', '').replace(' ', '').split(',') + else: + raise ValueError('Unrecognized option ' + opt) + #We use the testdir as the name. + testcase = Test(testdir, command, ldopts, permutations, prof_command, gprof_command) + fileopen.close() + return testcase + +def parse_testconfig(conffile): + """Parses the config file for the whole testsuite.""" + repo_path, drop_caches, tests_dir, testlog_dir = '', '', '', '' + basebranch, baserev, repo_prof_path, repo_gprof_path = '', '', None, None + fileopen = open(conffile, 'r') + for line in fileopen: + line = line.split('#')[0] # Discard comments + if line == '' or line == '\n': + continue # Discard lines with comments only and empty lines + opt, args = line.split(' ', 1) # Get arguments + if opt == 'MOSES_REPO_PATH:': + repo_path = args.replace('\n', '') + elif opt == 'DROP_CACHES_COMM:': + drop_caches = args.replace('\n', '') + elif opt == 'TEST_DIR:': + tests_dir = args.replace('\n', '') + elif opt == 'TEST_LOG_DIR:': + testlog_dir = args.replace('\n', '') + elif opt == 'BASEBRANCH:': + basebranch = args.replace('\n', '') + elif opt == 'BASEREV:': + baserev = args.replace('\n', '') + elif opt == 'MOSES_PROFILER_REPO:': # Optional + repo_prof_path = args.replace('\n', '') + elif opt == 'MOSES_GOOGLE_PROFILER_REPO:': # Optional + repo_gprof_path = args.replace('\n', '') + else: + raise ValueError('Unrecognized option ' + opt) + config = Configuration(repo_path, drop_caches, tests_dir, testlog_dir,\ + basebranch, baserev, repo_prof_path, repo_gprof_path) + fileopen.close() + return config + +def get_config(): + """Builds the config object with all necessary attributes""" + args = parse_cmd() + config = parse_testconfig(args.configfile) + config.additional_args(args.singletestdir, args.revision, args.branch) + revision = repoinit(config) + if config.repo_prof is not None: + repoinit(config, "gnu-profiler") + if config.repo_gprof is not None: + repoinit(config, "google-profiler") + config.set_revision(revision) + return config + +def check_for_basever(testlogfile, basebranch): + """Checks if the base revision is present in the testlogs""" + filetoopen = open(testlogfile, 'r') + for line in filetoopen: + templine = processLogLine(line) + if templine.branch == basebranch: + return True + return False + +def split_time(filename): + """Splits the output of the time function into seperate parts. + We will write time to file, because many programs output to + stderr which makes it difficult to get only the exact results we need.""" + timefile = open(filename, 'r') + realtime = float(timefile.readline().replace('\n', '').split()[1]) + usertime = float(timefile.readline().replace('\n', '').split()[1]) + systime = float(timefile.readline().replace('\n', '').split()[1]) + timefile.close() + + return (realtime, usertime, systime) + + +def write_log(time_file, logname, config): + """Writes to a logfile""" + log_write = open(config.testlogs + '/' + logname, 'a') # Open logfile + date_run = time.strftime("%d.%m.%Y %H:%M:%S") # Get the time of the test + realtime, usertime, systime = split_time(time_file) # Get the times in a nice form + + # Append everything to a log file. + writestr = date_run + " " + config.revision + " Testname: " + logname +\ + " RealTime: " + str(realtime) + " UserTime: " + str(usertime) +\ + " SystemTime: " + str(systime) + " Branch: " + config.branch +'\n' + log_write.write(writestr) + log_write.close() + +def write_gprof(command, name, variant, config): + """Produces a gprof report from a gmon file""" + #Check if we have a directory for the profiling of this testcase: + output_dir = config.testlogs + '/' + name + if not os.path.exists(output_dir): + os.makedirs(output_dir) + outputfile = output_dir + '/' + time.strftime("%d.%m.%Y_%H:%M:%S") + '_' + name + '_' + variant + + #Compile a gprof command and output the file in the directory we just created + gmon_path = os.getcwd() + '/gmon.out' # Path to the profiling file + executable_path = command.split(' ')[0] # Path to the moses binary + gprof_command = 'gprof ' + executable_path + ' ' + gmon_path + ' > ' + outputfile + subprocess.call([gprof_command], shell=True) + os.remove(gmon_path) # After we are done discard the gmon file + +def write_pprof(name, variant, config): + """Copies the google-perftools profiler output to the corresponding test directory""" + output_dir = config.testlogs + '/' + name + if not os.path.exists(output_dir): + os.makedirs(output_dir) + outputfile = output_dir + '/pprof_' + time.strftime("%d.%m.%Y_%H:%M:%S") + '_' + name + '_' + variant + shutil.move("/tmp/moses.prof", outputfile) + + +def execute_test(command, path, name, variant, config, profile=None): + """Executes a testcase given a whole command, path to the test file output, + name of the test and variant tested. Config is the global configuration""" + subprocess.Popen([command], stdout=None, stderr=subprocess.PIPE, shell=True).communicate() + if profile is None: + write_log(path, name + '_' + variant, config) + elif profile == "gnu-profiler": # Basically produce a gmon output + write_gprof(command, name, variant, config) + elif profile == "google-profiler": + write_pprof(name, variant, config) + + +def execute_tests(testcase, cur_directory, config): + """Executes timed tests based on the config file""" + #Several global commands related to the time wrapper + time_command = ' time -p -o /tmp/time_moses_tests ' + time_path = '/tmp/time_moses_tests' + + #Figure out the order of which tests must be executed. + #Change to the current test directory + os.chdir(config.tests + '/' + cur_directory) + #Clear caches + subprocess.call(['sync'], shell=True) + subprocess.call([config.drop_caches], shell=True) + #Perform vanilla test and if a cached test exists - as well + print(testcase.name) + if 'vanilla' in testcase.permutations: + #Create the command for executing moses + whole_command = time_command + testcase.command + + #test normal and cached + execute_test(whole_command, time_path, testcase.name, 'vanilla', config) + if 'cached' in testcase.permutations: + execute_test(whole_command, time_path, testcase.name, 'vanilla_cached', config) + + #Now perform LD_PRELOAD tests + if 'ldpre' in testcase.permutations: + for opt in testcase.ldopts: + #Clear caches + subprocess.call(['sync'], shell=True) + subprocess.call([config.drop_caches], shell=True) + + #Create the command for executing moses: + whole_command = 'LD_PRELOAD=' + opt + time_command + testcase.command + variant = 'ldpre_' + opt + + #test normal and cached + execute_test(whole_command, time_path, testcase.name, variant, config) + if 'cached' in testcase.permutations: + execute_test(whole_command, time_path, testcase.name, variant + '_cached', config) + + #Perform profiling test. Mostly same as the above lines but necessary duplication. + #All actual code is inside execute_test so those lines shouldn't need modifying + if 'profile' in testcase.permutations: + subprocess.call(['sync'], shell=True) # Drop caches first + subprocess.call([config.drop_caches], shell=True) + + if 'vanilla' in testcase.permutations: + whole_command = testcase.prof_command + execute_test(whole_command, time_path, testcase.name, 'profile', config, "gnu-profiler") + if 'cached' in testcase.permutations: + execute_test(whole_command, time_path, testcase.name, 'profile_cached', config, "gnu-profiler") + + if 'ldpre' in testcase.permutations: + for opt in testcase.ldopts: + #Clear caches + subprocess.call(['sync'], shell=True) + subprocess.call([config.drop_caches], shell=True) + + #Create the command for executing moses: + whole_command = 'LD_PRELOAD=' + opt + " " + testcase.prof_command + variant = 'profile_ldpre_' + opt + + #test normal and cached + execute_test(whole_command, time_path, testcase.name, variant, config, "gnu-profiler") + if 'cached' in testcase.permutations: + execute_test(whole_command, time_path, testcase.name, variant + '_cached', config, "gnu-profiler") + + #Google-perftools profiler + if 'google-profiler' in testcase.permutations: + subprocess.call(['sync'], shell=True) # Drop caches first + subprocess.call([config.drop_caches], shell=True) + + #Create the command for executing moses + whole_command = "CPUPROFILE=/tmp/moses.prof " + testcase.gprof_command + + #test normal and cached + execute_test(whole_command, time_path, testcase.name, 'vanilla', config, 'google-profiler') + if 'cached' in testcase.permutations: + execute_test(whole_command, time_path, testcase.name, 'vanilla_cached', config, 'google-profiler') + + #Now perform LD_PRELOAD tests + if 'ldpre' in testcase.permutations: + for opt in testcase.ldopts: + #Clear caches + subprocess.call(['sync'], shell=True) + subprocess.call([config.drop_caches], shell=True) + + #Create the command for executing moses: + whole_command = 'LD_PRELOAD=' + opt + " " + whole_command + variant = 'ldpre_' + opt + + #test normal and cached + execute_test(whole_command, time_path, testcase.name, variant, config, 'google-profiler') + if 'cached' in testcase.permutations: + execute_test(whole_command, time_path, testcase.name, variant + '_cached', config, 'google-profiler') + + +# Go through all the test directories and executes tests +if __name__ == '__main__': + CONFIG = get_config() + ALL_DIR = os.listdir(CONFIG.tests) + + #We should first check if any of the tests is run for the first time. + #If some of them are run for the first time we should first get their + #time with the base version (usually the previous release) + FIRSTTIME = [] + TESTLOGS = [] + #Strip filenames of test underscores + for listline in os.listdir(CONFIG.testlogs): + listline = listline.replace('_vanilla', '') + listline = listline.replace('_cached', '') + listline = listline.replace('_ldpre', '') + TESTLOGS.append(listline) + for directory in ALL_DIR: + if directory not in TESTLOGS: + FIRSTTIME.append(directory) + + #Sometimes even though we have the log files, we will need to rerun them + #Against a base version, because we require a different baseversion (for + #example when a new version of Moses is released.) Therefore we should + #Check if the version of Moses that we have as a base version is in all + #of the log files. + + for logfile in os.listdir(CONFIG.testlogs): + logfile_name = CONFIG.testlogs + '/' + logfile + if os.path.isfile(logfile_name) and not check_for_basever(logfile_name, CONFIG.basebranch): + logfile = logfile.replace('_vanilla', '') + logfile = logfile.replace('_cached', '') + logfile = logfile.replace('_ldpre', '') + FIRSTTIME.append(logfile) + FIRSTTIME = list(set(FIRSTTIME)) #Deduplicate + + if FIRSTTIME != []: + #Create a new configuration for base version tests: + BASECONFIG = Configuration(CONFIG.repo, CONFIG.drop_caches,\ + CONFIG.tests, CONFIG.testlogs, CONFIG.basebranch,\ + CONFIG.baserev, CONFIG.repo_prof, CONFIG.repo_gprof) + BASECONFIG.additional_args(None, CONFIG.baserev, CONFIG.basebranch) + #Set up the repository and get its revision: + REVISION = repoinit(BASECONFIG) + BASECONFIG.set_revision(REVISION) + #Build + os.chdir(BASECONFIG.repo) + subprocess.call(['./previous.sh'], shell=True) + #If profiler configuration exists also init it + if BASECONFIG.repo_prof is not None: + repoinit(BASECONFIG, "gnu-profiler") + os.chdir(BASECONFIG.repo_prof) + subprocess.call(['./previous.sh'], shell=True) + + if BASECONFIG.repo_gprof is not None: + repoinit(BASECONFIG, "google-profiler") + os.chdir(BASECONFIG.repo_gprof) + subprocess.call(['./previous.sh'], shell=True) + + #Perform tests + for directory in FIRSTTIME: + cur_testcase = parse_configfile(BASECONFIG.tests + '/' + directory +\ + '/config', directory, BASECONFIG.repo, BASECONFIG.repo_prof, BASECONFIG.repo_gprof) + execute_tests(cur_testcase, directory, BASECONFIG) + + #Reset back the repository to the normal configuration + repoinit(CONFIG) + if BASECONFIG.repo_prof is not None: + repoinit(CONFIG, "gnu-profiler") + + if BASECONFIG.repo_gprof is not None: + repoinit(CONFIG, "google-profiler") + + #Builds moses + os.chdir(CONFIG.repo) + subprocess.call(['./previous.sh'], shell=True) + if CONFIG.repo_prof is not None: + os.chdir(CONFIG.repo_prof) + subprocess.call(['./previous.sh'], shell=True) + + if CONFIG.repo_gprof is not None: + os.chdir(CONFIG.repo_gprof) + subprocess.call(['./previous.sh'], shell=True) + + if CONFIG.singletest: + TESTCASE = parse_configfile(CONFIG.tests + '/' +\ + CONFIG.singletest + '/config', CONFIG.singletest, CONFIG.repo, CONFIG.repo_prof, CONFIG.repo_gprof) + execute_tests(TESTCASE, CONFIG.singletest, CONFIG) + else: + for directory in ALL_DIR: + cur_testcase = parse_configfile(CONFIG.tests + '/' + directory +\ + '/config', directory, CONFIG.repo, CONFIG.repo_prof, CONFIG.repo_gprof) + execute_tests(cur_testcase, directory, CONFIG) diff --git a/contrib/moses-speedtest/sys_drop_caches.py b/contrib/moses-speedtest/sys_drop_caches.py new file mode 100644 index 0000000000..d4796e0905 --- /dev/null +++ b/contrib/moses-speedtest/sys_drop_caches.py @@ -0,0 +1,22 @@ +#!/usr/bin/spython +from sys import argv, stderr, exit +from os import linesep as ls +procfile = "/proc/sys/vm/drop_caches" +options = ["1","2","3"] +flush_type = None +try: + flush_type = argv[1][0:1] + if not flush_type in options: + raise IndexError, "not in options" + with open(procfile, "w") as f: + f.write("%s%s" % (flush_type,ls)) + exit(0) +except IndexError, e: + stderr.write("Argument %s required.%s" % (options, ls)) +except IOError, e: + stderr.write("Error writing to file.%s" % ls) +except StandardError, e: + stderr.write("Unknown Error.%s" % ls) + +exit(1) + diff --git a/contrib/moses-speedtest/test_config b/contrib/moses-speedtest/test_config new file mode 100644 index 0000000000..4a480f4963 --- /dev/null +++ b/contrib/moses-speedtest/test_config @@ -0,0 +1,3 @@ +Command: moses -f ... -i fff #Looks for the command in the /bin directory of the repo specified in the testsuite_config +LDPRE: ldpreloads #Comma separated LD_LIBRARY_PATH:/, +Variants: vanilla, cached, ldpre #Can't have cached without ldpre or vanilla diff --git a/contrib/moses-speedtest/testsuite_common.py b/contrib/moses-speedtest/testsuite_common.py new file mode 100644 index 0000000000..be96f98b5e --- /dev/null +++ b/contrib/moses-speedtest/testsuite_common.py @@ -0,0 +1,54 @@ +"""Common functions of the testsuitce""" +import os +#Clour constants +class bcolors: + PURPLE = '\033[95m' + BLUE = '\033[94m' + GREEN = '\033[92m' + YELLOW = '\033[93m' + RED = '\033[91m' + ENDC = '\033[0m' + +class LogLine: + """A class to contain logfile line""" + def __init__(self, date, time, revision, testname, real, user, system, branch): + self.date = date + self.time = time + self.revision = revision + self.testname = testname + self.real = real + self.system = system + self.user = user + self.branch = branch + +class Result: + """A class to contain results of benchmarking""" + def __init__(self, testname, previous, current, revision, branch, prevrev, prevbranch): + self.testname = testname + self.previous = previous + self.current = current + self.change = previous - current + self.revision = revision + self.branch = branch + self.prevbranch = prevbranch + self.prevrev = prevrev + #Produce a percentage with fewer digits + self.percentage = float(format(1 - current/previous, '.4f')) + +def processLogLine(logline): + """Parses the log line into a nice datastructure""" + logline = logline.split() + log = LogLine(logline[0], logline[1], logline[2], logline[4],\ + float(logline[6]), float(logline[8]), float(logline[10]), logline[12]) + return log + +def getLastTwoLines(filename, logdir): + """Just a call to tail to get the diff between the last two runs""" + try: + line1, line2 = os.popen("tail -n2 " + logdir + '/' + filename) + except ValueError: #Check for new tests + tempfile = open(logdir + '/' + filename) + line1 = tempfile.readline() + tempfile.close() + return (line1, '\n') + return (line1, line2) diff --git a/contrib/moses-speedtest/testsuite_config b/contrib/moses-speedtest/testsuite_config new file mode 100644 index 0000000000..b6ad6181c5 --- /dev/null +++ b/contrib/moses-speedtest/testsuite_config @@ -0,0 +1,5 @@ +MOSES_REPO_PATH: /home/moses-speedtest/moses-standard/mosesdecoder +DROP_CACHES_COMM: sys_drop_caches 3 +TEST_DIR: /home/moses-speedtest/phrase_tables/tests +TEST_LOG_DIR: /home/moses-speedtest/phrase_tables/testlogs +BASEBRANCH: RELEASE-2.1.1 \ No newline at end of file diff --git a/contrib/omtc/omtc b/contrib/omtc/omtc deleted file mode 160000 index cab9757bdf..0000000000 --- a/contrib/omtc/omtc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cab9757bdfac3bc4fa94fe6dcea8f5f6a7c61767 diff --git a/contrib/other-builds/CreateOnDisk.vcxproj b/contrib/other-builds/CreateOnDisk.vcxproj deleted file mode 100644 index f7f6694ca5..0000000000 --- a/contrib/other-builds/CreateOnDisk.vcxproj +++ /dev/null @@ -1,176 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {88AE90C9-72D2-42ED-8389-770ACDCD4308} - CreateOnDisk - Win32Proj - - - - Application - Unicode - true - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - true - true - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - false - false - C:\Program Files\boost\boost_1_47;$(IncludePath) - C:\Program Files\boost\boost_1_47;$(IncludePath) - C:\Program Files\boost\boost_1_47;$(IncludePath) - C:\Program Files\boost\boost_1_47;$(IncludePath) - - - - Disabled - WITH_THREADS;NO_PIPES;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - C:\Program Files\boost\boost_1_51;$(SolutionDir)/../../moses/src;$(SolutionDir)/../..;%(AdditionalIncludeDirectories) - - - C:\GnuWin32\lib\zlib.lib;$(SolutionDir)/$(Configuration)/moses.lib;$(SolutionDir)/$(Configuration)/kenlm.lib;$(SolutionDir)/$(Configuration)/OnDiskPt.lib;%(AdditionalDependencies) - true - Console - MachineX86 - C:\Program Files\boost\boost_1_51\lib;%(AdditionalLibraryDirectories) - - - - - Disabled - WITH_THREADS;NO_PIPES;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - C:\Program Files\boost\boost_1_51;$(SolutionDir)/../../moses/src;$(SolutionDir)/../..;%(AdditionalIncludeDirectories) - - - C:\GnuWin32\lib\zlib.lib;$(SolutionDir)/$(Configuration)/moses.lib;$(SolutionDir)/$(Configuration)/kenlm.lib;$(SolutionDir)/$(Configuration)/OnDiskPt.lib;%(AdditionalDependencies) - true - Console - C:\Program Files\boost\boost_1_51\lib;%(AdditionalLibraryDirectories) - - - - - MaxSpeed - true - WITH_THREADS;NO_PIPES;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - C:\boost\boost_1_47;$(SolutionDir)/../../moses/src;$(SolutionDir)/../..;%(AdditionalIncludeDirectories) - - - C:\GnuWin32\lib\zlib.lib;$(SolutionDir)/$(Configuration)/moses.lib;$(SolutionDir)/$(Configuration)/kenlm.lib;$(SolutionDir)/$(Configuration)/OnDiskPt.lib;%(AdditionalDependencies) - true - Console - true - true - MachineX86 - C:\boost\boost_1_47\lib;%(AdditionalLibraryDirectories) - - - - - MaxSpeed - true - WITH_THREADS;NO_PIPES;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - C:\boost\boost_1_47;$(SolutionDir)/../../moses/src;$(SolutionDir)/../..;%(AdditionalIncludeDirectories) - - - C:\GnuWin32\lib\zlib.lib;$(SolutionDir)/$(Configuration)/moses.lib;$(SolutionDir)/$(Configuration)/kenlm.lib;$(SolutionDir)/$(Configuration)/OnDiskPt.lib;%(AdditionalDependencies) - true - Console - true - true - C:\boost\boost_1_47\lib;%(AdditionalLibraryDirectories) - - - - - - - - - - - - - - \ No newline at end of file diff --git a/contrib/other-builds/CreateOnDisk.xcodeproj/project.pbxproj b/contrib/other-builds/CreateOnDisk.xcodeproj/project.pbxproj deleted file mode 100644 index 9c5b8215a8..0000000000 --- a/contrib/other-builds/CreateOnDisk.xcodeproj/project.pbxproj +++ /dev/null @@ -1,395 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1EBA432514B97B35003CC0EA /* Main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA432314B97B35003CC0EA /* Main.cpp */; }; - 1EF0707114B9EE800052152A /* liblm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EBA45C014B97EF1003CC0EA /* liblm.a */; }; - 1EF0707214B9EE800052152A /* libmoses.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EBA432E14B97CA1003CC0EA /* libmoses.a */; }; - 1EF0707314B9EE800052152A /* libOnDiskPt.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EBA433714B97CA6003CC0EA /* libOnDiskPt.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1EBA432D14B97CA1003CC0EA /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EBA432614B97CA1003CC0EA /* moses.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC046055464E500DB518D; - remoteInfo = moses; - }; - 1EBA433614B97CA6003CC0EA /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EBA432F14B97CA6003CC0EA /* OnDiskPt.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC046055464E500DB518D; - remoteInfo = OnDiskPt; - }; - 1EBA45BF14B97EF1003CC0EA /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EBA45B414B97EF1003CC0EA /* lm.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1EE8C2E91476A48E002496F2; - remoteInfo = lm; - }; - 1EF0707614B9EE930052152A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EBA432F14B97CA6003CC0EA /* OnDiskPt.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC045055464E500DB518D; - remoteInfo = OnDiskPt; - }; - 1EF0707814B9EE980052152A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EBA432614B97CA1003CC0EA /* moses.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC045055464E500DB518D; - remoteInfo = moses; - }; - 1EF0707A14B9EE9C0052152A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EBA45B414B97EF1003CC0EA /* lm.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 1EE8C2E81476A48E002496F2; - remoteInfo = lm; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 8DD76F690486A84900D96B5E /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 8; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1E4FC4861251FFBF00FB0D9D /* CreateOnDisk */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = CreateOnDisk; sourceTree = BUILT_PRODUCTS_DIR; }; - 1EBA432314B97B35003CC0EA /* Main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = ../../OnDiskPt/Main.cpp; sourceTree = ""; }; - 1EBA432414B97B35003CC0EA /* Main.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Main.h; path = ../../OnDiskPt/Main.h; sourceTree = ""; }; - 1EBA432614B97CA1003CC0EA /* moses.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = moses.xcodeproj; sourceTree = ""; }; - 1EBA432F14B97CA6003CC0EA /* OnDiskPt.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = OnDiskPt.xcodeproj; sourceTree = ""; }; - 1EBA45B414B97EF1003CC0EA /* lm.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = lm.xcodeproj; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8DD76F660486A84900D96B5E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EF0707114B9EE800052152A /* liblm.a in Frameworks */, - 1EF0707214B9EE800052152A /* libmoses.a in Frameworks */, - 1EF0707314B9EE800052152A /* libOnDiskPt.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 08FB7794FE84155DC02AAC07 /* CreateOnDisk */ = { - isa = PBXGroup; - children = ( - 08FB7795FE84155DC02AAC07 /* Source */, - C6859E8C029090F304C91782 /* Documentation */, - 1AB674ADFE9D54B511CA2CBB /* Products */, - 1EBA432614B97CA1003CC0EA /* moses.xcodeproj */, - 1EBA432F14B97CA6003CC0EA /* OnDiskPt.xcodeproj */, - 1EBA45B414B97EF1003CC0EA /* lm.xcodeproj */, - ); - name = CreateOnDisk; - sourceTree = ""; - }; - 08FB7795FE84155DC02AAC07 /* Source */ = { - isa = PBXGroup; - children = ( - 1EBA432314B97B35003CC0EA /* Main.cpp */, - 1EBA432414B97B35003CC0EA /* Main.h */, - ); - name = Source; - sourceTree = ""; - }; - 1AB674ADFE9D54B511CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 1E4FC4861251FFBF00FB0D9D /* CreateOnDisk */, - ); - name = Products; - sourceTree = ""; - }; - 1EBA432714B97CA1003CC0EA /* Products */ = { - isa = PBXGroup; - children = ( - 1EBA432E14B97CA1003CC0EA /* libmoses.a */, - ); - name = Products; - sourceTree = ""; - }; - 1EBA433014B97CA6003CC0EA /* Products */ = { - isa = PBXGroup; - children = ( - 1EBA433714B97CA6003CC0EA /* libOnDiskPt.a */, - ); - name = Products; - sourceTree = ""; - }; - 1EBA45B514B97EF1003CC0EA /* Products */ = { - isa = PBXGroup; - children = ( - 1EBA45C014B97EF1003CC0EA /* liblm.a */, - ); - name = Products; - sourceTree = ""; - }; - C6859E8C029090F304C91782 /* Documentation */ = { - isa = PBXGroup; - children = ( - ); - name = Documentation; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8DD76F620486A84900D96B5E /* CreateOnDisk */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "CreateOnDisk" */; - buildPhases = ( - 8DD76F640486A84900D96B5E /* Sources */, - 8DD76F660486A84900D96B5E /* Frameworks */, - 8DD76F690486A84900D96B5E /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - 1EF0707B14B9EE9C0052152A /* PBXTargetDependency */, - 1EF0707914B9EE980052152A /* PBXTargetDependency */, - 1EF0707714B9EE930052152A /* PBXTargetDependency */, - ); - name = CreateOnDisk; - productInstallPath = "$(HOME)/bin"; - productName = CreateOnDisk; - productReference = 1E4FC4861251FFBF00FB0D9D /* CreateOnDisk */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "CreateOnDisk" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 08FB7794FE84155DC02AAC07 /* CreateOnDisk */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 1EBA45B514B97EF1003CC0EA /* Products */; - ProjectRef = 1EBA45B414B97EF1003CC0EA /* lm.xcodeproj */; - }, - { - ProductGroup = 1EBA432714B97CA1003CC0EA /* Products */; - ProjectRef = 1EBA432614B97CA1003CC0EA /* moses.xcodeproj */; - }, - { - ProductGroup = 1EBA433014B97CA6003CC0EA /* Products */; - ProjectRef = 1EBA432F14B97CA6003CC0EA /* OnDiskPt.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 8DD76F620486A84900D96B5E /* CreateOnDisk */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 1EBA432E14B97CA1003CC0EA /* libmoses.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libmoses.a; - remoteRef = 1EBA432D14B97CA1003CC0EA /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1EBA433714B97CA6003CC0EA /* libOnDiskPt.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libOnDiskPt.a; - remoteRef = 1EBA433614B97CA6003CC0EA /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1EBA45C014B97EF1003CC0EA /* liblm.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = liblm.a; - remoteRef = 1EBA45BF14B97EF1003CC0EA /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXSourcesBuildPhase section */ - 8DD76F640486A84900D96B5E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EBA432514B97B35003CC0EA /* Main.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 1EF0707714B9EE930052152A /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = OnDiskPt; - targetProxy = 1EF0707614B9EE930052152A /* PBXContainerItemProxy */; - }; - 1EF0707914B9EE980052152A /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = moses; - targetProxy = 1EF0707814B9EE980052152A /* PBXContainerItemProxy */; - }; - 1EF0707B14B9EE9C0052152A /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = lm; - targetProxy = 1EF0707A14B9EE9C0052152A /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1DEB923208733DC60010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - HEADER_SEARCH_PATHS = ( - ../../, - ../../irstlm/include, - ); - INSTALL_PATH = /usr/local/bin; - LIBRARY_SEARCH_PATHS = ( - ../../irstlm/lib, - ../../srilm/lib/macosx, - ../../randlm/lib, - /opt/local/lib, - ); - OTHER_LDFLAGS = ( - "-lz", - "-lirstlm", - "-lmisc", - "-ldstruct", - "-loolm", - "-lflm", - "-llattice", - "-lrandlm", - "-lboost_thread-mt", - ); - PRODUCT_NAME = CreateOnDisk; - }; - name = Debug; - }; - 1DEB923308733DC60010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_MODEL_TUNING = G5; - HEADER_SEARCH_PATHS = ( - ../../, - ../../irstlm/include, - ); - INSTALL_PATH = /usr/local/bin; - LIBRARY_SEARCH_PATHS = ( - ../../irstlm/lib, - ../../srilm/lib/macosx, - ../../randlm/lib, - /opt/local/lib, - ); - OTHER_LDFLAGS = ( - "-lz", - "-lirstlm", - "-lmisc", - "-ldstruct", - "-loolm", - "-lflm", - "-llattice", - "-lrandlm", - "-lboost_thread-mt", - ); - PRODUCT_NAME = CreateOnDisk; - }; - name = Release; - }; - 1DEB923608733DC60010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ../../irstlm/include; - LIBRARY_SEARCH_PATHS = ""; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = macosx10.6; - }; - name = Debug; - }; - 1DEB923708733DC60010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ../../irstlm/include; - LIBRARY_SEARCH_PATHS = ""; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = macosx10.6; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "CreateOnDisk" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB923208733DC60010E9CD /* Debug */, - 1DEB923308733DC60010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "CreateOnDisk" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB923608733DC60010E9CD /* Debug */, - 1DEB923708733DC60010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; -} diff --git a/contrib/other-builds/CreateOnDiskPt/.cproject b/contrib/other-builds/CreateOnDiskPt/.cproject new file mode 100644 index 0000000000..5109ea082a --- /dev/null +++ b/contrib/other-builds/CreateOnDiskPt/.cproject @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/CreateOnDiskPt/.project b/contrib/other-builds/CreateOnDiskPt/.project new file mode 100644 index 0000000000..5bca3b8f2d --- /dev/null +++ b/contrib/other-builds/CreateOnDiskPt/.project @@ -0,0 +1,44 @@ + + + CreateOnDiskPt + + + lm + moses + OnDiskPt + search + util + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + Main.cpp + 1 + PARENT-3-PROJECT_LOC/OnDiskPt/Main.cpp + + + Main.h + 1 + PARENT-3-PROJECT_LOC/OnDiskPt/Main.h + + + diff --git a/contrib/other-builds/CreateProbingPT/.cproject b/contrib/other-builds/CreateProbingPT/.cproject new file mode 100644 index 0000000000..a06a01f4a6 --- /dev/null +++ b/contrib/other-builds/CreateProbingPT/.cproject @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/CreateProbingPT/.project b/contrib/other-builds/CreateProbingPT/.project new file mode 100644 index 0000000000..6e863a77ef --- /dev/null +++ b/contrib/other-builds/CreateProbingPT/.project @@ -0,0 +1,36 @@ + + + CreateProbingPT + + + moses + util + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + CreateProbingPT.cpp + 1 + PARENT-3-PROJECT_LOC/probingpt/CreateProbingPT.cpp + + + diff --git a/contrib/other-builds/MosesManagedDLL/ManagedMoses.cpp b/contrib/other-builds/MosesManagedDLL/ManagedMoses.cpp new file mode 100644 index 0000000000..f897625c49 --- /dev/null +++ b/contrib/other-builds/MosesManagedDLL/ManagedMoses.cpp @@ -0,0 +1,28 @@ +#include +#include "Moses2Wrapper.h" + +using namespace System; +using namespace msclr::interop; + +//TODO: include headers as per the build process +namespace Moses { + public ref class Moses2Wrapper + { + public: + Moses2Wrapper(String^ filePath) { + const std::string standardString = marshal_as(filePath); + m_pWrapper = new Moses2::Moses2Wrapper(standardString); + } + ~Moses2Wrapper() { this->!Moses2Wrapper(); } + String^ Translate(String^ input, long requestId) { + const std::string standardString = marshal_as(input); + std::string output = m_pWrapper->Translate(standardString, requestId); + String^ str = gcnew String(output.c_str()); + return str; + } + protected: + !Moses2Wrapper() { delete m_pWrapper; m_pWrapper = nullptr; } + private: + Moses2::Moses2Wrapper *m_pWrapper; + }; +} \ No newline at end of file diff --git a/contrib/other-builds/MosesManagedDLL/MosesManagedDLL.vcxproj b/contrib/other-builds/MosesManagedDLL/MosesManagedDLL.vcxproj new file mode 100644 index 0000000000..804bcc011b --- /dev/null +++ b/contrib/other-builds/MosesManagedDLL/MosesManagedDLL.vcxproj @@ -0,0 +1,170 @@ + + + + + Debug + Win32 + + + Release + Win32 + + + Debug + x64 + + + Release + x64 + + + + 16.0 + Win32Proj + {5fb67144-27c9-4993-a084-e2097ffcc4fe} + MosesManagedDLL + 10.0 + + + + DynamicLibrary + true + v142 + Unicode + + + DynamicLibrary + false + v142 + true + Unicode + + + DynamicLibrary + true + v142 + Unicode + true + + + DynamicLibrary + false + v142 + true + Unicode + + + + + + + + + + + + + + + + + + + + + true + + + false + + + true + + + false + + + + Level3 + true + WIN32;_DEBUG;MOSESMANAGEDDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + false + + + + + Level3 + true + true + true + WIN32;NDEBUG;MOSESMANAGEDDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + true + true + false + + + + + Level3 + true + _DEBUG;MOSESMANAGEDDLL_EXPORTS;NO_COMPACT_TABLES;HAVE_CMPHXXX;MAX_NUM_FACTORS=4;KENLM_MAX_ORDER=6;_USE_MATH_DEFINES;NOMINMAX;WITH_THREADS;NO_PIPES;_CONSOLE;_LIB;%(PreprocessorDefinitions) + false + NotUsing + pch.h + F:\boost_1_72_0;D:\moses-mstranslator;D:\xmlrpc-c-1.51.06\include;D:\moses-mstranslator\moses2 + true + MultiThreadedDebugDLL + + + Windows + true + false + D:\zlib-1.2.8\contrib\vstudio\vc11\x64\ZlibDllRelease;D:\xmlrpc-c-1.51.06\bin\Debug-Static-x64;C:\Users\sija\Downloads\2.0.2\bonitao-cmph-e5f83da\Debug;D:\zlib_1_2_8_msvc2015_64\msvc2015_64\lib\zlib;D:\mman-win32-master\x64\Release;F:\boost_1_72_0\lib64-msvc-14.2;%(AdditionalLibraryDirectories) + libxmlrpc.lib;libxmlrpc_server_abyss.lib;libxmlrpc_server.lib;libxmlrpc_abyss.lib;libxmlrpc_util.lib;libxmlrpc_xmlparse.lib;libxmlrpc_xmltok.lib;libxmlrpc++.lib;zlibwapi.lib;mman.lib;cmph.lib;%(AdditionalDependencies) + + + + + Level3 + true + true + true + NDEBUG;MOSESMANAGEDDLL_EXPORTS;_WINDOWS;_USRDLL;%(PreprocessorDefinitions) + true + Use + pch.h + + + Windows + true + true + true + false + + + + + + + + {b4304e97-d37f-4022-bd03-841a4faee398} + + + + + + \ No newline at end of file diff --git a/contrib/other-builds/MosesManagedDLL/MosesManagedDLL.vcxproj.filters b/contrib/other-builds/MosesManagedDLL/MosesManagedDLL.vcxproj.filters new file mode 100644 index 0000000000..8bd68daf05 --- /dev/null +++ b/contrib/other-builds/MosesManagedDLL/MosesManagedDLL.vcxproj.filters @@ -0,0 +1,22 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;c++;cppm;ixx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + + + Source Files + + + \ No newline at end of file diff --git a/contrib/other-builds/MosesWrapperTest/MosesWrapperTest.csproj b/contrib/other-builds/MosesWrapperTest/MosesWrapperTest.csproj new file mode 100644 index 0000000000..333fca400f --- /dev/null +++ b/contrib/other-builds/MosesWrapperTest/MosesWrapperTest.csproj @@ -0,0 +1,86 @@ + + + + + Debug + AnyCPU + {A2B603DB-F52E-4A83-BB61-F23D212E6482} + Exe + MosesWrapperTest + MosesWrapperTest + v4.7.2 + 512 + true + true + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + + + x64 + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 2 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + + + {5fb67144-27c9-4993-a084-e2097ffcc4fe} + MosesManagedDLL + + + + + False + Microsoft .NET Framework 4.7.2 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 + false + + + + \ No newline at end of file diff --git a/contrib/other-builds/MosesWrapperTest/Program.cs b/contrib/other-builds/MosesWrapperTest/Program.cs new file mode 100644 index 0000000000..97fed28638 --- /dev/null +++ b/contrib/other-builds/MosesWrapperTest/Program.cs @@ -0,0 +1,19 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using Moses; +namespace MosesWrapperTest +{ + class Program { + + static void Main(string[] args) + { + Moses2Wrapper e = new Moses2Wrapper("D:/moses-mstranslator/test_sentence_with_candidates/moses_mspt.ini"); + string mystring = e.Translate("फ ो ट ो ं @@@ ट ||| a ||| 0.5338410658500136 $$$ ट ||| c ||| 0.10587171128910133 $$$ ट ||| m ||| 0.7056508746775306 $$$ ं ||| l ||| 0.29237797398236876 $$$ ं ||| o ||| 0.4026301817948226 $$$ ं ||| r ||| 0.20594041196734436 $$$ फ ||| c ||| 0.46792456587433573 $$$ फ ||| g ||| 0.43855815762641204 $$$ फ ||| x ||| 0.7077570324853759 $$$ ो ||| h ||| 0.9869239425073358 $$$ ो ||| i ||| 0.6660016809625412 $$$ ो ||| h ||| 0.8425506301302961", 123456789); + Console.WriteLine(mystring); + return; + } + } +} diff --git a/contrib/other-builds/OnDiskPt.vcxproj b/contrib/other-builds/OnDiskPt.vcxproj deleted file mode 100644 index f9096b9929..0000000000 --- a/contrib/other-builds/OnDiskPt.vcxproj +++ /dev/null @@ -1,162 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - {8B07671B-CBAF-4514-AFFD-CE238CD427E9} - OnDiskPt - Win32Proj - - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - C:\Program Files\boost\boost_1_47;$(IncludePath) - C:\Program Files\boost\boost_1_47;$(IncludePath) - C:\Program Files\boost\boost_1_47;$(IncludePath) - C:\Program Files\boost\boost_1_47;$(IncludePath) - - - - Disabled - WITH_THREADS;NO_PIPES;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - C:\Program Files\boost\boost_1_51;$(SolutionDir)/../../moses/src;$(SolutionDir)/../..;%(AdditionalIncludeDirectories) - - - C:\Program Files\boost\boost_1_51\lib - - - - - Disabled - WITH_THREADS;NO_PIPES;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - C:\Program Files\boost\boost_1_51;$(SolutionDir)/../../moses/src;$(SolutionDir)/../..;%(AdditionalIncludeDirectories) - - - C:\Program Files\boost\boost_1_51\lib - - - - - MaxSpeed - true - WITH_THREADS;NO_PIPES;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - C:\boost\boost_1_47;$(SolutionDir)/../../moses/src;$(SolutionDir)/../..;%(AdditionalIncludeDirectories) - - - - - MaxSpeed - true - WITH_THREADS;NO_PIPES;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - MultiThreadedDLL - true - - - Level3 - ProgramDatabase - C:\boost\boost_1_47;$(SolutionDir)/../../moses/src;$(SolutionDir)/../..;%(AdditionalIncludeDirectories) - - - - - - \ No newline at end of file diff --git a/contrib/other-builds/OnDiskPt.xcodeproj/project.pbxproj b/contrib/other-builds/OnDiskPt.xcodeproj/project.pbxproj deleted file mode 100644 index 47c4ef295a..0000000000 --- a/contrib/other-builds/OnDiskPt.xcodeproj/project.pbxproj +++ /dev/null @@ -1,280 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1EBA430C14B97ABF003CC0EA /* OnDiskWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA42FA14B97ABF003CC0EA /* OnDiskWrapper.cpp */; }; - 1EBA430D14B97ABF003CC0EA /* OnDiskWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA42FB14B97ABF003CC0EA /* OnDiskWrapper.h */; }; - 1EBA430E14B97ABF003CC0EA /* Phrase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA42FC14B97ABF003CC0EA /* Phrase.cpp */; }; - 1EBA430F14B97ABF003CC0EA /* Phrase.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA42FD14B97ABF003CC0EA /* Phrase.h */; }; - 1EBA431014B97ABF003CC0EA /* PhraseNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA42FE14B97ABF003CC0EA /* PhraseNode.cpp */; }; - 1EBA431114B97ABF003CC0EA /* PhraseNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA42FF14B97ABF003CC0EA /* PhraseNode.h */; }; - 1EBA431214B97ABF003CC0EA /* SourcePhrase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA430014B97ABF003CC0EA /* SourcePhrase.cpp */; }; - 1EBA431314B97ABF003CC0EA /* SourcePhrase.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA430114B97ABF003CC0EA /* SourcePhrase.h */; }; - 1EBA431414B97ABF003CC0EA /* TargetPhrase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA430214B97ABF003CC0EA /* TargetPhrase.cpp */; }; - 1EBA431514B97ABF003CC0EA /* TargetPhrase.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA430314B97ABF003CC0EA /* TargetPhrase.h */; }; - 1EBA431614B97ABF003CC0EA /* TargetPhraseCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA430414B97ABF003CC0EA /* TargetPhraseCollection.cpp */; }; - 1EBA431714B97ABF003CC0EA /* TargetPhraseCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA430514B97ABF003CC0EA /* TargetPhraseCollection.h */; }; - 1EBA431814B97ABF003CC0EA /* Vocab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA430614B97ABF003CC0EA /* Vocab.cpp */; }; - 1EBA431914B97ABF003CC0EA /* Vocab.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA430714B97ABF003CC0EA /* Vocab.h */; }; - 1EBA431A14B97ABF003CC0EA /* Word.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA430814B97ABF003CC0EA /* Word.cpp */; }; - 1EBA431B14B97ABF003CC0EA /* Word.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA430914B97ABF003CC0EA /* Word.h */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 1EBA42FA14B97ABF003CC0EA /* OnDiskWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OnDiskWrapper.cpp; path = ../../OnDiskPt/OnDiskWrapper.cpp; sourceTree = ""; }; - 1EBA42FB14B97ABF003CC0EA /* OnDiskWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OnDiskWrapper.h; path = ../../OnDiskPt/OnDiskWrapper.h; sourceTree = ""; }; - 1EBA42FC14B97ABF003CC0EA /* Phrase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Phrase.cpp; path = ../../OnDiskPt/Phrase.cpp; sourceTree = ""; }; - 1EBA42FD14B97ABF003CC0EA /* Phrase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Phrase.h; path = ../../OnDiskPt/Phrase.h; sourceTree = ""; }; - 1EBA42FE14B97ABF003CC0EA /* PhraseNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseNode.cpp; path = ../../OnDiskPt/PhraseNode.cpp; sourceTree = ""; }; - 1EBA42FF14B97ABF003CC0EA /* PhraseNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseNode.h; path = ../../OnDiskPt/PhraseNode.h; sourceTree = ""; }; - 1EBA430014B97ABF003CC0EA /* SourcePhrase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SourcePhrase.cpp; path = ../../OnDiskPt/SourcePhrase.cpp; sourceTree = ""; }; - 1EBA430114B97ABF003CC0EA /* SourcePhrase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SourcePhrase.h; path = ../../OnDiskPt/SourcePhrase.h; sourceTree = ""; }; - 1EBA430214B97ABF003CC0EA /* TargetPhrase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TargetPhrase.cpp; path = ../../OnDiskPt/TargetPhrase.cpp; sourceTree = ""; }; - 1EBA430314B97ABF003CC0EA /* TargetPhrase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TargetPhrase.h; path = ../../OnDiskPt/TargetPhrase.h; sourceTree = ""; }; - 1EBA430414B97ABF003CC0EA /* TargetPhraseCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TargetPhraseCollection.cpp; path = ../../OnDiskPt/TargetPhraseCollection.cpp; sourceTree = ""; }; - 1EBA430514B97ABF003CC0EA /* TargetPhraseCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TargetPhraseCollection.h; path = ../../OnDiskPt/TargetPhraseCollection.h; sourceTree = ""; }; - 1EBA430614B97ABF003CC0EA /* Vocab.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Vocab.cpp; path = ../../OnDiskPt/Vocab.cpp; sourceTree = ""; }; - 1EBA430714B97ABF003CC0EA /* Vocab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Vocab.h; path = ../../OnDiskPt/Vocab.h; sourceTree = ""; }; - 1EBA430814B97ABF003CC0EA /* Word.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Word.cpp; path = ../../OnDiskPt/Word.cpp; sourceTree = ""; }; - 1EBA430914B97ABF003CC0EA /* Word.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Word.h; path = ../../OnDiskPt/Word.h; sourceTree = ""; }; - D2AAC046055464E500DB518D /* libOnDiskPt.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libOnDiskPt.a; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - D289987405E68DCB004EDB86 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 08FB7794FE84155DC02AAC07 /* OnDiskPt */ = { - isa = PBXGroup; - children = ( - 08FB7795FE84155DC02AAC07 /* Source */, - C6A0FF2B0290797F04C91782 /* Documentation */, - 1AB674ADFE9D54B511CA2CBB /* Products */, - ); - name = OnDiskPt; - sourceTree = ""; - }; - 08FB7795FE84155DC02AAC07 /* Source */ = { - isa = PBXGroup; - children = ( - 1EBA42FA14B97ABF003CC0EA /* OnDiskWrapper.cpp */, - 1EBA42FB14B97ABF003CC0EA /* OnDiskWrapper.h */, - 1EBA42FC14B97ABF003CC0EA /* Phrase.cpp */, - 1EBA42FD14B97ABF003CC0EA /* Phrase.h */, - 1EBA42FE14B97ABF003CC0EA /* PhraseNode.cpp */, - 1EBA42FF14B97ABF003CC0EA /* PhraseNode.h */, - 1EBA430014B97ABF003CC0EA /* SourcePhrase.cpp */, - 1EBA430114B97ABF003CC0EA /* SourcePhrase.h */, - 1EBA430214B97ABF003CC0EA /* TargetPhrase.cpp */, - 1EBA430314B97ABF003CC0EA /* TargetPhrase.h */, - 1EBA430414B97ABF003CC0EA /* TargetPhraseCollection.cpp */, - 1EBA430514B97ABF003CC0EA /* TargetPhraseCollection.h */, - 1EBA430614B97ABF003CC0EA /* Vocab.cpp */, - 1EBA430714B97ABF003CC0EA /* Vocab.h */, - 1EBA430814B97ABF003CC0EA /* Word.cpp */, - 1EBA430914B97ABF003CC0EA /* Word.h */, - ); - name = Source; - sourceTree = ""; - }; - 1AB674ADFE9D54B511CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - D2AAC046055464E500DB518D /* libOnDiskPt.a */, - ); - name = Products; - sourceTree = ""; - }; - C6A0FF2B0290797F04C91782 /* Documentation */ = { - isa = PBXGroup; - children = ( - ); - name = Documentation; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - D2AAC043055464E500DB518D /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EBA430D14B97ABF003CC0EA /* OnDiskWrapper.h in Headers */, - 1EBA430F14B97ABF003CC0EA /* Phrase.h in Headers */, - 1EBA431114B97ABF003CC0EA /* PhraseNode.h in Headers */, - 1EBA431314B97ABF003CC0EA /* SourcePhrase.h in Headers */, - 1EBA431514B97ABF003CC0EA /* TargetPhrase.h in Headers */, - 1EBA431714B97ABF003CC0EA /* TargetPhraseCollection.h in Headers */, - 1EBA431914B97ABF003CC0EA /* Vocab.h in Headers */, - 1EBA431B14B97ABF003CC0EA /* Word.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - D2AAC045055464E500DB518D /* OnDiskPt */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1DEB91EB08733DB70010E9CD /* Build configuration list for PBXNativeTarget "OnDiskPt" */; - buildPhases = ( - D2AAC043055464E500DB518D /* Headers */, - D2AAC044055464E500DB518D /* Sources */, - D289987405E68DCB004EDB86 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = OnDiskPt; - productName = OnDiskPt; - productReference = D2AAC046055464E500DB518D /* libOnDiskPt.a */; - productType = "com.apple.product-type.library.static"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "OnDiskPt" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 08FB7794FE84155DC02AAC07 /* OnDiskPt */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - D2AAC045055464E500DB518D /* OnDiskPt */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - D2AAC044055464E500DB518D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EBA430C14B97ABF003CC0EA /* OnDiskWrapper.cpp in Sources */, - 1EBA430E14B97ABF003CC0EA /* Phrase.cpp in Sources */, - 1EBA431014B97ABF003CC0EA /* PhraseNode.cpp in Sources */, - 1EBA431214B97ABF003CC0EA /* SourcePhrase.cpp in Sources */, - 1EBA431414B97ABF003CC0EA /* TargetPhrase.cpp in Sources */, - 1EBA431614B97ABF003CC0EA /* TargetPhraseCollection.cpp in Sources */, - 1EBA431814B97ABF003CC0EA /* Vocab.cpp in Sources */, - 1EBA431A14B97ABF003CC0EA /* Word.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1DEB91EC08733DB70010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = "MAX_NUM_FACTORS=4"; - HEADER_SEARCH_PATHS = ( - /opt/local/include, - ../.., - ); - INSTALL_PATH = /usr/local/lib; - PRODUCT_NAME = OnDiskPt; - SDKROOT = ""; - }; - name = Debug; - }; - 1DEB91ED08733DB70010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_MODEL_TUNING = G5; - GCC_PREPROCESSOR_DEFINITIONS = "MAX_NUM_FACTORS=4"; - HEADER_SEARCH_PATHS = ( - /opt/local/include, - ../.., - ); - INSTALL_PATH = /usr/local/lib; - PRODUCT_NAME = OnDiskPt; - SDKROOT = ""; - }; - name = Release; - }; - 1DEB91F008733DB70010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = /usr/local/include; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = macosx10.6; - }; - name = Debug; - }; - 1DEB91F108733DB70010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = /usr/local/include; - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = macosx10.6; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1DEB91EB08733DB70010E9CD /* Build configuration list for PBXNativeTarget "OnDiskPt" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB91EC08733DB70010E9CD /* Debug */, - 1DEB91ED08733DB70010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "OnDiskPt" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB91F008733DB70010E9CD /* Debug */, - 1DEB91F108733DB70010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; -} diff --git a/contrib/other-builds/OnDiskPt/.cproject b/contrib/other-builds/OnDiskPt/.cproject index f551380fd9..544bb24f5e 100644 --- a/contrib/other-builds/OnDiskPt/.cproject +++ b/contrib/other-builds/OnDiskPt/.cproject @@ -11,8 +11,7 @@ - - + @@ -20,43 +19,38 @@ - + - - - - - - - - - - - - - - - - @@ -82,7 +76,7 @@ - + @@ -99,13 +93,13 @@ - - diff --git a/contrib/other-builds/OnDiskPt/OnDiskPt.project b/contrib/other-builds/OnDiskPt/OnDiskPt.project new file mode 100644 index 0000000000..3a89ec8328 --- /dev/null +++ b/contrib/other-builds/OnDiskPt/OnDiskPt.project @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/all.workspace b/contrib/other-builds/all.workspace new file mode 100644 index 0000000000..5a7eaf114e --- /dev/null +++ b/contrib/other-builds/all.workspace @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/cmake/boost.example/CMakeLists.txt b/contrib/other-builds/cmake/boost.example/CMakeLists.txt new file mode 100644 index 0000000000..abc8b37e28 --- /dev/null +++ b/contrib/other-builds/cmake/boost.example/CMakeLists.txt @@ -0,0 +1,7 @@ +cmake_minimum_required(VERSION 2.8) + +find_package(Boost 1.36.0 REQUIRED COMPONENTS locale) + +include_directories(${Boost_INCLUDE_DIRS}) +add_executable(demo main.cpp) +target_link_libraries(demo ${Boost_LIBRARIES}) diff --git a/contrib/other-builds/cmake/boost.example/main.cpp b/contrib/other-builds/cmake/boost.example/main.cpp new file mode 100644 index 0000000000..b77388e463 --- /dev/null +++ b/contrib/other-builds/cmake/boost.example/main.cpp @@ -0,0 +1,24 @@ + +#include +#include +#include + +using namespace std; + +int main(int argc, char* argv[]) +{ + + using namespace boost::locale; + using namespace std; + + generator gen; + locale loc=gen(""); + + cout.imbue(loc); + + cout << "Hello, World" << endl; + + cout << "This is how we show currency in this locale " << as::currency << 103.34 << endl; + + return 0; +} diff --git a/contrib/other-builds/consolidate/.cproject b/contrib/other-builds/consolidate/.cproject new file mode 100644 index 0000000000..d4b35e5005 --- /dev/null +++ b/contrib/other-builds/consolidate/.cproject @@ -0,0 +1,165 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/consolidate/.project b/contrib/other-builds/consolidate/.project new file mode 100644 index 0000000000..db9a1fa8f2 --- /dev/null +++ b/contrib/other-builds/consolidate/.project @@ -0,0 +1,79 @@ + + + consolidate + + + lm + moses + OnDiskPt + search + util + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + InputFileStream.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/InputFileStream.cpp + + + InputFileStream.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/InputFileStream.h + + + OutputFileStream.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/OutputFileStream.cpp + + + OutputFileStream.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/OutputFileStream.h + + + PropertiesConsolidator.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/PropertiesConsolidator.cpp + + + PropertiesConsolidator.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/PropertiesConsolidator.h + + + consolidate-main.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/consolidate-main.cpp + + + tables-core.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/tables-core.cpp + + + tables-core.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/tables-core.h + + + diff --git a/contrib/other-builds/consolidate/consolidate.project b/contrib/other-builds/consolidate/consolidate.project new file mode 100644 index 0000000000..25539fad42 --- /dev/null +++ b/contrib/other-builds/consolidate/consolidate.project @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + None + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + None + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/dllImpCheck/Program.cs b/contrib/other-builds/dllImpCheck/Program.cs new file mode 100644 index 0000000000..fcdf88b95f --- /dev/null +++ b/contrib/other-builds/dllImpCheck/Program.cs @@ -0,0 +1,36 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; +using System.Text; +using System.Threading.Tasks; + +namespace dllImpCheck +{ + class Program + { + + [DllImport("../../../moses2/x64/Debug/moses2.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "GetMosesSystem")] + private static extern int GetMosesSystem(string s, ref IntPtr system); + [DllImport("../../../moses2/x64/Debug/moses2.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "MosesTranslate")] + private static extern int MosesTranslate(IntPtr model, int id, string input, StringBuilder output, int output_len); + [DllImport("../../../moses2/x64/Debug/moses2.dll", CallingConvention = CallingConvention.StdCall, EntryPoint = "ReleaseSystem")] + private static extern int ReleaseSystem(ref IntPtr model); + + static void Main(string[] args) + { + string config = "D:\\src\\moses-mstranslator\\test_sentence_with_candidates\\moses_mspt.ini"; + string cand = "aaj din main chaand nikla @@@ aaj ||| आज ||| 0.23034750595193718 $$$ aaj ||| अाज ||| 0.2036812076840512 $$$ aaj ||| à¤à¤à¤œà¥‡ ||| 0.1806033272478164 $$$ aaj ||| आज़ ||| 0.1550204531642581 $$$ din ||| दिन ||| 0.23292194982342979 $$$ din ||| दीन ||| 0.20844420805170855 $$$ din ||| दिं ||| 0.16399885041729953 $$$ din ||| डिन ||| 0.16171304188413235 $$$ chaand ||| चांद ||| 0.2374591084461087 $$$ chaand ||| चाà¤à¤¦ ||| 0.217932729237165 $$$ chaand ||| चंद ||| 0.15435859487004985 $$$ chaand ||| चांड ||| 0.15279045900056767 $$$ nikla ||| निकला ||| 0.2727953350543125 $$$ nikla ||| निकà¥à¤²à¤¾ ||| 0.15350986400512082 $$$ nikla ||| नीकला ||| 0.1533410959941387 $$$ nikla ||| निकल़ा ||| 0.1475583698921154 $$$ main ||| मैं ||| 0.20812875019912347 $$$ main ||| में ||| 0.2042153102272697 $$$ main ||| मैन ||| 0.1933505532706236 $$$ main ||| मेन ||| 0.18617663610385968"; + IntPtr system = IntPtr.Zero; + int v = GetMosesSystem(config, ref system); + StringBuilder output = new StringBuilder(); + var ret = MosesTranslate(system, 1234678, cand, output, 50); + Console.WriteLine(output); + ReleaseSystem(ref system); + Console.ReadLine(); + } + } +} + diff --git a/contrib/other-builds/extract-ghkm/.cproject b/contrib/other-builds/extract-ghkm/.cproject index 8b549ee0c5..d0ebe75f8e 100644 --- a/contrib/other-builds/extract-ghkm/.cproject +++ b/contrib/other-builds/extract-ghkm/.cproject @@ -1,11 +1,11 @@ - - + + - + @@ -14,46 +14,43 @@ - - - - - - - - - - - + + - + @@ -74,31 +71,31 @@ - - - - - - - - + - - + + - - + + - - + + - - + + - + + + + + + + + + diff --git a/contrib/other-builds/extract-ghkm/.project b/contrib/other-builds/extract-ghkm/.project index b7c40f069f..65187bf539 100644 --- a/contrib/other-builds/extract-ghkm/.project +++ b/contrib/other-builds/extract-ghkm/.project @@ -3,6 +3,7 @@ extract-ghkm + moses @@ -26,49 +27,19 @@ - Alignment.cpp + Hole.h 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/Alignment.cpp + PARENT-3-PROJECT_LOC/phrase-extract/Hole.h - Alignment.h + HoleCollection.cpp 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/Alignment.h + PARENT-3-PROJECT_LOC/phrase-extract/HoleCollection.cpp - AlignmentGraph.cpp + HoleCollection.h 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/AlignmentGraph.cpp - - - AlignmentGraph.h - 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/AlignmentGraph.h - - - ComposedRule.cpp - 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/ComposedRule.cpp - - - ComposedRule.h - 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/ComposedRule.h - - - Exception.h - 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/Exception.h - - - ExtractGHKM.cpp - 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/ExtractGHKM.cpp - - - ExtractGHKM.h - 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/ExtractGHKM.h + PARENT-3-PROJECT_LOC/phrase-extract/HoleCollection.h InputFileStream.cpp @@ -80,31 +51,6 @@ 1 PARENT-3-PROJECT_LOC/phrase-extract/InputFileStream.h - - Jamfile - 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/Jamfile - - - Main.cpp - 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/Main.cpp - - - Node.cpp - 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/Node.cpp - - - Node.h - 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/Node.h - - - Options.h - 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/Options.h - OutputFileStream.cpp 1 @@ -116,59 +62,49 @@ PARENT-3-PROJECT_LOC/phrase-extract/OutputFileStream.h - ParseTree.cpp - 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/ParseTree.cpp - - - ParseTree.h - 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/ParseTree.h - - - ScfgRule.cpp + PhraseExtractionOptions.h 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/ScfgRule.cpp + PARENT-3-PROJECT_LOC/phrase-extract/PhraseExtractionOptions.h - ScfgRule.h + PhraseOrientation.cpp 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/ScfgRule.h + PARENT-3-PROJECT_LOC/phrase-extract/PhraseOrientation.cpp - ScfgRuleWriter.cpp + PhraseOrientation.h 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/ScfgRuleWriter.cpp + PARENT-3-PROJECT_LOC/phrase-extract/PhraseOrientation.h - ScfgRuleWriter.h + SentenceAlignment.cpp 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/ScfgRuleWriter.h + PARENT-3-PROJECT_LOC/phrase-extract/SentenceAlignment.cpp - Span.cpp + SentenceAlignment.h 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/Span.cpp + PARENT-3-PROJECT_LOC/phrase-extract/SentenceAlignment.h - Span.h + SentenceAlignmentWithSyntax.cpp 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/Span.h + PARENT-3-PROJECT_LOC/phrase-extract/SentenceAlignmentWithSyntax.cpp - Subgraph.cpp + SentenceAlignmentWithSyntax.h 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/Subgraph.cpp + PARENT-3-PROJECT_LOC/phrase-extract/SentenceAlignmentWithSyntax.h - Subgraph.h + SyntaxNodeCollection.cpp 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/Subgraph.h + PARENT-3-PROJECT_LOC/phrase-extract/SyntaxNodeCollection.cpp - SyntaxTree.cpp + SyntaxNodeCollection.h 1 - PARENT-3-PROJECT_LOC/phrase-extract/SyntaxTree.cpp + PARENT-3-PROJECT_LOC/phrase-extract/SyntaxNodeCollection.h SyntaxTree.h @@ -186,14 +122,9 @@ PARENT-3-PROJECT_LOC/phrase-extract/XmlTree.h - XmlTreeParser.cpp - 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/XmlTreeParser.cpp - - - XmlTreeParser.h + extract-rules-main.cpp 1 - PARENT-3-PROJECT_LOC/phrase-extract/extract-ghkm/XmlTreeParser.h + PARENT-3-PROJECT_LOC/phrase-extract/extract-rules-main.cpp tables-core.cpp diff --git a/contrib/other-builds/extract-mixed-syntax/.cproject b/contrib/other-builds/extract-mixed-syntax/.cproject new file mode 100644 index 0000000000..3507b87556 --- /dev/null +++ b/contrib/other-builds/extract-mixed-syntax/.cproject @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/extract-mixed-syntax/.project b/contrib/other-builds/extract-mixed-syntax/.project new file mode 100644 index 0000000000..7fdbadabb9 --- /dev/null +++ b/contrib/other-builds/extract-mixed-syntax/.project @@ -0,0 +1,220 @@ + + + extract-mixed-syntax + + + util + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + AlignedSentence.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/AlignedSentence.cpp + + + AlignedSentence.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/AlignedSentence.h + + + AlignedSentenceSyntax.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/AlignedSentenceSyntax.cpp + + + AlignedSentenceSyntax.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/AlignedSentenceSyntax.h + + + ConsistentPhrase.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/ConsistentPhrase.cpp + + + ConsistentPhrase.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/ConsistentPhrase.h + + + ConsistentPhrases.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/ConsistentPhrases.cpp + + + ConsistentPhrases.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/ConsistentPhrases.h + + + InputFileStream.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/InputFileStream.cpp + + + InputFileStream.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/InputFileStream.h + + + Jamfile + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/Jamfile + + + Main.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/Main.cpp + + + Main.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/Main.h + + + Makefile + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/Makefile + + + NonTerm.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/NonTerm.cpp + + + NonTerm.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/NonTerm.h + + + OutputFileStream.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/OutputFileStream.cpp + + + OutputFileStream.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/OutputFileStream.h + + + Parameter.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/Parameter.cpp + + + Parameter.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/Parameter.h + + + Phrase.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/Phrase.cpp + + + Phrase.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/Phrase.h + + + Rule.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/Rule.cpp + + + Rule.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/Rule.h + + + RulePhrase.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/RulePhrase.cpp + + + RulePhrase.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/RulePhrase.h + + + RuleSymbol.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/RuleSymbol.cpp + + + RuleSymbol.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/RuleSymbol.h + + + Rules.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/Rules.cpp + + + Rules.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/Rules.h + + + SyntaxTree.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/SyntaxTree.cpp + + + SyntaxTree.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/SyntaxTree.h + + + Word.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/Word.cpp + + + Word.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/Word.h + + + gzfilebuf.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/gzfilebuf.h + + + pugiconfig.hpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/pugiconfig.hpp + + + pugixml.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/pugixml.cpp + + + pugixml.hpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-mixed-syntax/pugixml.hpp + + + diff --git a/contrib/other-builds/extract-mixed-syntax/extract-mixed-syntax.project b/contrib/other-builds/extract-mixed-syntax/extract-mixed-syntax.project new file mode 100644 index 0000000000..87d76689ae --- /dev/null +++ b/contrib/other-builds/extract-mixed-syntax/extract-mixed-syntax.project @@ -0,0 +1,166 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + None + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + None + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/extract-rules/.cproject b/contrib/other-builds/extract-rules/.cproject new file mode 100644 index 0000000000..6867c15f96 --- /dev/null +++ b/contrib/other-builds/extract-rules/.cproject @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/extract-rules/.project b/contrib/other-builds/extract-rules/.project new file mode 100644 index 0000000000..351e931629 --- /dev/null +++ b/contrib/other-builds/extract-rules/.project @@ -0,0 +1,139 @@ + + + extract-rules + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + Hole.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/Hole.h + + + HoleCollection.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/HoleCollection.cpp + + + HoleCollection.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/HoleCollection.h + + + InputFileStream.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/InputFileStream.cpp + + + InputFileStream.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/InputFileStream.h + + + OutputFileStream.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/OutputFileStream.cpp + + + OutputFileStream.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/OutputFileStream.h + + + PhraseExtractionOptions.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/PhraseExtractionOptions.h + + + PhraseOrientation.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/PhraseOrientation.cpp + + + PhraseOrientation.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/PhraseOrientation.h + + + SentenceAlignment.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/SentenceAlignment.cpp + + + SentenceAlignment.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/SentenceAlignment.h + + + SentenceAlignmentWithSyntax.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/SentenceAlignmentWithSyntax.cpp + + + SentenceAlignmentWithSyntax.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/SentenceAlignmentWithSyntax.h + + + SyntaxNodeCollection.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/SyntaxNodeCollection.cpp + + + SyntaxNodeCollection.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/SyntaxNodeCollection.h + + + SyntaxTree.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/SyntaxTree.h + + + XmlTree.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/XmlTree.cpp + + + XmlTree.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/XmlTree.h + + + extract-rules-main.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-rules-main.cpp + + + tables-core.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/tables-core.cpp + + + tables-core.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/tables-core.h + + + diff --git a/contrib/other-builds/extract/.cproject b/contrib/other-builds/extract/.cproject new file mode 100644 index 0000000000..63e57b8b75 --- /dev/null +++ b/contrib/other-builds/extract/.cproject @@ -0,0 +1,135 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/extract/.project b/contrib/other-builds/extract/.project new file mode 100644 index 0000000000..74cb5b92e2 --- /dev/null +++ b/contrib/other-builds/extract/.project @@ -0,0 +1,109 @@ + + + extract + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + InputFileStream.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/InputFileStream.cpp + + + InputFileStream.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/InputFileStream.h + + + OutputFileStream.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/OutputFileStream.cpp + + + OutputFileStream.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/OutputFileStream.h + + + SentenceAlignment.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/SentenceAlignment.cpp + + + SentenceAlignment.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/SentenceAlignment.h + + + SentenceAlignmentWithSyntax.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/SentenceAlignmentWithSyntax.cpp + + + SentenceAlignmentWithSyntax.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/SentenceAlignmentWithSyntax.h + + + SyntaxNodeCollection.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/SyntaxNodeCollection.cpp + + + SyntaxNodeCollection.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/SyntaxNodeCollection.h + + + XmlException.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/XmlException.h + + + XmlTree.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/XmlTree.cpp + + + XmlTree.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/XmlTree.h + + + extract-main.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/extract-main.cpp + + + tables-core.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/tables-core.cpp + + + tables-core.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/tables-core.h + + + diff --git a/contrib/other-builds/extract/extract.project b/contrib/other-builds/extract/extract.project new file mode 100644 index 0000000000..d86e890356 --- /dev/null +++ b/contrib/other-builds/extract/extract.project @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + None + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + None + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/extractor/.cproject b/contrib/other-builds/extractor/.cproject index fc08b4c3d8..728ed4410b 100644 --- a/contrib/other-builds/extractor/.cproject +++ b/contrib/other-builds/extractor/.cproject @@ -5,7 +5,7 @@ - + @@ -14,35 +14,43 @@ - + - - @@ -62,7 +70,7 @@ - + @@ -71,20 +79,20 @@ - + - - @@ -131,4 +139,6 @@ + + diff --git a/contrib/other-builds/extractor/.project b/contrib/other-builds/extractor/.project index 097f430545..a720f94b4a 100644 --- a/contrib/other-builds/extractor/.project +++ b/contrib/other-builds/extractor/.project @@ -4,6 +4,7 @@ mert_lib + util @@ -82,10 +83,525 @@ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + InternalTree.cpp + 1 + PARENT-3-PROJECT_LOC/mert/InternalTree.cpp + + + InternalTree.h + 1 + PARENT-3-PROJECT_LOC/mert/InternalTree.h + + + bin + 2 + virtual:/virtual + extractor.cpp 1 PARENT-3-PROJECT_LOC/mert/extractor.cpp + + bin/gcc-4.8 + 2 + virtual:/virtual + + + bin/gcc-4.8/release + 2 + virtual:/virtual + + + bin/gcc-4.8/release/debug-symbols-on + 2 + virtual:/virtual + + + bin/gcc-4.8/release/debug-symbols-on/link-static + 2 + virtual:/virtual + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BleuDocScorer.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BleuDocScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BleuScorer.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BleuScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BleuScorerTest.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BleuScorerTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/CderScorer.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/CderScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Data.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Data.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/DataTest.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/DataTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureArray.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureArray.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureData.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureData.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureDataIterator.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureDataIterator.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureDataTest.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureDataTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureStats.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureStats.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FileStream.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FileStream.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/GzFileBuf.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/GzFileBuf.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/HypPackEnumerator.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/HypPackEnumerator.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/InterpolatedScorer.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/InterpolatedScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MeteorScorer.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MeteorScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MiraFeatureVector.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MiraFeatureVector.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MiraWeightVector.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MiraWeightVector.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/NgramTest.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/NgramTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Optimizer.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Optimizer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/OptimizerFactory.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/OptimizerFactory.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/OptimizerFactoryTest.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/OptimizerFactoryTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PerScorer.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PerScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Permutation.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Permutation.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PermutationScorer.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PermutationScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Point.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Point.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PointTest.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PointTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PreProcessFilter.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PreProcessFilter.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ReferenceTest.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ReferenceTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreArray.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreArray.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreData.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreData.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreDataIterator.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreDataIterator.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreStats.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreStats.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Scorer.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Scorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScorerFactory.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScorerFactory.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SemposOverlapping.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SemposOverlapping.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SemposScorer.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SemposScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SentenceLevelScorer.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SentenceLevelScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SingletonTest.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SingletonTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/StatisticsBasedScorer.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/StatisticsBasedScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER + 2 + virtual:/virtual + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TerScorer.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TerScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ThreadPool.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ThreadPool.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Timer.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Timer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TimerTest.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TimerTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Util.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Util.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/UtilTest.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/UtilTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Vocabulary.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Vocabulary.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/VocabularyTest.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/VocabularyTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/bleu_scorer_test + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/bleu_scorer_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/bleu_scorer_test.passed + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/bleu_scorer_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/data_test + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/data_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/data_test.passed + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/data_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/evaluator + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/evaluator + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/evaluator.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/evaluator.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/extractor + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/extractor + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/extractor.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/extractor.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/feature_data_test + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/feature_data_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/feature_data_test.passed + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/feature_data_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/kbmira + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/kbmira + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/kbmira.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/kbmira.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/libmert_lib.a + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/libmert_lib.a + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/mert + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/mert + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/mert.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/mert.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ngram_test + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ngram_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ngram_test.passed + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ngram_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/optimizer_factory_test + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/optimizer_factory_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/optimizer_factory_test.passed + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/optimizer_factory_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/point_test + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/point_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/point_test.passed + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/point_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/pro + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/pro + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/pro.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/pro.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/reference_test + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/reference_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/reference_test.passed + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/reference_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/sentence-bleu + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/sentence-bleu + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/sentence-bleu.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/sentence-bleu.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/singleton_test + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/singleton_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/singleton_test.passed + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/singleton_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/timer_test + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/timer_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/timer_test.passed + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/timer_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/util_test + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/util_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/util_test.passed + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/util_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/vocabulary_test + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/vocabulary_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/vocabulary_test.passed + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/vocabulary_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/alignmentStruct.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/alignmentStruct.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/hashMap.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/hashMap.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/hashMapInfos.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/hashMapInfos.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/hashMapStringInfos.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/hashMapStringInfos.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/infosHasher.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/infosHasher.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/stringHasher.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/stringHasher.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/stringInfosHasher.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/stringInfosHasher.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/terAlignment.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/terAlignment.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/terShift.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/terShift.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/tercalc.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/tercalc.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/tools.o + 1 + PARENT-3-PROJECT_LOC/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/tools.o + diff --git a/contrib/other-builds/fuzzy-match.xcodeproj/project.pbxproj b/contrib/other-builds/fuzzy-match.xcodeproj/project.pbxproj deleted file mode 100644 index 8abb9ae176..0000000000 --- a/contrib/other-builds/fuzzy-match.xcodeproj/project.pbxproj +++ /dev/null @@ -1,292 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1E42EFB615BEFAEB00E937EB /* fuzzy-match2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E42EFA515BEFABD00E937EB /* fuzzy-match2.cpp */; }; - 1E42EFB715BEFAEB00E937EB /* SuffixArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E806DCF15BED3D4001914A2 /* SuffixArray.cpp */; }; - 1E42EFB815BEFAEB00E937EB /* SuffixArray.h in Sources */ = {isa = PBXBuildFile; fileRef = 1E806DD015BED3D4001914A2 /* SuffixArray.h */; }; - 1E42EFB915BEFAEB00E937EB /* Vocabulary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E806DCA15BED3AC001914A2 /* Vocabulary.cpp */; }; - 1E42EFBA15BEFAEB00E937EB /* Vocabulary.h in Sources */ = {isa = PBXBuildFile; fileRef = 1E806DCB15BED3AC001914A2 /* Vocabulary.h */; }; - 1E806DCC15BED3AC001914A2 /* Vocabulary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E806DCA15BED3AC001914A2 /* Vocabulary.cpp */; }; - 1E806DD115BED3D4001914A2 /* SuffixArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E806DCF15BED3D4001914A2 /* SuffixArray.cpp */; }; - 1ECD60A815C15E28004172A4 /* Util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1ECD60A515C15D3A004172A4 /* Util.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 1E42EFAA15BEFAD300E937EB /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; - 1ED87EEB15BED331003E47AA /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1E42EFA515BEFABD00E937EB /* fuzzy-match2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = "fuzzy-match2.cpp"; path = "../tm-mt-integration/fuzzy-match2.cpp"; sourceTree = ""; }; - 1E42EFAC15BEFAD300E937EB /* fuzzy-match2 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "fuzzy-match2"; sourceTree = BUILT_PRODUCTS_DIR; }; - 1E42EFD115C00AC100E937EB /* fuzzy-match2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "fuzzy-match2.h"; path = "../tm-mt-integration/fuzzy-match2.h"; sourceTree = ""; }; - 1E42EFD215C00BAE00E937EB /* Util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Util.h; path = "../tm-mt-integration/Util.h"; sourceTree = ""; }; - 1E42EFD315C00C0A00E937EB /* SentenceAlignment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentenceAlignment.h; path = "../tm-mt-integration/SentenceAlignment.h"; sourceTree = ""; }; - 1E42EFD715C00D6300E937EB /* Match.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Match.h; path = "../tm-mt-integration/Match.h"; sourceTree = ""; }; - 1E806DCA15BED3AC001914A2 /* Vocabulary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Vocabulary.cpp; path = "../tm-mt-integration/Vocabulary.cpp"; sourceTree = ""; }; - 1E806DCB15BED3AC001914A2 /* Vocabulary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Vocabulary.h; path = "../tm-mt-integration/Vocabulary.h"; sourceTree = ""; }; - 1E806DCF15BED3D4001914A2 /* SuffixArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SuffixArray.cpp; path = "../tm-mt-integration/SuffixArray.cpp"; sourceTree = ""; }; - 1E806DD015BED3D4001914A2 /* SuffixArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SuffixArray.h; path = "../tm-mt-integration/SuffixArray.h"; sourceTree = ""; }; - 1ECD60A515C15D3A004172A4 /* Util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Util.cpp; path = "../tm-mt-integration/Util.cpp"; sourceTree = ""; }; - 1ED87EED15BED331003E47AA /* fuzzy-match */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "fuzzy-match"; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1E42EFA915BEFAD300E937EB /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1ED87EEA15BED331003E47AA /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1ED87EE215BED32F003E47AA = { - isa = PBXGroup; - children = ( - 1E42EFD715C00D6300E937EB /* Match.h */, - 1E42EFD315C00C0A00E937EB /* SentenceAlignment.h */, - 1E42EFD215C00BAE00E937EB /* Util.h */, - 1ECD60A515C15D3A004172A4 /* Util.cpp */, - 1E806DCF15BED3D4001914A2 /* SuffixArray.cpp */, - 1E806DD015BED3D4001914A2 /* SuffixArray.h */, - 1E42EFD115C00AC100E937EB /* fuzzy-match2.h */, - 1E42EFA515BEFABD00E937EB /* fuzzy-match2.cpp */, - 1E806DCA15BED3AC001914A2 /* Vocabulary.cpp */, - 1E806DCB15BED3AC001914A2 /* Vocabulary.h */, - 1ED87EEE15BED331003E47AA /* Products */, - ); - sourceTree = ""; - }; - 1ED87EEE15BED331003E47AA /* Products */ = { - isa = PBXGroup; - children = ( - 1ED87EED15BED331003E47AA /* fuzzy-match */, - 1E42EFAC15BEFAD300E937EB /* fuzzy-match2 */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1E42EFAB15BEFAD300E937EB /* fuzzy-match2 */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1E42EFB315BEFAD300E937EB /* Build configuration list for PBXNativeTarget "fuzzy-match2" */; - buildPhases = ( - 1E42EFA815BEFAD300E937EB /* Sources */, - 1E42EFA915BEFAD300E937EB /* Frameworks */, - 1E42EFAA15BEFAD300E937EB /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "fuzzy-match2"; - productName = "fuzzy-match2"; - productReference = 1E42EFAC15BEFAD300E937EB /* fuzzy-match2 */; - productType = "com.apple.product-type.tool"; - }; - 1ED87EEC15BED331003E47AA /* fuzzy-match */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1ED87EF715BED331003E47AA /* Build configuration list for PBXNativeTarget "fuzzy-match" */; - buildPhases = ( - 1ED87EE915BED331003E47AA /* Sources */, - 1ED87EEA15BED331003E47AA /* Frameworks */, - 1ED87EEB15BED331003E47AA /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "fuzzy-match"; - productName = "fuzzy-match"; - productReference = 1ED87EED15BED331003E47AA /* fuzzy-match */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 1ED87EE415BED32F003E47AA /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 1ED87EE715BED32F003E47AA /* Build configuration list for PBXProject "fuzzy-match" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 1ED87EE215BED32F003E47AA; - productRefGroup = 1ED87EEE15BED331003E47AA /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 1ED87EEC15BED331003E47AA /* fuzzy-match */, - 1E42EFAB15BEFAD300E937EB /* fuzzy-match2 */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 1E42EFA815BEFAD300E937EB /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1ECD60A815C15E28004172A4 /* Util.cpp in Sources */, - 1E42EFB615BEFAEB00E937EB /* fuzzy-match2.cpp in Sources */, - 1E42EFB715BEFAEB00E937EB /* SuffixArray.cpp in Sources */, - 1E42EFB815BEFAEB00E937EB /* SuffixArray.h in Sources */, - 1E42EFB915BEFAEB00E937EB /* Vocabulary.cpp in Sources */, - 1E42EFBA15BEFAEB00E937EB /* Vocabulary.h in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1ED87EE915BED331003E47AA /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E806DCC15BED3AC001914A2 /* Vocabulary.cpp in Sources */, - 1E806DD115BED3D4001914A2 /* SuffixArray.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1E42EFB415BEFAD300E937EB /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 1E42EFB515BEFAD300E937EB /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 1ED87EF515BED331003E47AA /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - 1ED87EF615BED331003E47AA /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - }; - name = Release; - }; - 1ED87EF815BED331003E47AA /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 1ED87EF915BED331003E47AA /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1E42EFB315BEFAD300E937EB /* Build configuration list for PBXNativeTarget "fuzzy-match2" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1E42EFB415BEFAD300E937EB /* Debug */, - 1E42EFB515BEFAD300E937EB /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1ED87EE715BED32F003E47AA /* Build configuration list for PBXProject "fuzzy-match" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1ED87EF515BED331003E47AA /* Debug */, - 1ED87EF615BED331003E47AA /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1ED87EF715BED331003E47AA /* Build configuration list for PBXNativeTarget "fuzzy-match" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1ED87EF815BED331003E47AA /* Debug */, - 1ED87EF915BED331003E47AA /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 1ED87EE415BED32F003E47AA /* Project object */; -} diff --git a/contrib/other-builds/fuzzy-match.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/contrib/other-builds/fuzzy-match.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist deleted file mode 100644 index cebcbdcb59..0000000000 --- a/contrib/other-builds/fuzzy-match.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - diff --git a/contrib/other-builds/fuzzy-match.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/fuzzy-match.xcscheme b/contrib/other-builds/fuzzy-match.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/fuzzy-match.xcscheme deleted file mode 100644 index 4ffb0bc96b..0000000000 --- a/contrib/other-builds/fuzzy-match.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/fuzzy-match.xcscheme +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/contrib/other-builds/fuzzy-match.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/fuzzy-match2.xcscheme b/contrib/other-builds/fuzzy-match.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/fuzzy-match2.xcscheme deleted file mode 100644 index 124bfd4b24..0000000000 --- a/contrib/other-builds/fuzzy-match.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/fuzzy-match2.xcscheme +++ /dev/null @@ -1,79 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/contrib/other-builds/fuzzy-match.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/xcschememanagement.plist b/contrib/other-builds/fuzzy-match.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 8a9f26d818..0000000000 --- a/contrib/other-builds/fuzzy-match.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - SchemeUserState - - fuzzy-match.xcscheme - - orderHint - 0 - - fuzzy-match2.xcscheme - - orderHint - 1 - - - SuppressBuildableAutocreation - - 1E42EFAB15BEFAD300E937EB - - primary - - - 1ED87EEC15BED331003E47AA - - primary - - - - - diff --git a/contrib/other-builds/kbmira.xcodeproj/project.pbxproj b/contrib/other-builds/kbmira.xcodeproj/project.pbxproj deleted file mode 100644 index 1cea39a8e5..0000000000 --- a/contrib/other-builds/kbmira.xcodeproj/project.pbxproj +++ /dev/null @@ -1,311 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1E73031E1597355A00C0E7FB /* kbmira.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E73031D1597355A00C0E7FB /* kbmira.cpp */; }; - 1EC060861597392900614957 /* libmert_lib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EC060821597386600614957 /* libmert_lib.a */; }; - 1EC060B41597490F00614957 /* liblm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EC060B11597490800614957 /* liblm.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1EC060811597386600614957 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EC0607A1597386500614957 /* mert_lib.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1E2CCF3315939E2D00D858D1; - remoteInfo = mert_lib; - }; - 1EC060841597386C00614957 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EC0607A1597386500614957 /* mert_lib.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 1E2CCF3215939E2D00D858D1; - remoteInfo = mert_lib; - }; - 1EC060B01597490800614957 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EC060A51597490800614957 /* lm.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1EE8C2E91476A48E002496F2; - remoteInfo = lm; - }; - 1EC060B51597491400614957 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EC060A51597490800614957 /* lm.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 1EE8C2E81476A48E002496F2; - remoteInfo = lm; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 1E43CA3E159734A5000E29D3 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1E43CA40159734A5000E29D3 /* kbmira */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = kbmira; sourceTree = BUILT_PRODUCTS_DIR; }; - 1E73031D1597355A00C0E7FB /* kbmira.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = kbmira.cpp; path = ../../mert/kbmira.cpp; sourceTree = ""; }; - 1EC0607A1597386500614957 /* mert_lib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = mert_lib.xcodeproj; sourceTree = ""; }; - 1EC060A51597490800614957 /* lm.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = lm.xcodeproj; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1E43CA3D159734A5000E29D3 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EC060B41597490F00614957 /* liblm.a in Frameworks */, - 1EC060861597392900614957 /* libmert_lib.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1E43CA35159734A5000E29D3 = { - isa = PBXGroup; - children = ( - 1EC060A51597490800614957 /* lm.xcodeproj */, - 1EC0607A1597386500614957 /* mert_lib.xcodeproj */, - 1E73031D1597355A00C0E7FB /* kbmira.cpp */, - 1E43CA41159734A5000E29D3 /* Products */, - ); - sourceTree = ""; - }; - 1E43CA41159734A5000E29D3 /* Products */ = { - isa = PBXGroup; - children = ( - 1E43CA40159734A5000E29D3 /* kbmira */, - ); - name = Products; - sourceTree = ""; - }; - 1EC0607B1597386500614957 /* Products */ = { - isa = PBXGroup; - children = ( - 1EC060821597386600614957 /* libmert_lib.a */, - ); - name = Products; - sourceTree = ""; - }; - 1EC060A61597490800614957 /* Products */ = { - isa = PBXGroup; - children = ( - 1EC060B11597490800614957 /* liblm.a */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1E43CA3F159734A5000E29D3 /* kbmira */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1E43CA4A159734A5000E29D3 /* Build configuration list for PBXNativeTarget "kbmira" */; - buildPhases = ( - 1E43CA3C159734A5000E29D3 /* Sources */, - 1E43CA3D159734A5000E29D3 /* Frameworks */, - 1E43CA3E159734A5000E29D3 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - 1EC060B61597491400614957 /* PBXTargetDependency */, - 1EC060851597386C00614957 /* PBXTargetDependency */, - ); - name = kbmira; - productName = kbmira; - productReference = 1E43CA40159734A5000E29D3 /* kbmira */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 1E43CA37159734A5000E29D3 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 1E43CA3A159734A5000E29D3 /* Build configuration list for PBXProject "kbmira" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 1E43CA35159734A5000E29D3; - productRefGroup = 1E43CA41159734A5000E29D3 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 1EC060A61597490800614957 /* Products */; - ProjectRef = 1EC060A51597490800614957 /* lm.xcodeproj */; - }, - { - ProductGroup = 1EC0607B1597386500614957 /* Products */; - ProjectRef = 1EC0607A1597386500614957 /* mert_lib.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1E43CA3F159734A5000E29D3 /* kbmira */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 1EC060821597386600614957 /* libmert_lib.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libmert_lib.a; - remoteRef = 1EC060811597386600614957 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1EC060B11597490800614957 /* liblm.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = liblm.a; - remoteRef = 1EC060B01597490800614957 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXSourcesBuildPhase section */ - 1E43CA3C159734A5000E29D3 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E73031E1597355A00C0E7FB /* kbmira.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 1EC060851597386C00614957 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = mert_lib; - targetProxy = 1EC060841597386C00614957 /* PBXContainerItemProxy */; - }; - 1EC060B61597491400614957 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = lm; - targetProxy = 1EC060B51597491400614957 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1E43CA48159734A5000E29D3 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - LIBRARY_SEARCH_PATHS = /opt/local/lib; - MACOSX_DEPLOYMENT_TARGET = 10.7; - ONLY_ACTIVE_ARCH = YES; - OTHER_LDFLAGS = ""; - SDKROOT = macosx; - }; - name = Debug; - }; - 1E43CA49159734A5000E29D3 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - LIBRARY_SEARCH_PATHS = /opt/local/lib; - MACOSX_DEPLOYMENT_TARGET = 10.7; - OTHER_LDFLAGS = ""; - SDKROOT = macosx; - }; - name = Release; - }; - 1E43CA4B159734A5000E29D3 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - HEADER_SEARCH_PATHS = ( - ../.., - /opt/local/include, - ); - OTHER_LDFLAGS = ( - "-lboost_program_options", - "-lz", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 1E43CA4C159734A5000E29D3 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - HEADER_SEARCH_PATHS = ( - ../.., - /opt/local/include, - ); - OTHER_LDFLAGS = ( - "-lboost_program_options", - "-lz", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1E43CA3A159734A5000E29D3 /* Build configuration list for PBXProject "kbmira" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1E43CA48159734A5000E29D3 /* Debug */, - 1E43CA49159734A5000E29D3 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1E43CA4A159734A5000E29D3 /* Build configuration list for PBXNativeTarget "kbmira" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1E43CA4B159734A5000E29D3 /* Debug */, - 1E43CA4C159734A5000E29D3 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 1E43CA37159734A5000E29D3 /* Project object */; -} diff --git a/contrib/other-builds/kenlm.vcxproj b/contrib/other-builds/kenlm.vcxproj deleted file mode 100644 index a6f231faaa..0000000000 --- a/contrib/other-builds/kenlm.vcxproj +++ /dev/null @@ -1,238 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {A5402E0B-6ED7-465C-9669-E4124A0CDDCB} - Win32Proj - kenlm - - - - StaticLibrary - true - Unicode - - - StaticLibrary - true - Unicode - - - StaticLibrary - false - true - Unicode - - - StaticLibrary - false - true - Unicode - - - - - - - - - - - - - - - - - - - C:\Program Files\boost\boost_1_47;$(IncludePath) - - - C:\Program Files\boost\boost_1_47;$(IncludePath) - - - C:\Program Files\boost\boost_1_47;$(IncludePath) - - - C:\Program Files\boost\boost_1_47;$(IncludePath) - - - - - - Level3 - Disabled - WITH_THREADS;NO_PIPES;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - C:\Program Files\boost\boost_1_51;$(SolutionDir)/../.. - - - Windows - true - - - C:\Program Files\boost\boost_1_51\lib - - - - - - - Level3 - Disabled - WITH_THREADS;NO_PIPES;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - C:\Program Files\boost\boost_1_51;$(SolutionDir)/../.. - - - Windows - true - - - C:\Program Files\boost\boost_1_51\lib - - - - - Level3 - - - MaxSpeed - true - true - WITH_THREADS;NO_PIPES;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - C:\boost\boost_1_47;$(SolutionDir)/../.. - MultiThreadedDLL - - - Windows - true - true - true - - - - - Level3 - - - MaxSpeed - true - true - WITH_THREADS;NO_PIPES;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - C:\boost\boost_1_47;$(SolutionDir)/../.. - MultiThreadedDLL - - - Windows - true - true - true - - - - - - \ No newline at end of file diff --git a/contrib/other-builds/lm.xcodeproj/project.pbxproj b/contrib/other-builds/lm.xcodeproj/project.pbxproj deleted file mode 100644 index 81f47bcf07..0000000000 --- a/contrib/other-builds/lm.xcodeproj/project.pbxproj +++ /dev/null @@ -1,698 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1E890C71159D1B260031F9F3 /* value_build.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1E890C6E159D1B260031F9F3 /* value_build.cc */; }; - 1E890C72159D1B260031F9F3 /* value_build.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1E890C6F159D1B260031F9F3 /* value_build.hh */; }; - 1E890C73159D1B260031F9F3 /* value.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1E890C70159D1B260031F9F3 /* value.hh */; }; - 1E8EAE58164C3FDC00EE20D6 /* pool.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1E8EAE52164C3FDC00EE20D6 /* pool.cc */; }; - 1E8EAE59164C3FDC00EE20D6 /* pool.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1E8EAE53164C3FDC00EE20D6 /* pool.hh */; }; - 1E8EAE5A164C3FDC00EE20D6 /* read_compressed_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1E8EAE54164C3FDC00EE20D6 /* read_compressed_test.cc */; }; - 1E8EAE5B164C3FDC00EE20D6 /* read_compressed.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1E8EAE55164C3FDC00EE20D6 /* read_compressed.cc */; }; - 1E8EAE5C164C3FDC00EE20D6 /* read_compressed.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1E8EAE56164C3FDC00EE20D6 /* read_compressed.hh */; }; - 1E8EAE5D164C3FDC00EE20D6 /* string_piece.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1E8EAE57164C3FDC00EE20D6 /* string_piece.cc */; }; - 1EBA44AD14B97E22003CC0EA /* bhiksha.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA442B14B97E22003CC0EA /* bhiksha.cc */; }; - 1EBA44AE14B97E22003CC0EA /* bhiksha.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA442C14B97E22003CC0EA /* bhiksha.hh */; }; - 1EBA44D414B97E22003CC0EA /* binary_format.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA447D14B97E22003CC0EA /* binary_format.cc */; }; - 1EBA44D514B97E22003CC0EA /* binary_format.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA447E14B97E22003CC0EA /* binary_format.hh */; }; - 1EBA44D614B97E22003CC0EA /* blank.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA447F14B97E22003CC0EA /* blank.hh */; }; - 1EBA44D814B97E22003CC0EA /* config.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA448314B97E22003CC0EA /* config.cc */; }; - 1EBA44D914B97E22003CC0EA /* config.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA448414B97E22003CC0EA /* config.hh */; }; - 1EBA44DA14B97E22003CC0EA /* enumerate_vocab.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA448714B97E22003CC0EA /* enumerate_vocab.hh */; }; - 1EBA44DB14B97E22003CC0EA /* facade.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA448814B97E22003CC0EA /* facade.hh */; }; - 1EBA44DD14B97E22003CC0EA /* left_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA448A14B97E22003CC0EA /* left_test.cc */; }; - 1EBA44DE14B97E22003CC0EA /* left.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA448B14B97E22003CC0EA /* left.hh */; }; - 1EBA44DF14B97E22003CC0EA /* lm_exception.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA448D14B97E22003CC0EA /* lm_exception.cc */; }; - 1EBA44E014B97E22003CC0EA /* lm_exception.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA448E14B97E22003CC0EA /* lm_exception.hh */; }; - 1EBA44E114B97E22003CC0EA /* max_order.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA448F14B97E22003CC0EA /* max_order.hh */; }; - 1EBA44E214B97E22003CC0EA /* model_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA449014B97E22003CC0EA /* model_test.cc */; }; - 1EBA44E314B97E22003CC0EA /* model_type.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA449114B97E22003CC0EA /* model_type.hh */; }; - 1EBA44E414B97E22003CC0EA /* model.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA449214B97E22003CC0EA /* model.cc */; }; - 1EBA44E514B97E22003CC0EA /* model.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA449314B97E22003CC0EA /* model.hh */; }; - 1EBA44E614B97E22003CC0EA /* ngram_query.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA449414B97E22003CC0EA /* ngram_query.cc */; }; - 1EBA44E714B97E22003CC0EA /* ngram_query.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA449514B97E22003CC0EA /* ngram_query.hh */; }; - 1EBA44E814B97E22003CC0EA /* quantize.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA449614B97E22003CC0EA /* quantize.cc */; }; - 1EBA44E914B97E22003CC0EA /* quantize.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA449714B97E22003CC0EA /* quantize.hh */; }; - 1EBA44EA14B97E22003CC0EA /* read_arpa.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA449814B97E22003CC0EA /* read_arpa.cc */; }; - 1EBA44EB14B97E22003CC0EA /* read_arpa.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA449914B97E22003CC0EA /* read_arpa.hh */; }; - 1EBA44EC14B97E22003CC0EA /* return.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA449B14B97E22003CC0EA /* return.hh */; }; - 1EBA44ED14B97E22003CC0EA /* search_hashed.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA449C14B97E22003CC0EA /* search_hashed.cc */; }; - 1EBA44EE14B97E22003CC0EA /* search_hashed.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA449D14B97E22003CC0EA /* search_hashed.hh */; }; - 1EBA44EF14B97E22003CC0EA /* search_trie.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA449E14B97E22003CC0EA /* search_trie.cc */; }; - 1EBA44F014B97E22003CC0EA /* search_trie.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA449F14B97E22003CC0EA /* search_trie.hh */; }; - 1EBA44F114B97E22003CC0EA /* trie_sort.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA44A314B97E22003CC0EA /* trie_sort.cc */; }; - 1EBA44F214B97E22003CC0EA /* trie_sort.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA44A414B97E22003CC0EA /* trie_sort.hh */; }; - 1EBA44F314B97E22003CC0EA /* trie.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA44A514B97E22003CC0EA /* trie.cc */; }; - 1EBA44F414B97E22003CC0EA /* trie.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA44A614B97E22003CC0EA /* trie.hh */; }; - 1EBA44F514B97E22003CC0EA /* virtual_interface.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA44A714B97E22003CC0EA /* virtual_interface.cc */; }; - 1EBA44F614B97E22003CC0EA /* virtual_interface.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA44A814B97E22003CC0EA /* virtual_interface.hh */; }; - 1EBA44F714B97E22003CC0EA /* vocab.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA44A914B97E22003CC0EA /* vocab.cc */; }; - 1EBA44F814B97E22003CC0EA /* vocab.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA44AA14B97E22003CC0EA /* vocab.hh */; }; - 1EBA44F914B97E22003CC0EA /* weights.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA44AB14B97E22003CC0EA /* weights.hh */; }; - 1EBA44FA14B97E22003CC0EA /* word_index.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA44AC14B97E22003CC0EA /* word_index.hh */; }; - 1EBA457F14B97E92003CC0EA /* bit_packing_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA453614B97E92003CC0EA /* bit_packing_test.cc */; }; - 1EBA458014B97E92003CC0EA /* bit_packing.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA453714B97E92003CC0EA /* bit_packing.cc */; }; - 1EBA458114B97E92003CC0EA /* bit_packing.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA453814B97E92003CC0EA /* bit_packing.hh */; }; - 1EBA458214B97E92003CC0EA /* check.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA453914B97E92003CC0EA /* check.hh */; }; - 1EBA458314B97E92003CC0EA /* ersatz_progress.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA453C14B97E92003CC0EA /* ersatz_progress.cc */; }; - 1EBA458414B97E92003CC0EA /* ersatz_progress.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA453D14B97E92003CC0EA /* ersatz_progress.hh */; }; - 1EBA458514B97E92003CC0EA /* exception.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA453E14B97E92003CC0EA /* exception.cc */; }; - 1EBA458614B97E92003CC0EA /* exception.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA453F14B97E92003CC0EA /* exception.hh */; }; - 1EBA458714B97E92003CC0EA /* file_piece_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA454014B97E92003CC0EA /* file_piece_test.cc */; }; - 1EBA458814B97E92003CC0EA /* file_piece.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA454114B97E92003CC0EA /* file_piece.cc */; }; - 1EBA458914B97E92003CC0EA /* file_piece.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA454214B97E92003CC0EA /* file_piece.hh */; }; - 1EBA458A14B97E92003CC0EA /* file.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA454314B97E92003CC0EA /* file.cc */; }; - 1EBA458B14B97E92003CC0EA /* file.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA454414B97E92003CC0EA /* file.hh */; }; - 1EBA458C14B97E92003CC0EA /* getopt.c in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA454514B97E92003CC0EA /* getopt.c */; }; - 1EBA458D14B97E92003CC0EA /* getopt.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA454614B97E92003CC0EA /* getopt.hh */; }; - 1EBA458E14B97E92003CC0EA /* have.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA454714B97E92003CC0EA /* have.hh */; }; - 1EBA458F14B97E92003CC0EA /* Jamfile in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA454814B97E92003CC0EA /* Jamfile */; }; - 1EBA459014B97E92003CC0EA /* joint_sort_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA454914B97E92003CC0EA /* joint_sort_test.cc */; }; - 1EBA459114B97E92003CC0EA /* joint_sort.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA454A14B97E92003CC0EA /* joint_sort.hh */; }; - 1EBA459414B97E92003CC0EA /* mmap.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA454E14B97E92003CC0EA /* mmap.cc */; }; - 1EBA459514B97E92003CC0EA /* mmap.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA454F14B97E92003CC0EA /* mmap.hh */; }; - 1EBA459614B97E92003CC0EA /* murmur_hash.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA455014B97E92003CC0EA /* murmur_hash.cc */; }; - 1EBA459714B97E92003CC0EA /* murmur_hash.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA455114B97E92003CC0EA /* murmur_hash.hh */; }; - 1EBA459814B97E92003CC0EA /* probing_hash_table_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA455214B97E92003CC0EA /* probing_hash_table_test.cc */; }; - 1EBA459914B97E92003CC0EA /* probing_hash_table.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA455314B97E92003CC0EA /* probing_hash_table.hh */; }; - 1EBA459A14B97E92003CC0EA /* proxy_iterator.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA455414B97E92003CC0EA /* proxy_iterator.hh */; }; - 1EBA459B14B97E92003CC0EA /* scoped.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA455514B97E92003CC0EA /* scoped.hh */; }; - 1EBA459C14B97E92003CC0EA /* sized_iterator.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA455614B97E92003CC0EA /* sized_iterator.hh */; }; - 1EBA459D14B97E92003CC0EA /* sorted_uniform_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA455714B97E92003CC0EA /* sorted_uniform_test.cc */; }; - 1EBA459E14B97E92003CC0EA /* sorted_uniform.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA455814B97E92003CC0EA /* sorted_uniform.hh */; }; - 1EBA459F14B97E92003CC0EA /* string_piece.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA455914B97E92003CC0EA /* string_piece.hh */; }; - 1EBA45A014B97E92003CC0EA /* tokenize_piece_test.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBA455A14B97E92003CC0EA /* tokenize_piece_test.cc */; }; - 1EBA45A114B97E92003CC0EA /* tokenize_piece.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBA455B14B97E92003CC0EA /* tokenize_piece.hh */; }; - 1EBC5362164C405A00ADFA2C /* bignum-dtoa.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBC534E164C405A00ADFA2C /* bignum-dtoa.cc */; }; - 1EBC5363164C405A00ADFA2C /* bignum-dtoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC534F164C405A00ADFA2C /* bignum-dtoa.h */; }; - 1EBC5364164C405A00ADFA2C /* bignum.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBC5350164C405A00ADFA2C /* bignum.cc */; }; - 1EBC5365164C405A00ADFA2C /* bignum.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC5351164C405A00ADFA2C /* bignum.h */; }; - 1EBC5366164C405A00ADFA2C /* cached-powers.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBC5352164C405A00ADFA2C /* cached-powers.cc */; }; - 1EBC5367164C405A00ADFA2C /* cached-powers.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC5353164C405A00ADFA2C /* cached-powers.h */; }; - 1EBC5368164C405A00ADFA2C /* diy-fp.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBC5354164C405A00ADFA2C /* diy-fp.cc */; }; - 1EBC5369164C405A00ADFA2C /* diy-fp.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC5355164C405A00ADFA2C /* diy-fp.h */; }; - 1EBC536A164C405A00ADFA2C /* double-conversion.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBC5356164C405A00ADFA2C /* double-conversion.cc */; }; - 1EBC536B164C405A00ADFA2C /* double-conversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC5357164C405A00ADFA2C /* double-conversion.h */; }; - 1EBC536C164C405A00ADFA2C /* fast-dtoa.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBC5358164C405A00ADFA2C /* fast-dtoa.cc */; }; - 1EBC536D164C405A00ADFA2C /* fast-dtoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC5359164C405A00ADFA2C /* fast-dtoa.h */; }; - 1EBC536E164C405A00ADFA2C /* fixed-dtoa.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBC535A164C405A00ADFA2C /* fixed-dtoa.cc */; }; - 1EBC536F164C405A00ADFA2C /* fixed-dtoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC535B164C405A00ADFA2C /* fixed-dtoa.h */; }; - 1EBC5370164C405A00ADFA2C /* ieee.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC535C164C405A00ADFA2C /* ieee.h */; }; - 1EBC5371164C405A00ADFA2C /* Jamfile in Sources */ = {isa = PBXBuildFile; fileRef = 1EBC535D164C405A00ADFA2C /* Jamfile */; }; - 1EBC5372164C405A00ADFA2C /* strtod.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBC535F164C405A00ADFA2C /* strtod.cc */; }; - 1EBC5373164C405A00ADFA2C /* strtod.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC5360164C405A00ADFA2C /* strtod.h */; }; - 1EBC5374164C405A00ADFA2C /* utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC5361164C405A00ADFA2C /* utils.h */; }; - 1EC2B30916233A8C00614D71 /* usage.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EC2B30716233A8C00614D71 /* usage.cc */; }; - 1EC2B30A16233A8C00614D71 /* usage.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EC2B30816233A8C00614D71 /* usage.hh */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1EBA45A314B97E93003CC0EA /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EBA455C14B97E92003CC0EA /* util.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1EE8C2711476A262002496F2; - remoteInfo = util; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 1E890C6E159D1B260031F9F3 /* value_build.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = value_build.cc; path = ../../lm/value_build.cc; sourceTree = ""; }; - 1E890C6F159D1B260031F9F3 /* value_build.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = value_build.hh; path = ../../lm/value_build.hh; sourceTree = ""; }; - 1E890C70159D1B260031F9F3 /* value.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = value.hh; path = ../../lm/value.hh; sourceTree = ""; }; - 1E8EAE52164C3FDC00EE20D6 /* pool.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = pool.cc; path = ../../util/pool.cc; sourceTree = ""; }; - 1E8EAE53164C3FDC00EE20D6 /* pool.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = pool.hh; path = ../../util/pool.hh; sourceTree = ""; }; - 1E8EAE54164C3FDC00EE20D6 /* read_compressed_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = read_compressed_test.cc; path = ../../util/read_compressed_test.cc; sourceTree = ""; }; - 1E8EAE55164C3FDC00EE20D6 /* read_compressed.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = read_compressed.cc; path = ../../util/read_compressed.cc; sourceTree = ""; }; - 1E8EAE56164C3FDC00EE20D6 /* read_compressed.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = read_compressed.hh; path = ../../util/read_compressed.hh; sourceTree = ""; }; - 1E8EAE57164C3FDC00EE20D6 /* string_piece.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = string_piece.cc; path = ../../util/string_piece.cc; sourceTree = ""; }; - 1EBA442B14B97E22003CC0EA /* bhiksha.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = bhiksha.cc; path = ../../lm/bhiksha.cc; sourceTree = ""; }; - 1EBA442C14B97E22003CC0EA /* bhiksha.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = bhiksha.hh; path = ../../lm/bhiksha.hh; sourceTree = ""; }; - 1EBA447D14B97E22003CC0EA /* binary_format.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = binary_format.cc; path = ../../lm/binary_format.cc; sourceTree = ""; }; - 1EBA447E14B97E22003CC0EA /* binary_format.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = binary_format.hh; path = ../../lm/binary_format.hh; sourceTree = ""; }; - 1EBA447F14B97E22003CC0EA /* blank.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = blank.hh; path = ../../lm/blank.hh; sourceTree = ""; }; - 1EBA448314B97E22003CC0EA /* config.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = config.cc; path = ../../lm/config.cc; sourceTree = ""; }; - 1EBA448414B97E22003CC0EA /* config.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = config.hh; path = ../../lm/config.hh; sourceTree = ""; }; - 1EBA448714B97E22003CC0EA /* enumerate_vocab.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = enumerate_vocab.hh; path = ../../lm/enumerate_vocab.hh; sourceTree = ""; }; - 1EBA448814B97E22003CC0EA /* facade.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = facade.hh; path = ../../lm/facade.hh; sourceTree = ""; }; - 1EBA448A14B97E22003CC0EA /* left_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = left_test.cc; path = ../../lm/left_test.cc; sourceTree = ""; }; - 1EBA448B14B97E22003CC0EA /* left.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = left.hh; path = ../../lm/left.hh; sourceTree = ""; }; - 1EBA448D14B97E22003CC0EA /* lm_exception.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = lm_exception.cc; path = ../../lm/lm_exception.cc; sourceTree = ""; }; - 1EBA448E14B97E22003CC0EA /* lm_exception.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = lm_exception.hh; path = ../../lm/lm_exception.hh; sourceTree = ""; }; - 1EBA448F14B97E22003CC0EA /* max_order.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = max_order.hh; path = ../../lm/max_order.hh; sourceTree = ""; }; - 1EBA449014B97E22003CC0EA /* model_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = model_test.cc; path = ../../lm/model_test.cc; sourceTree = ""; }; - 1EBA449114B97E22003CC0EA /* model_type.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = model_type.hh; path = ../../lm/model_type.hh; sourceTree = ""; }; - 1EBA449214B97E22003CC0EA /* model.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = model.cc; path = ../../lm/model.cc; sourceTree = ""; }; - 1EBA449314B97E22003CC0EA /* model.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = model.hh; path = ../../lm/model.hh; sourceTree = ""; }; - 1EBA449414B97E22003CC0EA /* ngram_query.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ngram_query.cc; path = ../../lm/ngram_query.cc; sourceTree = ""; }; - 1EBA449514B97E22003CC0EA /* ngram_query.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = ngram_query.hh; path = ../../lm/ngram_query.hh; sourceTree = ""; }; - 1EBA449614B97E22003CC0EA /* quantize.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = quantize.cc; path = ../../lm/quantize.cc; sourceTree = ""; }; - 1EBA449714B97E22003CC0EA /* quantize.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = quantize.hh; path = ../../lm/quantize.hh; sourceTree = ""; }; - 1EBA449814B97E22003CC0EA /* read_arpa.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = read_arpa.cc; path = ../../lm/read_arpa.cc; sourceTree = ""; }; - 1EBA449914B97E22003CC0EA /* read_arpa.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = read_arpa.hh; path = ../../lm/read_arpa.hh; sourceTree = ""; }; - 1EBA449B14B97E22003CC0EA /* return.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = return.hh; path = ../../lm/return.hh; sourceTree = ""; }; - 1EBA449C14B97E22003CC0EA /* search_hashed.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = search_hashed.cc; path = ../../lm/search_hashed.cc; sourceTree = ""; }; - 1EBA449D14B97E22003CC0EA /* search_hashed.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = search_hashed.hh; path = ../../lm/search_hashed.hh; sourceTree = ""; }; - 1EBA449E14B97E22003CC0EA /* search_trie.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = search_trie.cc; path = ../../lm/search_trie.cc; sourceTree = ""; }; - 1EBA449F14B97E22003CC0EA /* search_trie.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = search_trie.hh; path = ../../lm/search_trie.hh; sourceTree = ""; }; - 1EBA44A014B97E22003CC0EA /* test_nounk.arpa */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = test_nounk.arpa; path = ../../lm/test_nounk.arpa; sourceTree = ""; }; - 1EBA44A114B97E22003CC0EA /* test.arpa */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = test.arpa; path = ../../lm/test.arpa; sourceTree = ""; }; - 1EBA44A314B97E22003CC0EA /* trie_sort.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = trie_sort.cc; path = ../../lm/trie_sort.cc; sourceTree = ""; }; - 1EBA44A414B97E22003CC0EA /* trie_sort.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = trie_sort.hh; path = ../../lm/trie_sort.hh; sourceTree = ""; }; - 1EBA44A514B97E22003CC0EA /* trie.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = trie.cc; path = ../../lm/trie.cc; sourceTree = ""; }; - 1EBA44A614B97E22003CC0EA /* trie.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = trie.hh; path = ../../lm/trie.hh; sourceTree = ""; }; - 1EBA44A714B97E22003CC0EA /* virtual_interface.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = virtual_interface.cc; path = ../../lm/virtual_interface.cc; sourceTree = ""; }; - 1EBA44A814B97E22003CC0EA /* virtual_interface.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = virtual_interface.hh; path = ../../lm/virtual_interface.hh; sourceTree = ""; }; - 1EBA44A914B97E22003CC0EA /* vocab.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = vocab.cc; path = ../../lm/vocab.cc; sourceTree = ""; }; - 1EBA44AA14B97E22003CC0EA /* vocab.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = vocab.hh; path = ../../lm/vocab.hh; sourceTree = ""; }; - 1EBA44AB14B97E22003CC0EA /* weights.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = weights.hh; path = ../../lm/weights.hh; sourceTree = ""; }; - 1EBA44AC14B97E22003CC0EA /* word_index.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = word_index.hh; path = ../../lm/word_index.hh; sourceTree = ""; }; - 1EBA453614B97E92003CC0EA /* bit_packing_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = bit_packing_test.cc; path = ../../util/bit_packing_test.cc; sourceTree = ""; }; - 1EBA453714B97E92003CC0EA /* bit_packing.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = bit_packing.cc; path = ../../util/bit_packing.cc; sourceTree = ""; }; - 1EBA453814B97E92003CC0EA /* bit_packing.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = bit_packing.hh; path = ../../util/bit_packing.hh; sourceTree = ""; }; - 1EBA453914B97E92003CC0EA /* check.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = check.hh; path = ../../util/check.hh; sourceTree = ""; }; - 1EBA453C14B97E92003CC0EA /* ersatz_progress.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ersatz_progress.cc; path = ../../util/ersatz_progress.cc; sourceTree = ""; }; - 1EBA453D14B97E92003CC0EA /* ersatz_progress.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = ersatz_progress.hh; path = ../../util/ersatz_progress.hh; sourceTree = ""; }; - 1EBA453E14B97E92003CC0EA /* exception.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = exception.cc; path = ../../util/exception.cc; sourceTree = ""; }; - 1EBA453F14B97E92003CC0EA /* exception.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = exception.hh; path = ../../util/exception.hh; sourceTree = ""; }; - 1EBA454014B97E92003CC0EA /* file_piece_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = file_piece_test.cc; path = ../../util/file_piece_test.cc; sourceTree = ""; }; - 1EBA454114B97E92003CC0EA /* file_piece.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = file_piece.cc; path = ../../util/file_piece.cc; sourceTree = ""; }; - 1EBA454214B97E92003CC0EA /* file_piece.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = file_piece.hh; path = ../../util/file_piece.hh; sourceTree = ""; }; - 1EBA454314B97E92003CC0EA /* file.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = file.cc; path = ../../util/file.cc; sourceTree = ""; }; - 1EBA454414B97E92003CC0EA /* file.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = file.hh; path = ../../util/file.hh; sourceTree = ""; }; - 1EBA454514B97E92003CC0EA /* getopt.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = getopt.c; path = ../../util/getopt.c; sourceTree = ""; }; - 1EBA454614B97E92003CC0EA /* getopt.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = getopt.hh; path = ../../util/getopt.hh; sourceTree = ""; }; - 1EBA454714B97E92003CC0EA /* have.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = have.hh; path = ../../util/have.hh; sourceTree = ""; }; - 1EBA454814B97E92003CC0EA /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; name = Jamfile; path = ../../util/Jamfile; sourceTree = ""; }; - 1EBA454914B97E92003CC0EA /* joint_sort_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = joint_sort_test.cc; path = ../../util/joint_sort_test.cc; sourceTree = ""; }; - 1EBA454A14B97E92003CC0EA /* joint_sort.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = joint_sort.hh; path = ../../util/joint_sort.hh; sourceTree = ""; }; - 1EBA454E14B97E92003CC0EA /* mmap.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = mmap.cc; path = ../../util/mmap.cc; sourceTree = ""; }; - 1EBA454F14B97E92003CC0EA /* mmap.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = mmap.hh; path = ../../util/mmap.hh; sourceTree = ""; }; - 1EBA455014B97E92003CC0EA /* murmur_hash.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = murmur_hash.cc; path = ../../util/murmur_hash.cc; sourceTree = ""; }; - 1EBA455114B97E92003CC0EA /* murmur_hash.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = murmur_hash.hh; path = ../../util/murmur_hash.hh; sourceTree = ""; }; - 1EBA455214B97E92003CC0EA /* probing_hash_table_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = probing_hash_table_test.cc; path = ../../util/probing_hash_table_test.cc; sourceTree = ""; }; - 1EBA455314B97E92003CC0EA /* probing_hash_table.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = probing_hash_table.hh; path = ../../util/probing_hash_table.hh; sourceTree = ""; }; - 1EBA455414B97E92003CC0EA /* proxy_iterator.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = proxy_iterator.hh; path = ../../util/proxy_iterator.hh; sourceTree = ""; }; - 1EBA455514B97E92003CC0EA /* scoped.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = scoped.hh; path = ../../util/scoped.hh; sourceTree = ""; }; - 1EBA455614B97E92003CC0EA /* sized_iterator.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = sized_iterator.hh; path = ../../util/sized_iterator.hh; sourceTree = ""; }; - 1EBA455714B97E92003CC0EA /* sorted_uniform_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = sorted_uniform_test.cc; path = ../../util/sorted_uniform_test.cc; sourceTree = ""; }; - 1EBA455814B97E92003CC0EA /* sorted_uniform.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = sorted_uniform.hh; path = ../../util/sorted_uniform.hh; sourceTree = ""; }; - 1EBA455914B97E92003CC0EA /* string_piece.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = string_piece.hh; path = ../../util/string_piece.hh; sourceTree = ""; }; - 1EBA455A14B97E92003CC0EA /* tokenize_piece_test.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = tokenize_piece_test.cc; path = ../../util/tokenize_piece_test.cc; sourceTree = ""; }; - 1EBA455B14B97E92003CC0EA /* tokenize_piece.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = tokenize_piece.hh; path = ../../util/tokenize_piece.hh; sourceTree = ""; }; - 1EBA455C14B97E92003CC0EA /* util.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = util.xcodeproj; path = ../../util/util.xcodeproj; sourceTree = ""; }; - 1EBC534E164C405A00ADFA2C /* bignum-dtoa.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "bignum-dtoa.cc"; sourceTree = ""; }; - 1EBC534F164C405A00ADFA2C /* bignum-dtoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "bignum-dtoa.h"; sourceTree = ""; }; - 1EBC5350164C405A00ADFA2C /* bignum.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = bignum.cc; sourceTree = ""; }; - 1EBC5351164C405A00ADFA2C /* bignum.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bignum.h; sourceTree = ""; }; - 1EBC5352164C405A00ADFA2C /* cached-powers.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "cached-powers.cc"; sourceTree = ""; }; - 1EBC5353164C405A00ADFA2C /* cached-powers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "cached-powers.h"; sourceTree = ""; }; - 1EBC5354164C405A00ADFA2C /* diy-fp.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "diy-fp.cc"; sourceTree = ""; }; - 1EBC5355164C405A00ADFA2C /* diy-fp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "diy-fp.h"; sourceTree = ""; }; - 1EBC5356164C405A00ADFA2C /* double-conversion.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "double-conversion.cc"; sourceTree = ""; }; - 1EBC5357164C405A00ADFA2C /* double-conversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "double-conversion.h"; sourceTree = ""; }; - 1EBC5358164C405A00ADFA2C /* fast-dtoa.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "fast-dtoa.cc"; sourceTree = ""; }; - 1EBC5359164C405A00ADFA2C /* fast-dtoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fast-dtoa.h"; sourceTree = ""; }; - 1EBC535A164C405A00ADFA2C /* fixed-dtoa.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = "fixed-dtoa.cc"; sourceTree = ""; }; - 1EBC535B164C405A00ADFA2C /* fixed-dtoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "fixed-dtoa.h"; sourceTree = ""; }; - 1EBC535C164C405A00ADFA2C /* ieee.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ieee.h; sourceTree = ""; }; - 1EBC535D164C405A00ADFA2C /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; path = Jamfile; sourceTree = ""; }; - 1EBC535E164C405A00ADFA2C /* LICENSE */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; - 1EBC535F164C405A00ADFA2C /* strtod.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = strtod.cc; sourceTree = ""; }; - 1EBC5360164C405A00ADFA2C /* strtod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = strtod.h; sourceTree = ""; }; - 1EBC5361164C405A00ADFA2C /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utils.h; sourceTree = ""; }; - 1EC2B30716233A8C00614D71 /* usage.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = usage.cc; path = ../../util/usage.cc; sourceTree = ""; }; - 1EC2B30816233A8C00614D71 /* usage.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = usage.hh; path = ../../util/usage.hh; sourceTree = ""; }; - 1EE8C2E91476A48E002496F2 /* liblm.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = liblm.a; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1EE8C2E61476A48E002496F2 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1EBA44FB14B97E6A003CC0EA /* lm */ = { - isa = PBXGroup; - children = ( - 1E890C6E159D1B260031F9F3 /* value_build.cc */, - 1E890C6F159D1B260031F9F3 /* value_build.hh */, - 1E890C70159D1B260031F9F3 /* value.hh */, - 1EBA442B14B97E22003CC0EA /* bhiksha.cc */, - 1EBA442C14B97E22003CC0EA /* bhiksha.hh */, - 1EBA447D14B97E22003CC0EA /* binary_format.cc */, - 1EBA447E14B97E22003CC0EA /* binary_format.hh */, - 1EBA447F14B97E22003CC0EA /* blank.hh */, - 1EBA448314B97E22003CC0EA /* config.cc */, - 1EBA448414B97E22003CC0EA /* config.hh */, - 1EBA448714B97E22003CC0EA /* enumerate_vocab.hh */, - 1EBA448814B97E22003CC0EA /* facade.hh */, - 1EBA448A14B97E22003CC0EA /* left_test.cc */, - 1EBA448B14B97E22003CC0EA /* left.hh */, - 1EBA448D14B97E22003CC0EA /* lm_exception.cc */, - 1EBA448E14B97E22003CC0EA /* lm_exception.hh */, - 1EBA448F14B97E22003CC0EA /* max_order.hh */, - 1EBA449014B97E22003CC0EA /* model_test.cc */, - 1EBA449114B97E22003CC0EA /* model_type.hh */, - 1EBA449214B97E22003CC0EA /* model.cc */, - 1EBA449314B97E22003CC0EA /* model.hh */, - 1EBA449414B97E22003CC0EA /* ngram_query.cc */, - 1EBA449514B97E22003CC0EA /* ngram_query.hh */, - 1EBA449614B97E22003CC0EA /* quantize.cc */, - 1EBA449714B97E22003CC0EA /* quantize.hh */, - 1EBA449814B97E22003CC0EA /* read_arpa.cc */, - 1EBA449914B97E22003CC0EA /* read_arpa.hh */, - 1EBA449B14B97E22003CC0EA /* return.hh */, - 1EBA449C14B97E22003CC0EA /* search_hashed.cc */, - 1EBA449D14B97E22003CC0EA /* search_hashed.hh */, - 1EBA449E14B97E22003CC0EA /* search_trie.cc */, - 1EBA449F14B97E22003CC0EA /* search_trie.hh */, - 1EBA44A014B97E22003CC0EA /* test_nounk.arpa */, - 1EBA44A114B97E22003CC0EA /* test.arpa */, - 1EBA44A314B97E22003CC0EA /* trie_sort.cc */, - 1EBA44A414B97E22003CC0EA /* trie_sort.hh */, - 1EBA44A514B97E22003CC0EA /* trie.cc */, - 1EBA44A614B97E22003CC0EA /* trie.hh */, - 1EBA44A714B97E22003CC0EA /* virtual_interface.cc */, - 1EBA44A814B97E22003CC0EA /* virtual_interface.hh */, - 1EBA44A914B97E22003CC0EA /* vocab.cc */, - 1EBA44AA14B97E22003CC0EA /* vocab.hh */, - 1EBA44AB14B97E22003CC0EA /* weights.hh */, - 1EBA44AC14B97E22003CC0EA /* word_index.hh */, - ); - name = lm; - sourceTree = ""; - }; - 1EBA44FC14B97E81003CC0EA /* util */ = { - isa = PBXGroup; - children = ( - 1EBC534D164C405A00ADFA2C /* double-conversion */, - 1E8EAE52164C3FDC00EE20D6 /* pool.cc */, - 1E8EAE53164C3FDC00EE20D6 /* pool.hh */, - 1E8EAE54164C3FDC00EE20D6 /* read_compressed_test.cc */, - 1E8EAE55164C3FDC00EE20D6 /* read_compressed.cc */, - 1E8EAE56164C3FDC00EE20D6 /* read_compressed.hh */, - 1E8EAE57164C3FDC00EE20D6 /* string_piece.cc */, - 1EC2B30716233A8C00614D71 /* usage.cc */, - 1EC2B30816233A8C00614D71 /* usage.hh */, - 1EBA453614B97E92003CC0EA /* bit_packing_test.cc */, - 1EBA453714B97E92003CC0EA /* bit_packing.cc */, - 1EBA453814B97E92003CC0EA /* bit_packing.hh */, - 1EBA453914B97E92003CC0EA /* check.hh */, - 1EBA453C14B97E92003CC0EA /* ersatz_progress.cc */, - 1EBA453D14B97E92003CC0EA /* ersatz_progress.hh */, - 1EBA453E14B97E92003CC0EA /* exception.cc */, - 1EBA453F14B97E92003CC0EA /* exception.hh */, - 1EBA454014B97E92003CC0EA /* file_piece_test.cc */, - 1EBA454114B97E92003CC0EA /* file_piece.cc */, - 1EBA454214B97E92003CC0EA /* file_piece.hh */, - 1EBA454314B97E92003CC0EA /* file.cc */, - 1EBA454414B97E92003CC0EA /* file.hh */, - 1EBA454514B97E92003CC0EA /* getopt.c */, - 1EBA454614B97E92003CC0EA /* getopt.hh */, - 1EBA454714B97E92003CC0EA /* have.hh */, - 1EBA454814B97E92003CC0EA /* Jamfile */, - 1EBA454914B97E92003CC0EA /* joint_sort_test.cc */, - 1EBA454A14B97E92003CC0EA /* joint_sort.hh */, - 1EBA454E14B97E92003CC0EA /* mmap.cc */, - 1EBA454F14B97E92003CC0EA /* mmap.hh */, - 1EBA455014B97E92003CC0EA /* murmur_hash.cc */, - 1EBA455114B97E92003CC0EA /* murmur_hash.hh */, - 1EBA455214B97E92003CC0EA /* probing_hash_table_test.cc */, - 1EBA455314B97E92003CC0EA /* probing_hash_table.hh */, - 1EBA455414B97E92003CC0EA /* proxy_iterator.hh */, - 1EBA455514B97E92003CC0EA /* scoped.hh */, - 1EBA455614B97E92003CC0EA /* sized_iterator.hh */, - 1EBA455714B97E92003CC0EA /* sorted_uniform_test.cc */, - 1EBA455814B97E92003CC0EA /* sorted_uniform.hh */, - 1EBA455914B97E92003CC0EA /* string_piece.hh */, - 1EBA455A14B97E92003CC0EA /* tokenize_piece_test.cc */, - 1EBA455B14B97E92003CC0EA /* tokenize_piece.hh */, - 1EBA455C14B97E92003CC0EA /* util.xcodeproj */, - ); - name = util; - sourceTree = ""; - }; - 1EBA455D14B97E92003CC0EA /* Products */ = { - isa = PBXGroup; - children = ( - 1EBA45A414B97E93003CC0EA /* libutil.a */, - ); - name = Products; - sourceTree = ""; - }; - 1EBC534D164C405A00ADFA2C /* double-conversion */ = { - isa = PBXGroup; - children = ( - 1EBC534E164C405A00ADFA2C /* bignum-dtoa.cc */, - 1EBC534F164C405A00ADFA2C /* bignum-dtoa.h */, - 1EBC5350164C405A00ADFA2C /* bignum.cc */, - 1EBC5351164C405A00ADFA2C /* bignum.h */, - 1EBC5352164C405A00ADFA2C /* cached-powers.cc */, - 1EBC5353164C405A00ADFA2C /* cached-powers.h */, - 1EBC5354164C405A00ADFA2C /* diy-fp.cc */, - 1EBC5355164C405A00ADFA2C /* diy-fp.h */, - 1EBC5356164C405A00ADFA2C /* double-conversion.cc */, - 1EBC5357164C405A00ADFA2C /* double-conversion.h */, - 1EBC5358164C405A00ADFA2C /* fast-dtoa.cc */, - 1EBC5359164C405A00ADFA2C /* fast-dtoa.h */, - 1EBC535A164C405A00ADFA2C /* fixed-dtoa.cc */, - 1EBC535B164C405A00ADFA2C /* fixed-dtoa.h */, - 1EBC535C164C405A00ADFA2C /* ieee.h */, - 1EBC535D164C405A00ADFA2C /* Jamfile */, - 1EBC535E164C405A00ADFA2C /* LICENSE */, - 1EBC535F164C405A00ADFA2C /* strtod.cc */, - 1EBC5360164C405A00ADFA2C /* strtod.h */, - 1EBC5361164C405A00ADFA2C /* utils.h */, - ); - name = "double-conversion"; - path = "../../util/double-conversion"; - sourceTree = ""; - }; - 1EE8C2DE1476A48E002496F2 = { - isa = PBXGroup; - children = ( - 1EBA44FC14B97E81003CC0EA /* util */, - 1EBA44FB14B97E6A003CC0EA /* lm */, - 1EE8C2EA1476A48E002496F2 /* Products */, - ); - sourceTree = ""; - }; - 1EE8C2EA1476A48E002496F2 /* Products */ = { - isa = PBXGroup; - children = ( - 1EE8C2E91476A48E002496F2 /* liblm.a */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 1EE8C2E71476A48E002496F2 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EBA44AE14B97E22003CC0EA /* bhiksha.hh in Headers */, - 1EBA44D514B97E22003CC0EA /* binary_format.hh in Headers */, - 1EBA44D614B97E22003CC0EA /* blank.hh in Headers */, - 1EBA44D914B97E22003CC0EA /* config.hh in Headers */, - 1EBA44DA14B97E22003CC0EA /* enumerate_vocab.hh in Headers */, - 1EBA44DB14B97E22003CC0EA /* facade.hh in Headers */, - 1EBA44DE14B97E22003CC0EA /* left.hh in Headers */, - 1EBA44E014B97E22003CC0EA /* lm_exception.hh in Headers */, - 1EBA44E114B97E22003CC0EA /* max_order.hh in Headers */, - 1EBA44E314B97E22003CC0EA /* model_type.hh in Headers */, - 1EBA44E514B97E22003CC0EA /* model.hh in Headers */, - 1EBA44E714B97E22003CC0EA /* ngram_query.hh in Headers */, - 1EBA44E914B97E22003CC0EA /* quantize.hh in Headers */, - 1EBA44EB14B97E22003CC0EA /* read_arpa.hh in Headers */, - 1EBA44EC14B97E22003CC0EA /* return.hh in Headers */, - 1EBA44EE14B97E22003CC0EA /* search_hashed.hh in Headers */, - 1EBA44F014B97E22003CC0EA /* search_trie.hh in Headers */, - 1EBA44F214B97E22003CC0EA /* trie_sort.hh in Headers */, - 1EBA44F414B97E22003CC0EA /* trie.hh in Headers */, - 1EBA44F614B97E22003CC0EA /* virtual_interface.hh in Headers */, - 1EBA44F814B97E22003CC0EA /* vocab.hh in Headers */, - 1EBA44F914B97E22003CC0EA /* weights.hh in Headers */, - 1EBA44FA14B97E22003CC0EA /* word_index.hh in Headers */, - 1EBA458114B97E92003CC0EA /* bit_packing.hh in Headers */, - 1EBA458214B97E92003CC0EA /* check.hh in Headers */, - 1EBA458414B97E92003CC0EA /* ersatz_progress.hh in Headers */, - 1EBA458614B97E92003CC0EA /* exception.hh in Headers */, - 1EBA458914B97E92003CC0EA /* file_piece.hh in Headers */, - 1EBA458B14B97E92003CC0EA /* file.hh in Headers */, - 1EBA458D14B97E92003CC0EA /* getopt.hh in Headers */, - 1EBA458E14B97E92003CC0EA /* have.hh in Headers */, - 1EBA459114B97E92003CC0EA /* joint_sort.hh in Headers */, - 1EBA459514B97E92003CC0EA /* mmap.hh in Headers */, - 1EBA459714B97E92003CC0EA /* murmur_hash.hh in Headers */, - 1EBA459914B97E92003CC0EA /* probing_hash_table.hh in Headers */, - 1EBA459A14B97E92003CC0EA /* proxy_iterator.hh in Headers */, - 1EBA459B14B97E92003CC0EA /* scoped.hh in Headers */, - 1EBA459C14B97E92003CC0EA /* sized_iterator.hh in Headers */, - 1EBA459E14B97E92003CC0EA /* sorted_uniform.hh in Headers */, - 1EBA459F14B97E92003CC0EA /* string_piece.hh in Headers */, - 1EBA45A114B97E92003CC0EA /* tokenize_piece.hh in Headers */, - 1E890C72159D1B260031F9F3 /* value_build.hh in Headers */, - 1E890C73159D1B260031F9F3 /* value.hh in Headers */, - 1EC2B30A16233A8C00614D71 /* usage.hh in Headers */, - 1E8EAE59164C3FDC00EE20D6 /* pool.hh in Headers */, - 1E8EAE5C164C3FDC00EE20D6 /* read_compressed.hh in Headers */, - 1EBC5363164C405A00ADFA2C /* bignum-dtoa.h in Headers */, - 1EBC5365164C405A00ADFA2C /* bignum.h in Headers */, - 1EBC5367164C405A00ADFA2C /* cached-powers.h in Headers */, - 1EBC5369164C405A00ADFA2C /* diy-fp.h in Headers */, - 1EBC536B164C405A00ADFA2C /* double-conversion.h in Headers */, - 1EBC536D164C405A00ADFA2C /* fast-dtoa.h in Headers */, - 1EBC536F164C405A00ADFA2C /* fixed-dtoa.h in Headers */, - 1EBC5370164C405A00ADFA2C /* ieee.h in Headers */, - 1EBC5373164C405A00ADFA2C /* strtod.h in Headers */, - 1EBC5374164C405A00ADFA2C /* utils.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 1EE8C2E81476A48E002496F2 /* lm */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1EE8C2ED1476A48E002496F2 /* Build configuration list for PBXNativeTarget "lm" */; - buildPhases = ( - 1EE8C2E51476A48E002496F2 /* Sources */, - 1EE8C2E61476A48E002496F2 /* Frameworks */, - 1EE8C2E71476A48E002496F2 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = lm; - productName = lm; - productReference = 1EE8C2E91476A48E002496F2 /* liblm.a */; - productType = "com.apple.product-type.library.static"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 1EE8C2E01476A48E002496F2 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0420; - }; - buildConfigurationList = 1EE8C2E31476A48E002496F2 /* Build configuration list for PBXProject "lm" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 1EE8C2DE1476A48E002496F2; - productRefGroup = 1EE8C2EA1476A48E002496F2 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 1EBA455D14B97E92003CC0EA /* Products */; - ProjectRef = 1EBA455C14B97E92003CC0EA /* util.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1EE8C2E81476A48E002496F2 /* lm */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 1EBA45A414B97E93003CC0EA /* libutil.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libutil.a; - remoteRef = 1EBA45A314B97E93003CC0EA /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXSourcesBuildPhase section */ - 1EE8C2E51476A48E002496F2 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EBA44AD14B97E22003CC0EA /* bhiksha.cc in Sources */, - 1EBA44D414B97E22003CC0EA /* binary_format.cc in Sources */, - 1EBA44D814B97E22003CC0EA /* config.cc in Sources */, - 1EBA44DD14B97E22003CC0EA /* left_test.cc in Sources */, - 1EBA44DF14B97E22003CC0EA /* lm_exception.cc in Sources */, - 1EBA44E214B97E22003CC0EA /* model_test.cc in Sources */, - 1EBA44E414B97E22003CC0EA /* model.cc in Sources */, - 1EBA44E614B97E22003CC0EA /* ngram_query.cc in Sources */, - 1EBA44E814B97E22003CC0EA /* quantize.cc in Sources */, - 1EBA44EA14B97E22003CC0EA /* read_arpa.cc in Sources */, - 1EBA44ED14B97E22003CC0EA /* search_hashed.cc in Sources */, - 1EBA44EF14B97E22003CC0EA /* search_trie.cc in Sources */, - 1EBA44F114B97E22003CC0EA /* trie_sort.cc in Sources */, - 1EBA44F314B97E22003CC0EA /* trie.cc in Sources */, - 1EBA44F514B97E22003CC0EA /* virtual_interface.cc in Sources */, - 1EBA44F714B97E22003CC0EA /* vocab.cc in Sources */, - 1EBA457F14B97E92003CC0EA /* bit_packing_test.cc in Sources */, - 1EBA458014B97E92003CC0EA /* bit_packing.cc in Sources */, - 1EBA458314B97E92003CC0EA /* ersatz_progress.cc in Sources */, - 1EBA458514B97E92003CC0EA /* exception.cc in Sources */, - 1EBA458714B97E92003CC0EA /* file_piece_test.cc in Sources */, - 1EBA458814B97E92003CC0EA /* file_piece.cc in Sources */, - 1EBA458A14B97E92003CC0EA /* file.cc in Sources */, - 1EBA458C14B97E92003CC0EA /* getopt.c in Sources */, - 1EBA458F14B97E92003CC0EA /* Jamfile in Sources */, - 1EBA459014B97E92003CC0EA /* joint_sort_test.cc in Sources */, - 1EBA459414B97E92003CC0EA /* mmap.cc in Sources */, - 1EBA459614B97E92003CC0EA /* murmur_hash.cc in Sources */, - 1EBA459814B97E92003CC0EA /* probing_hash_table_test.cc in Sources */, - 1EBA459D14B97E92003CC0EA /* sorted_uniform_test.cc in Sources */, - 1EBA45A014B97E92003CC0EA /* tokenize_piece_test.cc in Sources */, - 1E890C71159D1B260031F9F3 /* value_build.cc in Sources */, - 1EC2B30916233A8C00614D71 /* usage.cc in Sources */, - 1E8EAE58164C3FDC00EE20D6 /* pool.cc in Sources */, - 1E8EAE5A164C3FDC00EE20D6 /* read_compressed_test.cc in Sources */, - 1E8EAE5B164C3FDC00EE20D6 /* read_compressed.cc in Sources */, - 1E8EAE5D164C3FDC00EE20D6 /* string_piece.cc in Sources */, - 1EBC5362164C405A00ADFA2C /* bignum-dtoa.cc in Sources */, - 1EBC5364164C405A00ADFA2C /* bignum.cc in Sources */, - 1EBC5366164C405A00ADFA2C /* cached-powers.cc in Sources */, - 1EBC5368164C405A00ADFA2C /* diy-fp.cc in Sources */, - 1EBC536A164C405A00ADFA2C /* double-conversion.cc in Sources */, - 1EBC536C164C405A00ADFA2C /* fast-dtoa.cc in Sources */, - 1EBC536E164C405A00ADFA2C /* fixed-dtoa.cc in Sources */, - 1EBC5371164C405A00ADFA2C /* Jamfile in Sources */, - 1EBC5372164C405A00ADFA2C /* strtod.cc in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1EE8C2EB1476A48E002496F2 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - ../.., - /opt/local/include, - ); - MACOSX_DEPLOYMENT_TARGET = 10.7; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - 1EE8C2EC1476A48E002496F2 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - ../.., - /opt/local/include, - ); - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - }; - name = Release; - }; - 1EE8C2EE1476A48E002496F2 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - EXECUTABLE_PREFIX = lib; - GCC_PREPROCESSOR_DEFINITIONS = "KENLM_MAX_ORDER=7"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/../../lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../lm/bin/darwin-4.2.1/release/link-static/threading-multi\"", - "\"$(SRCROOT)/../../lm/bin/gcc-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../util/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../util/bin/darwin-4.2.1/release/link-static/threading-multi\"", - "\"$(SRCROOT)/../../util/bin/gcc-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = ""; - }; - name = Debug; - }; - 1EE8C2EF1476A48E002496F2 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - EXECUTABLE_PREFIX = lib; - GCC_PREPROCESSOR_DEFINITIONS = "KENLM_MAX_ORDER=7"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/../../lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../lm/bin/darwin-4.2.1/release/link-static/threading-multi\"", - "\"$(SRCROOT)/../../lm/bin/gcc-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../util/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../util/bin/darwin-4.2.1/release/link-static/threading-multi\"", - "\"$(SRCROOT)/../../util/bin/gcc-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = ""; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1EE8C2E31476A48E002496F2 /* Build configuration list for PBXProject "lm" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1EE8C2EB1476A48E002496F2 /* Debug */, - 1EE8C2EC1476A48E002496F2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1EE8C2ED1476A48E002496F2 /* Build configuration list for PBXNativeTarget "lm" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1EE8C2EE1476A48E002496F2 /* Debug */, - 1EE8C2EF1476A48E002496F2 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 1EE8C2E01476A48E002496F2 /* Project object */; -} diff --git a/contrib/other-builds/lm.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/lm.xcscheme b/contrib/other-builds/lm.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/lm.xcscheme deleted file mode 100644 index d6a2f2b1de..0000000000 --- a/contrib/other-builds/lm.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/lm.xcscheme +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/contrib/other-builds/lm.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/xcschememanagement.plist b/contrib/other-builds/lm.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 4a2ad2a481..0000000000 --- a/contrib/other-builds/lm.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - SchemeUserState - - lm.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - 1EE8C2E81476A48E002496F2 - - primary - - - - - diff --git a/contrib/other-builds/lm/.cproject b/contrib/other-builds/lm/.cproject index e3e47fd7e9..87dff9b31c 100644 --- a/contrib/other-builds/lm/.cproject +++ b/contrib/other-builds/lm/.cproject @@ -11,8 +11,7 @@ - - + @@ -20,47 +19,42 @@ - + - - - - - - - - - - - - - - - - - + @@ -80,7 +74,7 @@ - + @@ -97,13 +91,13 @@ - - diff --git a/contrib/other-builds/lm/.project b/contrib/other-builds/lm/.project index 9498bb19ed..0941396cc1 100644 --- a/contrib/other-builds/lm/.project +++ b/contrib/other-builds/lm/.project @@ -86,6 +86,11 @@ 1 PARENT-3-PROJECT_LOC/lm/.DS_Store + + CMakeLists.txt + 1 + PARENT-3-PROJECT_LOC/lm/CMakeLists.txt + COPYING 1 @@ -121,6 +126,11 @@ 1 PARENT-3-PROJECT_LOC/lm/bhiksha.hh + + bin + 2 + virtual:/virtual + binary_format.cc 1 @@ -141,6 +151,16 @@ 1 PARENT-3-PROJECT_LOC/lm/build_binary + + build_binary_main.cc + 1 + PARENT-3-PROJECT_LOC/lm/build_binary_main.cc + + + builder + 2 + virtual:/virtual + clean.sh 1 @@ -171,6 +191,16 @@ 1 PARENT-3-PROJECT_LOC/lm/facade.hh + + filter + 2 + virtual:/virtual + + + fragment_main.cc + 1 + PARENT-3-PROJECT_LOC/lm/fragment_main.cc + left.hh 1 @@ -256,6 +286,11 @@ 1 PARENT-3-PROJECT_LOC/lm/query + + query_main.cc + 1 + PARENT-3-PROJECT_LOC/lm/query_main.cc + read_arpa.cc 1 @@ -291,6 +326,16 @@ 1 PARENT-3-PROJECT_LOC/lm/search_trie.hh + + sizes.cc + 1 + PARENT-3-PROJECT_LOC/lm/sizes.cc + + + sizes.hh + 1 + PARENT-3-PROJECT_LOC/lm/sizes.hh + state.hh 1 @@ -376,5 +421,960 @@ 1 PARENT-3-PROJECT_LOC/lm/word_index.hh + + wrappers + 2 + virtual:/virtual + + + bin/clang-darwin-4.2.1 + 2 + virtual:/virtual + + + bin/darwin-4.2.1 + 2 + virtual:/virtual + + + bin/left_test.test + 2 + virtual:/virtual + + + bin/model_test.test + 2 + virtual:/virtual + + + bin/order.log + 1 + PARENT-3-PROJECT_LOC/lm/bin/order.log + + + bin/partial_test.test + 2 + virtual:/virtual + + + builder/Jamfile + 1 + PARENT-3-PROJECT_LOC/lm/builder/Jamfile + + + builder/README.md + 1 + PARENT-3-PROJECT_LOC/lm/builder/README.md + + + builder/TODO + 1 + PARENT-3-PROJECT_LOC/lm/builder/TODO + + + builder/adjust_counts.cc + 1 + PARENT-3-PROJECT_LOC/lm/builder/adjust_counts.cc + + + builder/adjust_counts.hh + 1 + PARENT-3-PROJECT_LOC/lm/builder/adjust_counts.hh + + + builder/adjust_counts_test.cc + 1 + PARENT-3-PROJECT_LOC/lm/builder/adjust_counts_test.cc + + + builder/bin + 2 + virtual:/virtual + + + builder/corpus_count.cc + 1 + PARENT-3-PROJECT_LOC/lm/builder/corpus_count.cc + + + builder/corpus_count.hh + 1 + PARENT-3-PROJECT_LOC/lm/builder/corpus_count.hh + + + builder/corpus_count_test.cc + 1 + PARENT-3-PROJECT_LOC/lm/builder/corpus_count_test.cc + + + builder/discount.hh + 1 + PARENT-3-PROJECT_LOC/lm/builder/discount.hh + + + builder/dump_counts_main.cc + 1 + PARENT-3-PROJECT_LOC/lm/builder/dump_counts_main.cc + + + builder/hash_gamma.hh + 1 + PARENT-3-PROJECT_LOC/lm/builder/hash_gamma.hh + + + builder/header_info.hh + 1 + PARENT-3-PROJECT_LOC/lm/builder/header_info.hh + + + builder/initial_probabilities.cc + 1 + PARENT-3-PROJECT_LOC/lm/builder/initial_probabilities.cc + + + builder/initial_probabilities.hh + 1 + PARENT-3-PROJECT_LOC/lm/builder/initial_probabilities.hh + + + builder/interpolate.cc + 1 + PARENT-3-PROJECT_LOC/lm/builder/interpolate.cc + + + builder/interpolate.hh + 1 + PARENT-3-PROJECT_LOC/lm/builder/interpolate.hh + + + builder/lmplz_main.cc + 1 + PARENT-3-PROJECT_LOC/lm/builder/lmplz_main.cc + + + builder/pipeline.cc + 1 + PARENT-3-PROJECT_LOC/lm/builder/pipeline.cc + + + builder/pipeline.hh + 1 + PARENT-3-PROJECT_LOC/lm/builder/pipeline.hh + + + filter/Jamfile + 1 + PARENT-3-PROJECT_LOC/lm/filter/Jamfile + + + filter/arpa_io.cc + 1 + PARENT-3-PROJECT_LOC/lm/filter/arpa_io.cc + + + filter/arpa_io.hh + 1 + PARENT-3-PROJECT_LOC/lm/filter/arpa_io.hh + + + filter/bin + 2 + virtual:/virtual + + + filter/count_io.hh + 1 + PARENT-3-PROJECT_LOC/lm/filter/count_io.hh + + + filter/filter_main.cc + 1 + PARENT-3-PROJECT_LOC/lm/filter/filter_main.cc + + + filter/format.hh + 1 + PARENT-3-PROJECT_LOC/lm/filter/format.hh + + + filter/phrase.cc + 1 + PARENT-3-PROJECT_LOC/lm/filter/phrase.cc + + + filter/phrase.hh + 1 + PARENT-3-PROJECT_LOC/lm/filter/phrase.hh + + + filter/phrase_table_vocab_main.cc + 1 + PARENT-3-PROJECT_LOC/lm/filter/phrase_table_vocab_main.cc + + + filter/thread.hh + 1 + PARENT-3-PROJECT_LOC/lm/filter/thread.hh + + + filter/vocab.cc + 1 + PARENT-3-PROJECT_LOC/lm/filter/vocab.cc + + + filter/vocab.hh + 1 + PARENT-3-PROJECT_LOC/lm/filter/vocab.hh + + + filter/wrapper.hh + 1 + PARENT-3-PROJECT_LOC/lm/filter/wrapper.hh + + + wrappers/README + 1 + PARENT-3-PROJECT_LOC/lm/wrappers/README + + + wrappers/nplm.cc + 1 + PARENT-3-PROJECT_LOC/lm/wrappers/nplm.cc + + + wrappers/nplm.hh + 1 + PARENT-3-PROJECT_LOC/lm/wrappers/nplm.hh + + + bin/clang-darwin-4.2.1/release + 2 + virtual:/virtual + + + bin/darwin-4.2.1/release + 2 + virtual:/virtual + + + bin/left_test.test/clang-darwin-4.2.1 + 2 + virtual:/virtual + + + bin/left_test.test/darwin-4.2.1 + 2 + virtual:/virtual + + + bin/model_test.test/clang-darwin-4.2.1 + 2 + virtual:/virtual + + + bin/model_test.test/darwin-4.2.1 + 2 + virtual:/virtual + + + bin/partial_test.test/clang-darwin-4.2.1 + 2 + virtual:/virtual + + + bin/partial_test.test/darwin-4.2.1 + 2 + virtual:/virtual + + + builder/bin/clang-darwin-4.2.1 + 2 + virtual:/virtual + + + builder/bin/darwin-4.2.1 + 2 + virtual:/virtual + + + filter/bin/clang-darwin-4.2.1 + 2 + virtual:/virtual + + + filter/bin/darwin-4.2.1 + 2 + virtual:/virtual + + + bin/clang-darwin-4.2.1/release/debug-symbols-on + 2 + virtual:/virtual + + + bin/darwin-4.2.1/release/debug-symbols-on + 2 + virtual:/virtual + + + bin/left_test.test/clang-darwin-4.2.1/release + 2 + virtual:/virtual + + + bin/left_test.test/darwin-4.2.1/release + 2 + virtual:/virtual + + + bin/model_test.test/clang-darwin-4.2.1/release + 2 + virtual:/virtual + + + bin/model_test.test/darwin-4.2.1/release + 2 + virtual:/virtual + + + bin/partial_test.test/clang-darwin-4.2.1/release + 2 + virtual:/virtual + + + bin/partial_test.test/darwin-4.2.1/release + 2 + virtual:/virtual + + + builder/bin/clang-darwin-4.2.1/release + 2 + virtual:/virtual + + + builder/bin/darwin-4.2.1/release + 2 + virtual:/virtual + + + filter/bin/clang-darwin-4.2.1/release + 2 + virtual:/virtual + + + filter/bin/darwin-4.2.1/release + 2 + virtual:/virtual + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static + 2 + virtual:/virtual + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static + 2 + virtual:/virtual + + + bin/left_test.test/clang-darwin-4.2.1/release/debug-symbols-on + 2 + virtual:/virtual + + + bin/left_test.test/darwin-4.2.1/release/debug-symbols-on + 2 + virtual:/virtual + + + bin/model_test.test/clang-darwin-4.2.1/release/debug-symbols-on + 2 + virtual:/virtual + + + bin/model_test.test/darwin-4.2.1/release/debug-symbols-on + 2 + virtual:/virtual + + + bin/partial_test.test/clang-darwin-4.2.1/release/debug-symbols-on + 2 + virtual:/virtual + + + bin/partial_test.test/darwin-4.2.1/release/debug-symbols-on + 2 + virtual:/virtual + + + builder/bin/clang-darwin-4.2.1/release/debug-symbols-on + 2 + virtual:/virtual + + + builder/bin/darwin-4.2.1/release/debug-symbols-on + 2 + virtual:/virtual + + + filter/bin/clang-darwin-4.2.1/release/debug-symbols-on + 2 + virtual:/virtual + + + filter/bin/darwin-4.2.1/release/debug-symbols-on + 2 + virtual:/virtual + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual + + + bin/left_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static + 2 + virtual:/virtual + + + bin/left_test.test/darwin-4.2.1/release/debug-symbols-on/link-static + 2 + virtual:/virtual + + + bin/model_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static + 2 + virtual:/virtual + + + bin/model_test.test/darwin-4.2.1/release/debug-symbols-on/link-static + 2 + virtual:/virtual + + + bin/partial_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static + 2 + virtual:/virtual + + + bin/partial_test.test/darwin-4.2.1/release/debug-symbols-on/link-static + 2 + virtual:/virtual + + + builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static + 2 + virtual:/virtual + + + builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static + 2 + virtual:/virtual + + + filter/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static + 2 + virtual:/virtual + + + filter/bin/darwin-4.2.1/release/debug-symbols-on/link-static + 2 + virtual:/virtual + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/bhiksha.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/bhiksha.o + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/binary_format.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/binary_format.o + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/build_binary + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/build_binary + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/build_binary_main.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/build_binary_main.o + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/config.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/config.o + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/fragment + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/fragment + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/fragment_main.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/fragment_main.o + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/lm_exception.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/lm_exception.o + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/model.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/model.o + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/quantize.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/quantize.o + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/query + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/query + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/query_main.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/query_main.o + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/read_arpa.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/read_arpa.o + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/search_hashed.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/search_hashed.o + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/search_trie.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/search_trie.o + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/sizes.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/sizes.o + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/trie.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/trie.o + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/trie_sort.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/trie_sort.o + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/value_build.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/value_build.o + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/virtual_interface.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/virtual_interface.o + + + bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/vocab.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/vocab.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/bhiksha.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/bhiksha.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/binary_format.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/binary_format.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/build_binary + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/build_binary + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/build_binary_main.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/build_binary_main.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/config.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/config.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/fragment + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/fragment + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/fragment_main.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/fragment_main.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/lm_exception.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/lm_exception.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/model.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/model.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/quantize.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/quantize.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/query + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/query + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/query_main.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/query_main.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/read_arpa.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/read_arpa.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/search_hashed.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/search_hashed.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/search_trie.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/search_trie.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/sizes.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/sizes.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/trie.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/trie.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/trie_sort.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/trie_sort.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/value_build.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/value_build.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/virtual_interface.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/virtual_interface.o + + + bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/vocab.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/vocab.o + + + bin/left_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual + + + bin/left_test.test/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual + + + bin/model_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual + + + bin/model_test.test/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual + + + bin/partial_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual + + + bin/partial_test.test/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual + + + builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual + + + builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual + + + filter/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual + + + filter/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual + + + bin/left_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/left_test + 1 + PARENT-3-PROJECT_LOC/lm/bin/left_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/left_test + + + bin/left_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/left_test.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/left_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/left_test.o + + + bin/left_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/left_test.output + 1 + PARENT-3-PROJECT_LOC/lm/bin/left_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/left_test.output + + + bin/left_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/left_test.run + 1 + PARENT-3-PROJECT_LOC/lm/bin/left_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/left_test.run + + + bin/left_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/left_test.test + 1 + PARENT-3-PROJECT_LOC/lm/bin/left_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/left_test.test + + + bin/left_test.test/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/left_test.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/left_test.test/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/left_test.o + + + bin/model_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/model_test + 1 + PARENT-3-PROJECT_LOC/lm/bin/model_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/model_test + + + bin/model_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/model_test.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/model_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/model_test.o + + + bin/model_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/model_test.output + 1 + PARENT-3-PROJECT_LOC/lm/bin/model_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/model_test.output + + + bin/model_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/model_test.run + 1 + PARENT-3-PROJECT_LOC/lm/bin/model_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/model_test.run + + + bin/model_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/model_test.test + 1 + PARENT-3-PROJECT_LOC/lm/bin/model_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/model_test.test + + + bin/model_test.test/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/model_test.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/model_test.test/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/model_test.o + + + bin/partial_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/partial_test + 1 + PARENT-3-PROJECT_LOC/lm/bin/partial_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/partial_test + + + bin/partial_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/partial_test.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/partial_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/partial_test.o + + + bin/partial_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/partial_test.output + 1 + PARENT-3-PROJECT_LOC/lm/bin/partial_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/partial_test.output + + + bin/partial_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/partial_test.run + 1 + PARENT-3-PROJECT_LOC/lm/bin/partial_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/partial_test.run + + + bin/partial_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/partial_test.test + 1 + PARENT-3-PROJECT_LOC/lm/bin/partial_test.test/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/partial_test.test + + + bin/partial_test.test/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/partial_test.o + 1 + PARENT-3-PROJECT_LOC/lm/bin/partial_test.test/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/partial_test.o + + + builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/adjust_counts.o + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/adjust_counts.o + + + builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/corpus_count.o + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/corpus_count.o + + + builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/dump_counts + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/dump_counts + + + builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/dump_counts_main.o + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/dump_counts_main.o + + + builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/initial_probabilities.o + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/initial_probabilities.o + + + builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/interpolate.o + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/interpolate.o + + + builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/lmplz + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/lmplz + + + builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/lmplz_main.o + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/lmplz_main.o + + + builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/pipeline.o + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/pipeline.o + + + builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/print.o + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/print.o + + + builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/adjust_counts.o + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/adjust_counts.o + + + builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/corpus_count.o + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/corpus_count.o + + + builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/initial_probabilities.o + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/initial_probabilities.o + + + builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/interpolate.o + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/interpolate.o + + + builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/lmplz + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/lmplz + + + builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/lmplz_main.o + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/lmplz_main.o + + + builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/pipeline.o + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/pipeline.o + + + builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/print.o + 1 + PARENT-3-PROJECT_LOC/lm/builder/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/print.o + + + filter/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/arpa_io.o + 1 + PARENT-3-PROJECT_LOC/lm/filter/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/arpa_io.o + + + filter/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/filter + 1 + PARENT-3-PROJECT_LOC/lm/filter/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/filter + + + filter/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/main.o + 1 + PARENT-3-PROJECT_LOC/lm/filter/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/main.o + + + filter/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/phrase.o + 1 + PARENT-3-PROJECT_LOC/lm/filter/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/phrase.o + + + filter/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/vocab.o + 1 + PARENT-3-PROJECT_LOC/lm/filter/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/vocab.o + + + filter/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/arpa_io.o + 1 + PARENT-3-PROJECT_LOC/lm/filter/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/arpa_io.o + + + filter/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/filter + 1 + PARENT-3-PROJECT_LOC/lm/filter/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/filter + + + filter/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/main.o + 1 + PARENT-3-PROJECT_LOC/lm/filter/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/main.o + + + filter/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/phrase.o + 1 + PARENT-3-PROJECT_LOC/lm/filter/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/phrase.o + + + filter/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/vocab.o + 1 + PARENT-3-PROJECT_LOC/lm/filter/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/vocab.o + diff --git a/contrib/other-builds/lm/lm.project b/contrib/other-builds/lm/lm.project new file mode 100644 index 0000000000..c30ebe533c --- /dev/null +++ b/contrib/other-builds/lm/lm.project @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/mert.xcodeproj/project.pbxproj b/contrib/other-builds/mert.xcodeproj/project.pbxproj deleted file mode 100644 index 76879e58e1..0000000000 --- a/contrib/other-builds/mert.xcodeproj/project.pbxproj +++ /dev/null @@ -1,338 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1E1D826915AC641600FE42E9 /* extractor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E1D825915AC63ED00FE42E9 /* extractor.cpp */; }; - 1E1D826A15AC642B00FE42E9 /* libmert_lib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E2B6B141593A6F30028137E /* libmert_lib.a */; }; - 1E2B6ADE1593A5500028137E /* mert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2B6ADD1593A5500028137E /* mert.cpp */; }; - 1E2B6B1F1593CA8A0028137E /* libmert_lib.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E2B6B141593A6F30028137E /* libmert_lib.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1E2B6B131593A6F30028137E /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1E2B6B0F1593A6F30028137E /* mert_lib.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1E2CCF3315939E2D00D858D1; - remoteInfo = mert_lib; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 1E1D825D15AC640800FE42E9 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; - 1EB0AF031593A2180007E2A4 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1E1D825915AC63ED00FE42E9 /* extractor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = extractor.cpp; path = ../../mert/extractor.cpp; sourceTree = ""; }; - 1E1D825F15AC640800FE42E9 /* extractor */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = extractor; sourceTree = BUILT_PRODUCTS_DIR; }; - 1E2B6ADD1593A5500028137E /* mert.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = mert.cpp; path = ../../mert/mert.cpp; sourceTree = ""; }; - 1E2B6B0F1593A6F30028137E /* mert_lib.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = mert_lib.xcodeproj; sourceTree = ""; }; - 1EB0AF051593A2180007E2A4 /* mert */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = mert; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1E1D825C15AC640800FE42E9 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E1D826A15AC642B00FE42E9 /* libmert_lib.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1EB0AF021593A2180007E2A4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E2B6B1F1593CA8A0028137E /* libmert_lib.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1E2B6B101593A6F30028137E /* Products */ = { - isa = PBXGroup; - children = ( - 1E2B6B141593A6F30028137E /* libmert_lib.a */, - ); - name = Products; - sourceTree = ""; - }; - 1EB0AEFA1593A2180007E2A4 = { - isa = PBXGroup; - children = ( - 1E2B6B0F1593A6F30028137E /* mert_lib.xcodeproj */, - 1E2B6ADD1593A5500028137E /* mert.cpp */, - 1E1D825915AC63ED00FE42E9 /* extractor.cpp */, - 1EB0AF061593A2180007E2A4 /* Products */, - ); - sourceTree = ""; - }; - 1EB0AF061593A2180007E2A4 /* Products */ = { - isa = PBXGroup; - children = ( - 1EB0AF051593A2180007E2A4 /* mert */, - 1E1D825F15AC640800FE42E9 /* extractor */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1E1D825E15AC640800FE42E9 /* extractor */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1E1D826615AC640800FE42E9 /* Build configuration list for PBXNativeTarget "extractor" */; - buildPhases = ( - 1E1D825B15AC640800FE42E9 /* Sources */, - 1E1D825C15AC640800FE42E9 /* Frameworks */, - 1E1D825D15AC640800FE42E9 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = extractor; - productName = extractor; - productReference = 1E1D825F15AC640800FE42E9 /* extractor */; - productType = "com.apple.product-type.tool"; - }; - 1EB0AF041593A2180007E2A4 /* mert */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1EB0AF0F1593A2180007E2A4 /* Build configuration list for PBXNativeTarget "mert" */; - buildPhases = ( - 1EB0AF011593A2180007E2A4 /* Sources */, - 1EB0AF021593A2180007E2A4 /* Frameworks */, - 1EB0AF031593A2180007E2A4 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = mert; - productName = mert; - productReference = 1EB0AF051593A2180007E2A4 /* mert */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 1EB0AEFC1593A2180007E2A4 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 1EB0AEFF1593A2180007E2A4 /* Build configuration list for PBXProject "mert" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 1EB0AEFA1593A2180007E2A4; - productRefGroup = 1EB0AF061593A2180007E2A4 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 1E2B6B101593A6F30028137E /* Products */; - ProjectRef = 1E2B6B0F1593A6F30028137E /* mert_lib.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1EB0AF041593A2180007E2A4 /* mert */, - 1E1D825E15AC640800FE42E9 /* extractor */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 1E2B6B141593A6F30028137E /* libmert_lib.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libmert_lib.a; - remoteRef = 1E2B6B131593A6F30028137E /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXSourcesBuildPhase section */ - 1E1D825B15AC640800FE42E9 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E1D826915AC641600FE42E9 /* extractor.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 1EB0AF011593A2180007E2A4 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E2B6ADE1593A5500028137E /* mert.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1E1D826715AC640800FE42E9 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - HEADER_SEARCH_PATHS = ( - ../.., - /opt/local/include, - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 1E1D826815AC640800FE42E9 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - HEADER_SEARCH_PATHS = ( - ../.., - /opt/local/include, - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; - 1EB0AF0D1593A2180007E2A4 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - ONLY_ACTIVE_ARCH = YES; - OTHER_LDFLAGS = "-lz"; - SDKROOT = macosx; - }; - name = Debug; - }; - 1EB0AF0E1593A2180007E2A4 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - OTHER_LDFLAGS = "-lz"; - SDKROOT = macosx; - }; - name = Release; - }; - 1EB0AF101593A2180007E2A4 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - WITH_THREADS, - ); - HEADER_SEARCH_PATHS = ( - ../.., - /opt/local/include, - ); - LIBRARY_SEARCH_PATHS = /opt/local/lib/; - OTHER_LDFLAGS = ( - "-lz", - "-lboost_thread-mt", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 1EB0AF111593A2180007E2A4 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREPROCESSOR_DEFINITIONS = WITH_THREADS; - HEADER_SEARCH_PATHS = ( - ../.., - /opt/local/include, - ); - LIBRARY_SEARCH_PATHS = /opt/local/lib/; - OTHER_LDFLAGS = ( - "-lz", - "-lboost_thread-mt", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1E1D826615AC640800FE42E9 /* Build configuration list for PBXNativeTarget "extractor" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1E1D826715AC640800FE42E9 /* Debug */, - 1E1D826815AC640800FE42E9 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1EB0AEFF1593A2180007E2A4 /* Build configuration list for PBXProject "mert" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1EB0AF0D1593A2180007E2A4 /* Debug */, - 1EB0AF0E1593A2180007E2A4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1EB0AF0F1593A2180007E2A4 /* Build configuration list for PBXNativeTarget "mert" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1EB0AF101593A2180007E2A4 /* Debug */, - 1EB0AF111593A2180007E2A4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 1EB0AEFC1593A2180007E2A4 /* Project object */; -} diff --git a/contrib/other-builds/mert.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/contrib/other-builds/mert.xcodeproj/project.xcworkspace/contents.xcworkspacedata deleted file mode 100644 index 03c6b7b80b..0000000000 --- a/contrib/other-builds/mert.xcodeproj/project.xcworkspace/contents.xcworkspacedata +++ /dev/null @@ -1,7 +0,0 @@ - - - - - diff --git a/contrib/other-builds/mert.xcodeproj/project.xcworkspace/xcuserdata/hieuhoang.xcuserdatad/UserInterfaceState.xcuserstate b/contrib/other-builds/mert.xcodeproj/project.xcworkspace/xcuserdata/hieuhoang.xcuserdatad/UserInterfaceState.xcuserstate deleted file mode 100644 index eef05294a0..0000000000 --- a/contrib/other-builds/mert.xcodeproj/project.xcworkspace/xcuserdata/hieuhoang.xcuserdatad/UserInterfaceState.xcuserstate +++ /dev/null @@ -1,8628 +0,0 @@ - - - - - $archiver - NSKeyedArchiver - $objects - - $null - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 2 - - - CF$UID - 3 - - - NS.objects - - - CF$UID - 4 - - - CF$UID - 177 - - - - A0ED48DA-D116-4801-AB51-861E1E3CE459 - IDEWorkspaceDocument - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 5 - - - CF$UID - 6 - - - CF$UID - 7 - - - CF$UID - 8 - - - CF$UID - 9 - - - CF$UID - 10 - - - CF$UID - 11 - - - CF$UID - 12 - - - NS.objects - - - CF$UID - 13 - - - CF$UID - 14 - - - CF$UID - 16 - - - CF$UID - 17 - - - CF$UID - 2 - - - CF$UID - 8 - - - CF$UID - 128 - - - CF$UID - 128 - - - - IDEWindowFrame - IDEOrderedWorkspaceTabControllers - IDEWindowInFullscreenMode - IDEWorkspaceTabController_47815CCD-573D-4957-A6D1-F7389545EB27 - IDEWorkspaceWindowControllerUniqueIdentifier - IDEActiveWorkspaceTabController - IDEWindowToolbarIsVisible - IDEWindowTabBarIsVisible - {{0, 58}, {1280, 720}} - - $class - - CF$UID - 15 - - NS.objects - - - CF$UID - 8 - - - - - $classes - - NSArray - NSObject - - $classname - NSArray - - - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 18 - - - CF$UID - 19 - - - CF$UID - 20 - - - CF$UID - 21 - - - CF$UID - 22 - - - CF$UID - 23 - - - CF$UID - 24 - - - CF$UID - 25 - - - NS.objects - - - CF$UID - 26 - - - CF$UID - 128 - - - CF$UID - 47 - - - CF$UID - 138 - - - CF$UID - 145 - - - CF$UID - 167 - - - CF$UID - 16 - - - CF$UID - 176 - - - - IDEEditorArea - IDEShowNavigator - AssistantEditorsLayout - IDEWorkspaceTabControllerUtilityAreaSplitView - IDENavigatorArea - IDEWorkspaceTabControllerDesignAreaSplitView - IDEShowUtilities - IDETabLabel - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 27 - - - CF$UID - 28 - - - CF$UID - 29 - - - CF$UID - 30 - - - CF$UID - 31 - - - CF$UID - 32 - - - CF$UID - 33 - - - CF$UID - 34 - - - NS.objects - - - CF$UID - 35 - - - CF$UID - 57 - - - CF$UID - 98 - - - CF$UID - 128 - - - CF$UID - 47 - - - CF$UID - 129 - - - CF$UID - 137 - - - CF$UID - 16 - - - - layoutTree - IDEEditorMode_Standard - IDEEDitorArea_DebugArea - IDEShowEditor - EditorMode - DebuggerSplitView - DefaultPersistentRepresentations - ShowDebuggerArea - - $class - - CF$UID - 56 - - geniusEditorContextNode - - CF$UID - 0 - - primaryEditorContextNode - - CF$UID - 36 - - rootLayoutTreeNode - - CF$UID - 53 - - - - $class - - CF$UID - 55 - - children - - CF$UID - 0 - - contentType - 1 - documentArchivableRepresentation - - CF$UID - 37 - - orientation - 0 - parent - - CF$UID - 53 - - - - $class - - CF$UID - 52 - - DocumentLocation - - CF$UID - 48 - - DomainIdentifier - - CF$UID - 38 - - IdentifierPath - - CF$UID - 39 - - IndexOfDocumentIdentifier - - CF$UID - 47 - - - Xcode.IDENavigableItemDomain.WorkspaceStructure - - $class - - CF$UID - 15 - - NS.objects - - - CF$UID - 40 - - - CF$UID - 43 - - - CF$UID - 45 - - - - - $class - - CF$UID - 42 - - Identifier - - CF$UID - 41 - - - InterpolatedScorer.h - - $classes - - IDEArchivableStringIndexPair - NSObject - - $classname - IDEArchivableStringIndexPair - - - $class - - CF$UID - 42 - - Identifier - - CF$UID - 44 - - - mert_lib.xcodeproj - - $class - - CF$UID - 42 - - Identifier - - CF$UID - 46 - - - mert - 0 - - $class - - CF$UID - 51 - - documentURL - - CF$UID - 49 - - timestamp - - CF$UID - 0 - - - - $class - - CF$UID - 50 - - NS.string - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/mert/InterpolatedScorer.h - - - $classes - - NSMutableString - NSString - NSObject - - $classname - NSMutableString - - - $classes - - DVTDocumentLocation - NSObject - - $classname - DVTDocumentLocation - - - $classes - - IDENavigableItemArchivableRepresentation - NSObject - - $classname - IDENavigableItemArchivableRepresentation - - - $class - - CF$UID - 55 - - children - - CF$UID - 54 - - contentType - 0 - documentArchivableRepresentation - - CF$UID - 0 - - orientation - 0 - parent - - CF$UID - 0 - - - - $class - - CF$UID - 15 - - NS.objects - - - CF$UID - 36 - - - - - $classes - - IDEWorkspaceTabControllerLayoutTreeNode - NSObject - - $classname - IDEWorkspaceTabControllerLayoutTreeNode - - - $classes - - IDEWorkspaceTabControllerLayoutTree - NSObject - - $classname - IDEWorkspaceTabControllerLayoutTree - - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 58 - - - NS.objects - - - CF$UID - 59 - - - - EditorLayout_PersistentRepresentation - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 60 - - - NS.objects - - - CF$UID - 61 - - - - Main - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 62 - - - CF$UID - 63 - - - CF$UID - 64 - - - NS.objects - - - CF$UID - 65 - - - CF$UID - 47 - - - CF$UID - 96 - - - - EditorLayout_StateSavingStateDictionaries - EditorLayout_Selected - EditorLayout_Geometry - - $class - - CF$UID - 15 - - NS.objects - - - CF$UID - 66 - - - - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 67 - - - CF$UID - 68 - - - CF$UID - 69 - - - CF$UID - 70 - - - CF$UID - 71 - - - CF$UID - 72 - - - CF$UID - 73 - - - NS.objects - - - CF$UID - 74 - - - CF$UID - 75 - - - CF$UID - 81 - - - CF$UID - 90 - - - CF$UID - 41 - - - CF$UID - 91 - - - CF$UID - 92 - - - - FileDataType - ArchivableRepresentation - EditorState - NavigableItemName - DocumentNavigableItemName - DocumentExtensionIdentifier - DocumentURL - public.c-header - - $class - - CF$UID - 52 - - DocumentLocation - - CF$UID - 48 - - DomainIdentifier - - CF$UID - 38 - - IdentifierPath - - CF$UID - 76 - - IndexOfDocumentIdentifier - - CF$UID - 47 - - - - $class - - CF$UID - 15 - - NS.objects - - - CF$UID - 77 - - - CF$UID - 78 - - - CF$UID - 79 - - - - - $class - - CF$UID - 42 - - Identifier - - CF$UID - 41 - - - - $class - - CF$UID - 42 - - Identifier - - CF$UID - 44 - - - - $class - - CF$UID - 42 - - Identifier - - CF$UID - 80 - - - mert - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 82 - - - CF$UID - 83 - - - CF$UID - 84 - - - CF$UID - 85 - - - NS.objects - - - CF$UID - 86 - - - CF$UID - 87 - - - CF$UID - 16 - - - CF$UID - 88 - - - - PrimaryDocumentTimestamp - PrimaryDocumentVisibleCharacterRange - HideAllIssues - PrimaryDocumentSelectedCharacterRange - 363696391.20448101 - {0, 1309} - {332, 0} - - $classes - - NSDictionary - NSObject - - $classname - NSDictionary - - class InterpolatedScorer - Xcode.IDEKit.EditorDocument.SourceCode - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 93 - - - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/mert/InterpolatedScorer.h - - $classes - - NSURL - NSObject - - $classname - NSURL - - - $classes - - NSMutableDictionary - NSDictionary - NSObject - - $classname - NSMutableDictionary - - - $class - - CF$UID - 15 - - NS.objects - - - CF$UID - 97 - - - - {{0, 0}, {1020, 622}} - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 99 - - - CF$UID - 100 - - - CF$UID - 101 - - - CF$UID - 102 - - - CF$UID - 103 - - - CF$UID - 104 - - - NS.objects - - - CF$UID - 105 - - - CF$UID - 106 - - - CF$UID - 108 - - - CF$UID - 105 - - - CF$UID - 110 - - - CF$UID - 122 - - - - LayoutFocusMode - console - variables - LayoutMode - IDEDebuggerAreaSplitView - IDEDebugArea_SplitView - 1 - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 107 - - - NS.objects - - - CF$UID - 47 - - - - ConsoleFilterMode - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 109 - - - NS.objects - - - CF$UID - 105 - - - - VariablesViewSelectedScope - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 111 - - - NS.objects - - - CF$UID - 112 - - - - DVTSplitViewItems - - $class - - CF$UID - 121 - - NS.objects - - - CF$UID - 113 - - - CF$UID - 118 - - - - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 114 - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 116 - - - CF$UID - 117 - - - - DVTIdentifier - DVTViewMagnitude - VariablesView - 510 - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 114 - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 119 - - - CF$UID - 120 - - - - ConsoleArea - 509 - - $classes - - NSMutableArray - NSArray - NSObject - - $classname - NSMutableArray - - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 111 - - - NS.objects - - - CF$UID - 123 - - - - - $class - - CF$UID - 121 - - NS.objects - - - CF$UID - 124 - - - CF$UID - 126 - - - - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 114 - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 116 - - - CF$UID - 125 - - - - 510 - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 114 - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 119 - - - CF$UID - 127 - - - - 509 - - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 111 - - - NS.objects - - - CF$UID - 130 - - - - - $class - - CF$UID - 121 - - NS.objects - - - CF$UID - 131 - - - CF$UID - 134 - - - - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 114 - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 132 - - - CF$UID - 133 - - - - IDEEditor - 203 - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 114 - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 135 - - - CF$UID - 136 - - - - IDEDebuggerArea - 115 - - $class - - CF$UID - 95 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 111 - - - NS.objects - - - CF$UID - 139 - - - - - $class - - CF$UID - 121 - - NS.objects - - - CF$UID - 140 - - - CF$UID - 143 - - - - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 114 - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 141 - - - CF$UID - 142 - - - - - 398 - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 114 - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 141 - - - CF$UID - 144 - - - - 224 - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 146 - - - CF$UID - 147 - - - NS.objects - - - CF$UID - 147 - - - CF$UID - 148 - - - - SelectedNavigator - Xcode.IDEKit.Navigator.Structure - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 149 - - - CF$UID - 150 - - - CF$UID - 151 - - - CF$UID - 152 - - - CF$UID - 153 - - - CF$UID - 154 - - - CF$UID - 155 - - - NS.objects - - - CF$UID - 156 - - - CF$UID - 16 - - - CF$UID - 157 - - - CF$UID - 16 - - - CF$UID - 16 - - - CF$UID - 159 - - - CF$UID - 162 - - - - IDEVisibleRect - IDEUnsavedDocumentFilteringEnabled - IDENavigatorExpandedItemsBeforeFilteringSet - IDERecentDocumentFilteringEnabled - IDESCMStatusFilteringEnabled - IDESelectedObjects - IDEExpandedItemsSet - {{0, 300}, {259, 578}} - - $class - - CF$UID - 158 - - NS.objects - - - - $classes - - NSSet - NSObject - - $classname - NSSet - - - $class - - CF$UID - 15 - - NS.objects - - - CF$UID - 160 - - - - - $class - - CF$UID - 121 - - NS.objects - - - CF$UID - 161 - - - CF$UID - 44 - - - CF$UID - 41 - - - - mert - - $class - - CF$UID - 158 - - NS.objects - - - CF$UID - 163 - - - CF$UID - 165 - - - CF$UID - 166 - - - - - $class - - CF$UID - 121 - - NS.objects - - - CF$UID - 161 - - - CF$UID - 164 - - - - Products - - $class - - CF$UID - 121 - - NS.objects - - - CF$UID - 161 - - - - - $class - - CF$UID - 121 - - NS.objects - - - CF$UID - 161 - - - CF$UID - 44 - - - - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 111 - - - NS.objects - - - CF$UID - 168 - - - - - $class - - CF$UID - 121 - - NS.objects - - - CF$UID - 169 - - - CF$UID - 171 - - - CF$UID - 173 - - - - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 114 - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 22 - - - CF$UID - 170 - - - - 260 - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 114 - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 18 - - - CF$UID - 172 - - - - 1020 - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 114 - - - CF$UID - 115 - - - NS.objects - - - CF$UID - 174 - - - CF$UID - 175 - - - - IDEUtilitiesArea - 260 - InterpolatedScorer.h - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 178 - - - CF$UID - 179 - - - CF$UID - 180 - - - CF$UID - 181 - - - CF$UID - 182 - - - CF$UID - 183 - - - CF$UID - 184 - - - CF$UID - 185 - - - CF$UID - 186 - - - CF$UID - 187 - - - NS.objects - - - CF$UID - 16 - - - CF$UID - 188 - - - CF$UID - 47 - - - CF$UID - 655 - - - CF$UID - 660 - - - CF$UID - 663 - - - CF$UID - 694 - - - CF$UID - 695 - - - CF$UID - 16 - - - CF$UID - 16 - - - - BreakpointsActivated - DefaultEditorStatesForURLs - DebuggingWindowBehavior - ActiveRunDestination - ActiveScheme - LastCompletedPersistentSchemeBasedActivityReport - DocumentWindows - RecentEditorDocumentURLs - AppFocusInMiniDebugging - MiniDebuggingConsole - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 189 - - - CF$UID - 190 - - - NS.objects - - - CF$UID - 191 - - - CF$UID - 613 - - - - Xcode.Xcode3ProjectSupport.EditorDocument.Xcode3Project - Xcode.IDEKit.EditorDocument.SourceCode - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 192 - - - CF$UID - 194 - - - NS.objects - - - CF$UID - 196 - - - CF$UID - 414 - - - - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 193 - - - - $class - - CF$UID - 50 - - NS.string - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/contrib/other-builds/mert.xcodeproj/ - - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 195 - - - - $class - - CF$UID - 50 - - NS.string - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/contrib/other-builds/mert_lib.xcodeproj/ - - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 197 - - - CF$UID - 198 - - - CF$UID - 199 - - - CF$UID - 200 - - - NS.objects - - - CF$UID - 201 - - - CF$UID - 211 - - - CF$UID - 212 - - - CF$UID - 413 - - - - Xcode3ProjectEditor.sourceList.splitview - Xcode3ProjectEditorPreviousTargetEditorClass - Xcode3ProjectEditorSelectedDocumentLocations - Xcode3ProjectEditor_Xcode3BuildSettingsEditor - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 202 - - - NS.objects - - - CF$UID - 203 - - - - DVTSplitViewItems - - $class - - CF$UID - 121 - - NS.objects - - - CF$UID - 204 - - - CF$UID - 209 - - - - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 205 - - - CF$UID - 206 - - - NS.objects - - - CF$UID - 207 - - - CF$UID - 208 - - - - DVTIdentifier - DVTViewMagnitude - - 162 - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 205 - - - CF$UID - 206 - - - NS.objects - - - CF$UID - 207 - - - CF$UID - 210 - - - - 858 - Xcode3BuildSettingsEditor - - $class - - CF$UID - 15 - - NS.objects - - - CF$UID - 213 - - - - - $class - - CF$UID - 412 - - documentURL - - CF$UID - 214 - - selection - - CF$UID - 216 - - timestamp - - CF$UID - 215 - - - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/contrib/other-builds/mert.xcodeproj/ - 363627943.189156 - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 217 - - - CF$UID - 218 - - - CF$UID - 219 - - - NS.objects - - - CF$UID - 211 - - - CF$UID - 220 - - - CF$UID - 221 - - - - Editor - Target - Xcode3BuildSettingsEditorLocations - mert - - $class - - CF$UID - 15 - - NS.objects - - - CF$UID - 222 - - - - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 223 - - - CF$UID - 224 - - - CF$UID - 225 - - - CF$UID - 226 - - - CF$UID - 227 - - - CF$UID - 228 - - - NS.objects - - - CF$UID - 229 - - - CF$UID - 230 - - - CF$UID - 229 - - - CF$UID - 229 - - - CF$UID - 231 - - - CF$UID - 105 - - - - Xcode3BuildSettingsEditorMode - Selected Build Properties - Xcode3BuildSettingsEditorDisplayMode - Xcode3BuildPropertyValueDisplayMode - Collapsed Build Property Categories - Xcode3BuildPropertyNameDisplayMode - 0 - - $class - - CF$UID - 121 - - NS.objects - - - - $class - - CF$UID - 121 - - NS.objects - - - CF$UID - 232 - - - CF$UID - 233 - - - CF$UID - 234 - - - CF$UID - 235 - - - CF$UID - 236 - - - CF$UID - 237 - - - CF$UID - 238 - - - CF$UID - 239 - - - CF$UID - 240 - - - CF$UID - 241 - - - CF$UID - 242 - - - CF$UID - 243 - - - CF$UID - 244 - - - CF$UID - 245 - - - CF$UID - 246 - - - CF$UID - 247 - - - CF$UID - 248 - - - CF$UID - 249 - - - CF$UID - 250 - - - CF$UID - 251 - - - CF$UID - 252 - - - CF$UID - 253 - - - CF$UID - 254 - - - CF$UID - 255 - - - CF$UID - 256 - - - CF$UID - 257 - - - CF$UID - 258 - - - CF$UID - 259 - - - CF$UID - 260 - - - CF$UID - 261 - - - CF$UID - 262 - - - CF$UID - 263 - - - CF$UID - 264 - - - CF$UID - 265 - - - CF$UID - 266 - - - CF$UID - 267 - - - CF$UID - 268 - - - CF$UID - 269 - - - CF$UID - 270 - - - CF$UID - 271 - - - CF$UID - 272 - - - CF$UID - 273 - - - CF$UID - 274 - - - CF$UID - 275 - - - CF$UID - 276 - - - CF$UID - 277 - - - CF$UID - 278 - - - CF$UID - 279 - - - CF$UID - 280 - - - CF$UID - 281 - - - CF$UID - 282 - - - CF$UID - 283 - - - CF$UID - 284 - - - CF$UID - 285 - - - CF$UID - 286 - - - CF$UID - 287 - - - CF$UID - 288 - - - CF$UID - 289 - - - CF$UID - 290 - - - CF$UID - 291 - - - CF$UID - 292 - - - CF$UID - 293 - - - CF$UID - 294 - - - CF$UID - 295 - - - CF$UID - 296 - - - CF$UID - 297 - - - CF$UID - 298 - - - CF$UID - 299 - - - CF$UID - 300 - - - CF$UID - 301 - - - CF$UID - 302 - - - CF$UID - 303 - - - CF$UID - 304 - - - CF$UID - 305 - - - CF$UID - 306 - - - CF$UID - 307 - - - CF$UID - 308 - - - CF$UID - 309 - - - CF$UID - 310 - - - CF$UID - 311 - - - CF$UID - 312 - - - CF$UID - 313 - - - CF$UID - 314 - - - CF$UID - 315 - - - CF$UID - 316 - - - CF$UID - 317 - - - CF$UID - 318 - - - CF$UID - 319 - - - CF$UID - 320 - - - CF$UID - 321 - - - CF$UID - 322 - - - CF$UID - 323 - - - CF$UID - 324 - - - CF$UID - 325 - - - CF$UID - 326 - - - CF$UID - 327 - - - CF$UID - 328 - - - CF$UID - 329 - - - CF$UID - 330 - - - CF$UID - 331 - - - CF$UID - 332 - - - CF$UID - 333 - - - CF$UID - 334 - - - CF$UID - 335 - - - CF$UID - 336 - - - CF$UID - 337 - - - CF$UID - 338 - - - CF$UID - 339 - - - CF$UID - 340 - - - CF$UID - 341 - - - CF$UID - 342 - - - CF$UID - 343 - - - CF$UID - 344 - - - CF$UID - 345 - - - CF$UID - 346 - - - CF$UID - 347 - - - CF$UID - 348 - - - CF$UID - 349 - - - CF$UID - 350 - - - CF$UID - 351 - - - CF$UID - 352 - - - CF$UID - 353 - - - CF$UID - 354 - - - CF$UID - 355 - - - CF$UID - 356 - - - CF$UID - 357 - - - CF$UID - 358 - - - CF$UID - 359 - - - CF$UID - 360 - - - CF$UID - 361 - - - CF$UID - 362 - - - CF$UID - 363 - - - CF$UID - 364 - - - CF$UID - 365 - - - CF$UID - 366 - - - CF$UID - 367 - - - CF$UID - 368 - - - CF$UID - 369 - - - CF$UID - 370 - - - CF$UID - 371 - - - CF$UID - 372 - - - CF$UID - 373 - - - CF$UID - 374 - - - CF$UID - 375 - - - CF$UID - 376 - - - CF$UID - 377 - - - CF$UID - 378 - - - CF$UID - 379 - - - CF$UID - 380 - - - CF$UID - 381 - - - CF$UID - 382 - - - CF$UID - 383 - - - CF$UID - 384 - - - CF$UID - 385 - - - CF$UID - 386 - - - CF$UID - 387 - - - CF$UID - 388 - - - CF$UID - 389 - - - CF$UID - 390 - - - CF$UID - 391 - - - CF$UID - 392 - - - CF$UID - 393 - - - CF$UID - 394 - - - CF$UID - 395 - - - CF$UID - 396 - - - CF$UID - 397 - - - CF$UID - 398 - - - CF$UID - 399 - - - CF$UID - 400 - - - CF$UID - 401 - - - CF$UID - 402 - - - CF$UID - 403 - - - CF$UID - 404 - - - CF$UID - 405 - - - CF$UID - 406 - - - CF$UID - 407 - - - CF$UID - 408 - - - CF$UID - 409 - - - CF$UID - 410 - - - CF$UID - 411 - - - - - $class - - CF$UID - 50 - - NS.string - Architectures||ADDITIONAL_SDKS - - - $class - - CF$UID - 50 - - NS.string - Architectures||ARCHS - - - $class - - CF$UID - 50 - - NS.string - Architectures||SDKROOT - - - $class - - CF$UID - 50 - - NS.string - Architectures||SUPPORTED_PLATFORMS - - - $class - - CF$UID - 50 - - NS.string - Architectures||VALID_ARCHS - - - $class - - CF$UID - 50 - - NS.string - Build Locations||SYMROOT - - - $class - - CF$UID - 50 - - NS.string - Build Locations||OBJROOT - - - $class - - CF$UID - 50 - - NS.string - Build Locations||SHARED_PRECOMPS_DIR - - - $class - - CF$UID - 50 - - NS.string - Build Options||BUILD_VARIANTS - - - $class - - CF$UID - 50 - - NS.string - Build Options||GCC_VERSION - - - $class - - CF$UID - 50 - - NS.string - Build Options||ENABLE_OPENMP_SUPPORT - - - $class - - CF$UID - 50 - - NS.string - Build Options||GENERATE_PROFILING_CODE - - - $class - - CF$UID - 50 - - NS.string - Build Options||PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR - - - $class - - CF$UID - 50 - - NS.string - Build Options||RUN_CLANG_STATIC_ANALYZER - - - $class - - CF$UID - 50 - - NS.string - Build Options||SCAN_ALL_SOURCE_FILES_FOR_INCLUDES - - - $class - - CF$UID - 50 - - NS.string - Build Options||VALIDATE_PRODUCT - - - $class - - CF$UID - 50 - - NS.string - Code Signing||CODE_SIGN_ENTITLEMENTS - - - $class - - CF$UID - 50 - - NS.string - Code Signing||CODE_SIGN_IDENTITY - - - $class - - CF$UID - 50 - - NS.string - Code Signing||CODE_SIGN_RESOURCE_RULES_PATH - - - $class - - CF$UID - 50 - - NS.string - Code Signing||OTHER_CODE_SIGN_FLAGS - - - $class - - CF$UID - 50 - - NS.string - Deployment||STRIPFLAGS - - - $class - - CF$UID - 50 - - NS.string - Deployment||ALTERNATE_GROUP - - - $class - - CF$UID - 50 - - NS.string - Deployment||ALTERNATE_OWNER - - - $class - - CF$UID - 50 - - NS.string - Deployment||ALTERNATE_MODE - - - $class - - CF$UID - 50 - - NS.string - Deployment||ALTERNATE_PERMISSIONS_FILES - - - $class - - CF$UID - 50 - - NS.string - Deployment||COMBINE_HIDPI_IMAGES - - - $class - - CF$UID - 50 - - NS.string - Deployment||DEPLOYMENT_LOCATION - - - $class - - CF$UID - 50 - - NS.string - Deployment||DEPLOYMENT_POSTPROCESSING - - - $class - - CF$UID - 50 - - NS.string - Deployment||INSTALL_GROUP - - - $class - - CF$UID - 50 - - NS.string - Deployment||INSTALL_OWNER - - - $class - - CF$UID - 50 - - NS.string - Deployment||INSTALL_MODE_FLAG - - - $class - - CF$UID - 50 - - NS.string - Deployment||DSTROOT - - - $class - - CF$UID - 50 - - NS.string - Deployment||INSTALL_PATH - - - $class - - CF$UID - 50 - - NS.string - Deployment||MACOSX_DEPLOYMENT_TARGET - - - $class - - CF$UID - 50 - - NS.string - Deployment||SKIP_INSTALL - - - $class - - CF$UID - 50 - - NS.string - Deployment||STRIP_INSTALLED_PRODUCT - - - $class - - CF$UID - 50 - - NS.string - Deployment||STRIP_STYLE - - - $class - - CF$UID - 50 - - NS.string - Deployment||SEPARATE_STRIP - - - $class - - CF$UID - 50 - - NS.string - Kernel Module||MODULE_NAME - - - $class - - CF$UID - 50 - - NS.string - Kernel Module||MODULE_START - - - $class - - CF$UID - 50 - - NS.string - Kernel Module||MODULE_STOP - - - $class - - CF$UID - 50 - - NS.string - Kernel Module||MODULE_VERSION - - - $class - - CF$UID - 50 - - NS.string - Linking||BUNDLE_LOADER - - - $class - - CF$UID - 50 - - NS.string - Linking||DYLIB_COMPATIBILITY_VERSION - - - $class - - CF$UID - 50 - - NS.string - Linking||DYLIB_CURRENT_VERSION - - - $class - - CF$UID - 50 - - NS.string - Linking||DEAD_CODE_STRIPPING - - - $class - - CF$UID - 50 - - NS.string - Linking||LINKER_DISPLAYS_MANGLED_NAMES - - - $class - - CF$UID - 50 - - NS.string - Linking||LD_NO_PIE - - - $class - - CF$UID - 50 - - NS.string - Linking||PRESERVE_DEAD_CODE_INITS_AND_TERMS - - - $class - - CF$UID - 50 - - NS.string - Linking||LD_DYLIB_INSTALL_NAME - - - $class - - CF$UID - 50 - - NS.string - Linking||EXPORTED_SYMBOLS_FILE - - - $class - - CF$UID - 50 - - NS.string - Linking||INIT_ROUTINE - - - $class - - CF$UID - 50 - - NS.string - Linking||LINK_WITH_STANDARD_LIBRARIES - - - $class - - CF$UID - 50 - - NS.string - Linking||MACH_O_TYPE - - - $class - - CF$UID - 50 - - NS.string - Linking||LD_OPENMP_FLAGS - - - $class - - CF$UID - 50 - - NS.string - Linking||ORDER_FILE - - - $class - - CF$UID - 50 - - NS.string - Linking||OTHER_LDFLAGS - - - $class - - CF$UID - 50 - - NS.string - Linking||GENERATE_MASTER_OBJECT_FILE - - - $class - - CF$UID - 50 - - NS.string - Linking||PRELINK_LIBS - - - $class - - CF$UID - 50 - - NS.string - Linking||KEEP_PRIVATE_EXTERNS - - - $class - - CF$UID - 50 - - NS.string - Linking||LD_RUNPATH_SEARCH_PATHS - - - $class - - CF$UID - 50 - - NS.string - Linking||SEPARATE_SYMBOL_EDIT - - - $class - - CF$UID - 50 - - NS.string - Linking||PRELINK_FLAGS - - - $class - - CF$UID - 50 - - NS.string - Linking||SECTORDER_FLAGS - - - $class - - CF$UID - 50 - - NS.string - Linking||UNEXPORTED_SYMBOLS_FILE - - - $class - - CF$UID - 50 - - NS.string - Linking||WARNING_LDFLAGS - - - $class - - CF$UID - 50 - - NS.string - Linking||LD_GENERATE_MAP_FILE - - - $class - - CF$UID - 50 - - NS.string - Packaging||APPLY_RULES_IN_COPY_FILES - - - $class - - CF$UID - 50 - - NS.string - Packaging||EXECUTABLE_EXTENSION - - - $class - - CF$UID - 50 - - NS.string - Packaging||EXECUTABLE_PREFIX - - - $class - - CF$UID - 50 - - NS.string - Packaging||INFOPLIST_EXPAND_BUILD_SETTINGS - - - $class - - CF$UID - 50 - - NS.string - Packaging||GENERATE_PKGINFO_FILE - - - $class - - CF$UID - 50 - - NS.string - Packaging||FRAMEWORK_VERSION - - - $class - - CF$UID - 50 - - NS.string - Packaging||INFOPLIST_FILE - - - $class - - CF$UID - 50 - - NS.string - Packaging||INFOPLIST_OTHER_PREPROCESSOR_FLAGS - - - $class - - CF$UID - 50 - - NS.string - Packaging||INFOPLIST_OUTPUT_FORMAT - - - $class - - CF$UID - 50 - - NS.string - Packaging||INFOPLIST_PREPROCESSOR_DEFINITIONS - - - $class - - CF$UID - 50 - - NS.string - Packaging||INFOPLIST_PREFIX_HEADER - - - $class - - CF$UID - 50 - - NS.string - Packaging||INFOPLIST_PREPROCESS - - - $class - - CF$UID - 50 - - NS.string - Packaging||COPYING_PRESERVES_HFS_DATA - - - $class - - CF$UID - 50 - - NS.string - Packaging||PRIVATE_HEADERS_FOLDER_PATH - - - $class - - CF$UID - 50 - - NS.string - Packaging||PRODUCT_NAME - - - $class - - CF$UID - 50 - - NS.string - Packaging||PLIST_FILE_OUTPUT_FORMAT - - - $class - - CF$UID - 50 - - NS.string - Packaging||PUBLIC_HEADERS_FOLDER_PATH - - - $class - - CF$UID - 50 - - NS.string - Packaging||STRINGS_FILE_OUTPUT_ENCODING - - - $class - - CF$UID - 50 - - NS.string - Packaging||WRAPPER_EXTENSION - - - $class - - CF$UID - 50 - - NS.string - Search Paths||ALWAYS_SEARCH_USER_PATHS - - - $class - - CF$UID - 50 - - NS.string - Search Paths||FRAMEWORK_SEARCH_PATHS - - - $class - - CF$UID - 50 - - NS.string - Search Paths||HEADER_SEARCH_PATHS - - - $class - - CF$UID - 50 - - NS.string - Search Paths||LIBRARY_SEARCH_PATHS - - - $class - - CF$UID - 50 - - NS.string - Search Paths||REZ_SEARCH_PATHS - - - $class - - CF$UID - 50 - - NS.string - Search Paths||EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES - - - $class - - CF$UID - 50 - - NS.string - Search Paths||INCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES - - - $class - - CF$UID - 50 - - NS.string - Search Paths||USER_HEADER_SEARCH_PATHS - - - $class - - CF$UID - 50 - - NS.string - Unit Testing||OTHER_TEST_FLAGS - - - $class - - CF$UID - 50 - - NS.string - Unit Testing||TEST_AFTER_BUILD - - - $class - - CF$UID - 50 - - NS.string - Unit Testing||TEST_HOST - - - $class - - CF$UID - 50 - - NS.string - Unit Testing||TEST_RIG - - - $class - - CF$UID - 50 - - NS.string - Versioning||CURRENT_PROJECT_VERSION - - - $class - - CF$UID - 50 - - NS.string - Versioning||VERSION_INFO_FILE - - - $class - - CF$UID - 50 - - NS.string - Versioning||VERSION_INFO_EXPORT_DECL - - - $class - - CF$UID - 50 - - NS.string - Versioning||VERSION_INFO_PREFIX - - - $class - - CF$UID - 50 - - NS.string - Versioning||VERSION_INFO_SUFFIX - - - $class - - CF$UID - 50 - - NS.string - Versioning||VERSIONING_SYSTEM - - - $class - - CF$UID - 50 - - NS.string - Versioning||VERSION_INFO_BUILDER - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_FAST_OBJC_DISPATCH - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_ENABLE_SSE3_EXTENSIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_ENABLE_SSE41_EXTENSIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_ENABLE_SSE42_EXTENSIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_STRICT_ALIASING - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_GENERATE_DEBUGGING_SYMBOLS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_DYNAMIC_NO_PIC - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_INLINES_ARE_PRIVATE_EXTERN - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_ENABLE_KERNEL_DEVELOPMENT - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||LLVM_LTO - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_REUSE_STRINGS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_NO_COMMON_BLOCKS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_ENABLE_OBJC_GC - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_FAST_MATH - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_THREADSAFE_STATICS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_UNROLL_LOOPS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_CHAR_IS_UNSIGNED_CHAR - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_ENABLE_ASM_KEYWORD - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_C_LANGUAGE_STANDARD - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_INPUT_FILETYPE - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_ENABLE_CPP_EXCEPTIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_ENABLE_CPP_RTTI - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_LINK_WITH_DYNAMIC_LIBRARIES - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_ENABLE_OBJC_EXCEPTIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_ENABLE_TRIGRAPHS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_ENABLE_FLOATING_POINT_LIBRARY_CALLS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_USE_INDIRECT_FUNCTION_CALLS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_USE_REGISTER_FUNCTION_CALLS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_INCREASE_PRECOMPILED_HEADER_SHARING - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_CW_ASM_SYNTAX - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||OTHER_CFLAGS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||OTHER_CPLUSPLUSFLAGS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_PRECOMPILE_PREFIX_HEADER - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_PREFIX_HEADER - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_ENABLE_BUILTIN_FUNCTIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_ENABLE_PASCAL_STRINGS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_FORCE_CPU_SUBTYPE_ALL - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_SHORT_ENUMS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_USE_STANDARD_INCLUDE_SEARCHING - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Preprocessing||GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_CHECK_SWITCH_STATEMENTS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_FOUR_CHARACTER_CONSTANTS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_SHADOW - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_64_TO_32_BIT_CONVERSION - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_INHIBIT_ALL_WARNINGS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_ABOUT_RETURN_TYPE - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_MISSING_PARENTHESES - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_ABOUT_MISSING_PROTOTYPES - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_ABOUT_MISSING_NEWLINE - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_NON_VIRTUAL_DESTRUCTOR - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||WARNING_CFLAGS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_PEDANTIC - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_ABOUT_POINTER_SIGNEDNESS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_SIGN_COMPARE - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_STRICT_SELECTOR_MATCH - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_TREAT_WARNINGS_AS_ERRORS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_TYPECHECK_CALLS_TO_PRINTF - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_UNDECLARED_SELECTOR - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_UNINITIALIZED_AUTOS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_UNKNOWN_PRAGMAS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_UNUSED_FUNCTION - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_UNUSED_LABEL - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_UNUSED_PARAMETER - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_UNUSED_VALUE - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_UNUSED_VARIABLE - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO - - - $classes - - Xcode3ProjectDocumentLocation - DVTDocumentLocation - NSObject - - $classname - Xcode3ProjectDocumentLocation - - - $class - - CF$UID - 95 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 197 - - - CF$UID - 198 - - - CF$UID - 199 - - - CF$UID - 200 - - - NS.objects - - - CF$UID - 415 - - - CF$UID - 211 - - - CF$UID - 421 - - - CF$UID - 612 - - - - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 202 - - - NS.objects - - - CF$UID - 416 - - - - - $class - - CF$UID - 121 - - NS.objects - - - CF$UID - 417 - - - CF$UID - 419 - - - - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 205 - - - CF$UID - 206 - - - NS.objects - - - CF$UID - 207 - - - CF$UID - 418 - - - - 170 - - $class - - CF$UID - 89 - - NS.keys - - - CF$UID - 205 - - - CF$UID - 206 - - - NS.objects - - - CF$UID - 207 - - - CF$UID - 420 - - - - 850 - - $class - - CF$UID - 15 - - NS.objects - - - CF$UID - 422 - - - - - $class - - CF$UID - 412 - - documentURL - - CF$UID - 423 - - selection - - CF$UID - 425 - - timestamp - - CF$UID - 424 - - - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/contrib/other-builds/mert_lib.xcodeproj/ - 363694729.26263899 - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 217 - - - CF$UID - 218 - - - CF$UID - 219 - - - NS.objects - - - CF$UID - 211 - - - CF$UID - 426 - - - CF$UID - 427 - - - - mert_lib - - $class - - CF$UID - 15 - - NS.objects - - - CF$UID - 428 - - - - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 228 - - - CF$UID - 224 - - - CF$UID - 225 - - - CF$UID - 226 - - - CF$UID - 227 - - - CF$UID - 223 - - - NS.objects - - - CF$UID - 105 - - - CF$UID - 429 - - - CF$UID - 229 - - - CF$UID - 229 - - - CF$UID - 430 - - - CF$UID - 229 - - - - - $class - - CF$UID - 121 - - NS.objects - - - - $class - - CF$UID - 121 - - NS.objects - - - CF$UID - 431 - - - CF$UID - 432 - - - CF$UID - 433 - - - CF$UID - 434 - - - CF$UID - 435 - - - CF$UID - 436 - - - CF$UID - 437 - - - CF$UID - 438 - - - CF$UID - 439 - - - CF$UID - 440 - - - CF$UID - 441 - - - CF$UID - 442 - - - CF$UID - 443 - - - CF$UID - 444 - - - CF$UID - 445 - - - CF$UID - 446 - - - CF$UID - 447 - - - CF$UID - 448 - - - CF$UID - 449 - - - CF$UID - 450 - - - CF$UID - 451 - - - CF$UID - 452 - - - CF$UID - 453 - - - CF$UID - 454 - - - CF$UID - 455 - - - CF$UID - 456 - - - CF$UID - 457 - - - CF$UID - 458 - - - CF$UID - 459 - - - CF$UID - 460 - - - CF$UID - 461 - - - CF$UID - 462 - - - CF$UID - 463 - - - CF$UID - 464 - - - CF$UID - 465 - - - CF$UID - 466 - - - CF$UID - 467 - - - CF$UID - 468 - - - CF$UID - 469 - - - CF$UID - 470 - - - CF$UID - 471 - - - CF$UID - 472 - - - CF$UID - 473 - - - CF$UID - 474 - - - CF$UID - 475 - - - CF$UID - 476 - - - CF$UID - 477 - - - CF$UID - 478 - - - CF$UID - 479 - - - CF$UID - 480 - - - CF$UID - 481 - - - CF$UID - 482 - - - CF$UID - 483 - - - CF$UID - 484 - - - CF$UID - 485 - - - CF$UID - 486 - - - CF$UID - 487 - - - CF$UID - 488 - - - CF$UID - 489 - - - CF$UID - 490 - - - CF$UID - 491 - - - CF$UID - 492 - - - CF$UID - 493 - - - CF$UID - 494 - - - CF$UID - 495 - - - CF$UID - 496 - - - CF$UID - 497 - - - CF$UID - 498 - - - CF$UID - 499 - - - CF$UID - 500 - - - CF$UID - 501 - - - CF$UID - 502 - - - CF$UID - 503 - - - CF$UID - 504 - - - CF$UID - 505 - - - CF$UID - 506 - - - CF$UID - 507 - - - CF$UID - 508 - - - CF$UID - 509 - - - CF$UID - 510 - - - CF$UID - 511 - - - CF$UID - 512 - - - CF$UID - 513 - - - CF$UID - 514 - - - CF$UID - 515 - - - CF$UID - 516 - - - CF$UID - 517 - - - CF$UID - 518 - - - CF$UID - 519 - - - CF$UID - 520 - - - CF$UID - 521 - - - CF$UID - 522 - - - CF$UID - 523 - - - CF$UID - 524 - - - CF$UID - 525 - - - CF$UID - 526 - - - CF$UID - 527 - - - CF$UID - 528 - - - CF$UID - 529 - - - CF$UID - 530 - - - CF$UID - 531 - - - CF$UID - 532 - - - CF$UID - 533 - - - CF$UID - 534 - - - CF$UID - 535 - - - CF$UID - 536 - - - CF$UID - 537 - - - CF$UID - 538 - - - CF$UID - 539 - - - CF$UID - 540 - - - CF$UID - 541 - - - CF$UID - 542 - - - CF$UID - 543 - - - CF$UID - 544 - - - CF$UID - 545 - - - CF$UID - 546 - - - CF$UID - 547 - - - CF$UID - 548 - - - CF$UID - 549 - - - CF$UID - 550 - - - CF$UID - 551 - - - CF$UID - 552 - - - CF$UID - 553 - - - CF$UID - 554 - - - CF$UID - 555 - - - CF$UID - 556 - - - CF$UID - 557 - - - CF$UID - 558 - - - CF$UID - 559 - - - CF$UID - 560 - - - CF$UID - 561 - - - CF$UID - 562 - - - CF$UID - 563 - - - CF$UID - 564 - - - CF$UID - 565 - - - CF$UID - 566 - - - CF$UID - 567 - - - CF$UID - 568 - - - CF$UID - 569 - - - CF$UID - 570 - - - CF$UID - 571 - - - CF$UID - 572 - - - CF$UID - 573 - - - CF$UID - 574 - - - CF$UID - 575 - - - CF$UID - 576 - - - CF$UID - 577 - - - CF$UID - 578 - - - CF$UID - 579 - - - CF$UID - 580 - - - CF$UID - 581 - - - CF$UID - 582 - - - CF$UID - 583 - - - CF$UID - 584 - - - CF$UID - 585 - - - CF$UID - 586 - - - CF$UID - 587 - - - CF$UID - 588 - - - CF$UID - 589 - - - CF$UID - 590 - - - CF$UID - 591 - - - CF$UID - 592 - - - CF$UID - 593 - - - CF$UID - 594 - - - CF$UID - 595 - - - CF$UID - 596 - - - CF$UID - 597 - - - CF$UID - 598 - - - CF$UID - 599 - - - CF$UID - 600 - - - CF$UID - 601 - - - CF$UID - 602 - - - CF$UID - 603 - - - CF$UID - 604 - - - CF$UID - 605 - - - CF$UID - 606 - - - CF$UID - 607 - - - CF$UID - 608 - - - CF$UID - 609 - - - CF$UID - 610 - - - CF$UID - 611 - - - - - $class - - CF$UID - 50 - - NS.string - Architectures||ADDITIONAL_SDKS - - - $class - - CF$UID - 50 - - NS.string - Architectures||ARCHS - - - $class - - CF$UID - 50 - - NS.string - Architectures||SDKROOT - - - $class - - CF$UID - 50 - - NS.string - Architectures||SUPPORTED_PLATFORMS - - - $class - - CF$UID - 50 - - NS.string - Architectures||VALID_ARCHS - - - $class - - CF$UID - 50 - - NS.string - Build Locations||SYMROOT - - - $class - - CF$UID - 50 - - NS.string - Build Locations||OBJROOT - - - $class - - CF$UID - 50 - - NS.string - Build Locations||SHARED_PRECOMPS_DIR - - - $class - - CF$UID - 50 - - NS.string - Build Options||BUILD_VARIANTS - - - $class - - CF$UID - 50 - - NS.string - Build Options||GCC_VERSION - - - $class - - CF$UID - 50 - - NS.string - Build Options||ENABLE_OPENMP_SUPPORT - - - $class - - CF$UID - 50 - - NS.string - Build Options||GENERATE_PROFILING_CODE - - - $class - - CF$UID - 50 - - NS.string - Build Options||PRECOMPS_INCLUDE_HEADERS_FROM_BUILT_PRODUCTS_DIR - - - $class - - CF$UID - 50 - - NS.string - Build Options||RUN_CLANG_STATIC_ANALYZER - - - $class - - CF$UID - 50 - - NS.string - Build Options||SCAN_ALL_SOURCE_FILES_FOR_INCLUDES - - - $class - - CF$UID - 50 - - NS.string - Build Options||VALIDATE_PRODUCT - - - $class - - CF$UID - 50 - - NS.string - Code Signing||CODE_SIGN_ENTITLEMENTS - - - $class - - CF$UID - 50 - - NS.string - Code Signing||CODE_SIGN_IDENTITY - - - $class - - CF$UID - 50 - - NS.string - Code Signing||CODE_SIGN_RESOURCE_RULES_PATH - - - $class - - CF$UID - 50 - - NS.string - Code Signing||OTHER_CODE_SIGN_FLAGS - - - $class - - CF$UID - 50 - - NS.string - Deployment||STRIPFLAGS - - - $class - - CF$UID - 50 - - NS.string - Deployment||ALTERNATE_GROUP - - - $class - - CF$UID - 50 - - NS.string - Deployment||ALTERNATE_OWNER - - - $class - - CF$UID - 50 - - NS.string - Deployment||ALTERNATE_MODE - - - $class - - CF$UID - 50 - - NS.string - Deployment||ALTERNATE_PERMISSIONS_FILES - - - $class - - CF$UID - 50 - - NS.string - Deployment||COMBINE_HIDPI_IMAGES - - - $class - - CF$UID - 50 - - NS.string - Deployment||DEPLOYMENT_LOCATION - - - $class - - CF$UID - 50 - - NS.string - Deployment||DEPLOYMENT_POSTPROCESSING - - - $class - - CF$UID - 50 - - NS.string - Deployment||INSTALL_GROUP - - - $class - - CF$UID - 50 - - NS.string - Deployment||INSTALL_OWNER - - - $class - - CF$UID - 50 - - NS.string - Deployment||INSTALL_MODE_FLAG - - - $class - - CF$UID - 50 - - NS.string - Deployment||DSTROOT - - - $class - - CF$UID - 50 - - NS.string - Deployment||INSTALL_PATH - - - $class - - CF$UID - 50 - - NS.string - Deployment||MACOSX_DEPLOYMENT_TARGET - - - $class - - CF$UID - 50 - - NS.string - Deployment||SKIP_INSTALL - - - $class - - CF$UID - 50 - - NS.string - Deployment||STRIP_INSTALLED_PRODUCT - - - $class - - CF$UID - 50 - - NS.string - Deployment||STRIP_STYLE - - - $class - - CF$UID - 50 - - NS.string - Deployment||SEPARATE_STRIP - - - $class - - CF$UID - 50 - - NS.string - Kernel Module||MODULE_NAME - - - $class - - CF$UID - 50 - - NS.string - Kernel Module||MODULE_START - - - $class - - CF$UID - 50 - - NS.string - Kernel Module||MODULE_STOP - - - $class - - CF$UID - 50 - - NS.string - Kernel Module||MODULE_VERSION - - - $class - - CF$UID - 50 - - NS.string - Linking||BUNDLE_LOADER - - - $class - - CF$UID - 50 - - NS.string - Linking||DYLIB_COMPATIBILITY_VERSION - - - $class - - CF$UID - 50 - - NS.string - Linking||DYLIB_CURRENT_VERSION - - - $class - - CF$UID - 50 - - NS.string - Linking||DEAD_CODE_STRIPPING - - - $class - - CF$UID - 50 - - NS.string - Linking||LINKER_DISPLAYS_MANGLED_NAMES - - - $class - - CF$UID - 50 - - NS.string - Linking||LD_NO_PIE - - - $class - - CF$UID - 50 - - NS.string - Linking||PRESERVE_DEAD_CODE_INITS_AND_TERMS - - - $class - - CF$UID - 50 - - NS.string - Linking||LD_DYLIB_INSTALL_NAME - - - $class - - CF$UID - 50 - - NS.string - Linking||EXPORTED_SYMBOLS_FILE - - - $class - - CF$UID - 50 - - NS.string - Linking||INIT_ROUTINE - - - $class - - CF$UID - 50 - - NS.string - Linking||LINK_WITH_STANDARD_LIBRARIES - - - $class - - CF$UID - 50 - - NS.string - Linking||MACH_O_TYPE - - - $class - - CF$UID - 50 - - NS.string - Linking||LD_OPENMP_FLAGS - - - $class - - CF$UID - 50 - - NS.string - Linking||ORDER_FILE - - - $class - - CF$UID - 50 - - NS.string - Linking||OTHER_LDFLAGS - - - $class - - CF$UID - 50 - - NS.string - Linking||GENERATE_MASTER_OBJECT_FILE - - - $class - - CF$UID - 50 - - NS.string - Linking||PRELINK_LIBS - - - $class - - CF$UID - 50 - - NS.string - Linking||KEEP_PRIVATE_EXTERNS - - - $class - - CF$UID - 50 - - NS.string - Linking||LD_RUNPATH_SEARCH_PATHS - - - $class - - CF$UID - 50 - - NS.string - Linking||SEPARATE_SYMBOL_EDIT - - - $class - - CF$UID - 50 - - NS.string - Linking||PRELINK_FLAGS - - - $class - - CF$UID - 50 - - NS.string - Linking||SECTORDER_FLAGS - - - $class - - CF$UID - 50 - - NS.string - Linking||UNEXPORTED_SYMBOLS_FILE - - - $class - - CF$UID - 50 - - NS.string - Linking||WARNING_LDFLAGS - - - $class - - CF$UID - 50 - - NS.string - Linking||LD_GENERATE_MAP_FILE - - - $class - - CF$UID - 50 - - NS.string - Packaging||APPLY_RULES_IN_COPY_FILES - - - $class - - CF$UID - 50 - - NS.string - Packaging||EXECUTABLE_EXTENSION - - - $class - - CF$UID - 50 - - NS.string - Packaging||EXECUTABLE_PREFIX - - - $class - - CF$UID - 50 - - NS.string - Packaging||INFOPLIST_EXPAND_BUILD_SETTINGS - - - $class - - CF$UID - 50 - - NS.string - Packaging||GENERATE_PKGINFO_FILE - - - $class - - CF$UID - 50 - - NS.string - Packaging||FRAMEWORK_VERSION - - - $class - - CF$UID - 50 - - NS.string - Packaging||INFOPLIST_FILE - - - $class - - CF$UID - 50 - - NS.string - Packaging||INFOPLIST_OTHER_PREPROCESSOR_FLAGS - - - $class - - CF$UID - 50 - - NS.string - Packaging||INFOPLIST_OUTPUT_FORMAT - - - $class - - CF$UID - 50 - - NS.string - Packaging||INFOPLIST_PREPROCESSOR_DEFINITIONS - - - $class - - CF$UID - 50 - - NS.string - Packaging||INFOPLIST_PREFIX_HEADER - - - $class - - CF$UID - 50 - - NS.string - Packaging||INFOPLIST_PREPROCESS - - - $class - - CF$UID - 50 - - NS.string - Packaging||COPYING_PRESERVES_HFS_DATA - - - $class - - CF$UID - 50 - - NS.string - Packaging||PRIVATE_HEADERS_FOLDER_PATH - - - $class - - CF$UID - 50 - - NS.string - Packaging||PRODUCT_NAME - - - $class - - CF$UID - 50 - - NS.string - Packaging||PLIST_FILE_OUTPUT_FORMAT - - - $class - - CF$UID - 50 - - NS.string - Packaging||PUBLIC_HEADERS_FOLDER_PATH - - - $class - - CF$UID - 50 - - NS.string - Packaging||STRINGS_FILE_OUTPUT_ENCODING - - - $class - - CF$UID - 50 - - NS.string - Packaging||WRAPPER_EXTENSION - - - $class - - CF$UID - 50 - - NS.string - Search Paths||ALWAYS_SEARCH_USER_PATHS - - - $class - - CF$UID - 50 - - NS.string - Search Paths||FRAMEWORK_SEARCH_PATHS - - - $class - - CF$UID - 50 - - NS.string - Search Paths||HEADER_SEARCH_PATHS - - - $class - - CF$UID - 50 - - NS.string - Search Paths||LIBRARY_SEARCH_PATHS - - - $class - - CF$UID - 50 - - NS.string - Search Paths||REZ_SEARCH_PATHS - - - $class - - CF$UID - 50 - - NS.string - Search Paths||EXCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES - - - $class - - CF$UID - 50 - - NS.string - Search Paths||INCLUDED_RECURSIVE_SEARCH_PATH_SUBDIRECTORIES - - - $class - - CF$UID - 50 - - NS.string - Search Paths||USER_HEADER_SEARCH_PATHS - - - $class - - CF$UID - 50 - - NS.string - Unit Testing||OTHER_TEST_FLAGS - - - $class - - CF$UID - 50 - - NS.string - Unit Testing||TEST_AFTER_BUILD - - - $class - - CF$UID - 50 - - NS.string - Unit Testing||TEST_HOST - - - $class - - CF$UID - 50 - - NS.string - Unit Testing||TEST_RIG - - - $class - - CF$UID - 50 - - NS.string - Versioning||CURRENT_PROJECT_VERSION - - - $class - - CF$UID - 50 - - NS.string - Versioning||VERSION_INFO_FILE - - - $class - - CF$UID - 50 - - NS.string - Versioning||VERSION_INFO_EXPORT_DECL - - - $class - - CF$UID - 50 - - NS.string - Versioning||VERSION_INFO_PREFIX - - - $class - - CF$UID - 50 - - NS.string - Versioning||VERSION_INFO_SUFFIX - - - $class - - CF$UID - 50 - - NS.string - Versioning||VERSIONING_SYSTEM - - - $class - - CF$UID - 50 - - NS.string - Versioning||VERSION_INFO_BUILDER - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_FAST_OBJC_DISPATCH - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_ENABLE_SSE3_EXTENSIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_ENABLE_SSE41_EXTENSIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_ENABLE_SSE42_EXTENSIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_ENABLE_SUPPLEMENTAL_SSE3_INSTRUCTIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_STRICT_ALIASING - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_GENERATE_DEBUGGING_SYMBOLS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_DYNAMIC_NO_PIC - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_INLINES_ARE_PRIVATE_EXTERN - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_ENABLE_KERNEL_DEVELOPMENT - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||LLVM_LTO - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_REUSE_STRINGS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_NO_COMMON_BLOCKS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_ENABLE_OBJC_GC - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_FAST_MATH - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_THREADSAFE_STATICS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_SYMBOLS_PRIVATE_EXTERN - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Code Generation||GCC_UNROLL_LOOPS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_CHAR_IS_UNSIGNED_CHAR - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_ENABLE_ASM_KEYWORD - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_C_LANGUAGE_STANDARD - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_INPUT_FILETYPE - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_ENABLE_CPP_EXCEPTIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_ENABLE_CPP_RTTI - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_LINK_WITH_DYNAMIC_LIBRARIES - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_ENABLE_OBJC_EXCEPTIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_ENABLE_TRIGRAPHS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_ENABLE_FLOATING_POINT_LIBRARY_CALLS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_USE_INDIRECT_FUNCTION_CALLS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_USE_REGISTER_FUNCTION_CALLS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_INCREASE_PRECOMPILED_HEADER_SHARING - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_CW_ASM_SYNTAX - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||OTHER_CFLAGS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||OTHER_CPLUSPLUSFLAGS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_PRECOMPILE_PREFIX_HEADER - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_PREFIX_HEADER - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_ENABLE_BUILTIN_FUNCTIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_ENABLE_PASCAL_STRINGS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_FORCE_CPU_SUBTYPE_ALL - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_SHORT_ENUMS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Language||GCC_USE_STANDARD_INCLUDE_SEARCHING - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Preprocessing||GCC_PREPROCESSOR_DEFINITIONS_NOT_USED_IN_PRECOMPS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_CHECK_SWITCH_STATEMENTS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_FOUR_CHARACTER_CONSTANTS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_SHADOW - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_64_TO_32_BIT_CONVERSION - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_ALLOW_INCOMPLETE_PROTOCOL - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_INHIBIT_ALL_WARNINGS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_INITIALIZER_NOT_FULLY_BRACKETED - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_ABOUT_RETURN_TYPE - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_MISSING_PARENTHESES - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_ABOUT_MISSING_FIELD_INITIALIZERS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_ABOUT_MISSING_PROTOTYPES - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_ABOUT_MISSING_NEWLINE - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_MULTIPLE_DEFINITION_TYPES_FOR_SELECTOR - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_NON_VIRTUAL_DESTRUCTOR - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||WARNING_CFLAGS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_HIDDEN_VIRTUAL_FUNCTIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_PEDANTIC - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_ABOUT_POINTER_SIGNEDNESS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_SIGN_COMPARE - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_STRICT_SELECTOR_MATCH - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_TREAT_INCOMPATIBLE_POINTER_TYPE_WARNINGS_AS_ERRORS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_TREAT_IMPLICIT_FUNCTION_DECLARATIONS_AS_ERRORS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_TREAT_WARNINGS_AS_ERRORS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_TYPECHECK_CALLS_TO_PRINTF - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_UNDECLARED_SELECTOR - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_UNINITIALIZED_AUTOS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_UNKNOWN_PRAGMAS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_UNUSED_FUNCTION - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_UNUSED_LABEL - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_UNUSED_PARAMETER - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_UNUSED_VALUE - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_UNUSED_VARIABLE - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS - - - $class - - CF$UID - 50 - - NS.string - LLVM compiler 2.1 - Warnings||GCC_WARN_ABOUT_INVALID_OFFSETOF_MACRO - - - $class - - CF$UID - 95 - - NS.keys - - NS.objects - - - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 614 - - - CF$UID - 616 - - - CF$UID - 618 - - - CF$UID - 619 - - - CF$UID - 621 - - - CF$UID - 623 - - - CF$UID - 625 - - - NS.objects - - - CF$UID - 627 - - - CF$UID - 635 - - - CF$UID - 638 - - - CF$UID - 642 - - - CF$UID - 645 - - - CF$UID - 649 - - - CF$UID - 652 - - - - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 615 - - - - $class - - CF$UID - 50 - - NS.string - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/moses/src/ThreadPool.h - - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 617 - - - - $class - - CF$UID - 50 - - NS.string - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/moses/src/ThreadPool.cpp - - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 49 - - - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 620 - - - - $class - - CF$UID - 50 - - NS.string - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/mert/StatisticsBasedScorer.h - - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 622 - - - - $class - - CF$UID - 50 - - NS.string - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/mert/extractor.cpp - - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 624 - - - - $class - - CF$UID - 50 - - NS.string - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/mert/mert.cpp - - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 626 - - - - $class - - CF$UID - 50 - - NS.string - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/mert/StatisticsBasedScorer.cpp - - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 628 - - - CF$UID - 629 - - - CF$UID - 630 - - - CF$UID - 631 - - - NS.objects - - - CF$UID - 632 - - - CF$UID - 633 - - - CF$UID - 16 - - - CF$UID - 634 - - - - PrimaryDocumentTimestamp - PrimaryDocumentVisibleCharacterRange - HideAllIssues - PrimaryDocumentSelectedCharacterRange - 363694733.737234 - {0, 1387} - {0, 0} - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 628 - - - CF$UID - 629 - - - CF$UID - 630 - - - CF$UID - 631 - - - NS.objects - - - CF$UID - 636 - - - CF$UID - 637 - - - CF$UID - 16 - - - CF$UID - 634 - - - - 363694729.53642899 - {0, 1485} - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 82 - - - CF$UID - 83 - - - CF$UID - 84 - - - CF$UID - 85 - - - NS.objects - - - CF$UID - 639 - - - CF$UID - 640 - - - CF$UID - 16 - - - CF$UID - 641 - - - - 363696391.20240802 - {0, 1309} - {332, 0} - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 628 - - - CF$UID - 629 - - - CF$UID - 630 - - - CF$UID - 631 - - - NS.objects - - - CF$UID - 643 - - - CF$UID - 644 - - - CF$UID - 16 - - - CF$UID - 634 - - - - 363694750.12241 - {0, 1049} - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 628 - - - CF$UID - 629 - - - CF$UID - 630 - - - CF$UID - 631 - - - NS.objects - - - CF$UID - 646 - - - CF$UID - 647 - - - CF$UID - 16 - - - CF$UID - 648 - - - - 363694727.34139502 - {992, 1572} - {247, 0} - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 628 - - - CF$UID - 629 - - - CF$UID - 630 - - - CF$UID - 631 - - - NS.objects - - - CF$UID - 650 - - - CF$UID - 651 - - - CF$UID - 16 - - - CF$UID - 634 - - - - 363627943.92405301 - {0, 1056} - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 628 - - - CF$UID - 629 - - - CF$UID - 630 - - - CF$UID - 631 - - - NS.objects - - - CF$UID - 653 - - - CF$UID - 654 - - - CF$UID - 16 - - - CF$UID - 634 - - - - 363694734.10040599 - {0, 1404} - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 656 - - - CF$UID - 657 - - - NS.objects - - - CF$UID - 658 - - - CF$UID - 659 - - - - IDEDeviceLocation - IDEDeviceArchitecture - dvtdevice-local-computer:localhost - x86_64 - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 661 - - - NS.objects - - - CF$UID - 662 - - - - IDENameString - extractor - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 664 - - - CF$UID - 665 - - - CF$UID - 666 - - - NS.objects - - - CF$UID - 667 - - - CF$UID - 693 - - - CF$UID - 426 - - - - IDEActivityReportCompletionSummaryStringSegments - IDEActivityReportOptions - IDEActivityReportTitle - - $class - - CF$UID - 121 - - NS.objects - - - CF$UID - 668 - - - CF$UID - 675 - - - CF$UID - 679 - - - CF$UID - 684 - - - - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 669 - - - CF$UID - 670 - - - CF$UID - 671 - - - NS.objects - - - CF$UID - 672 - - - CF$UID - 673 - - - CF$UID - 674 - - - - IDEActivityReportStringSegmentPriority - IDEActivityReportStringSegmentBackSeparator - IDEActivityReportStringSegmentStringValue - 2 - - Build - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 669 - - - CF$UID - 670 - - - CF$UID - 671 - - - NS.objects - - - CF$UID - 676 - - - CF$UID - 677 - - - CF$UID - 678 - - - - 4 - : - extractor - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 669 - - - CF$UID - 670 - - - CF$UID - 671 - - - NS.objects - - - CF$UID - 680 - - - CF$UID - 681 - - - CF$UID - 682 - - - - 1 - │ - - $class - - CF$UID - 683 - - NS.data - - YnBsaXN0MDDUAQIDBAUGOzxYJHZlcnNpb25YJG9iamVjdHNZJGFy - Y2hpdmVyVCR0b3ASAAGGoK0HCA8QGhscJCUrMTQ3VSRudWxs0wkK - CwwNDlxOU0F0dHJpYnV0ZXNWJGNsYXNzWE5TU3RyaW5ngAOADIAC - WVN1Y2NlZWRlZNMKERITFBdXTlMua2V5c1pOUy5vYmplY3RzgAui - FRaABIAFohgZgAaACVZOU0ZvbnRXTlNDb2xvctQKHR4fICEiI1ZO - U05hbWVWTlNTaXplWE5TZkZsYWdzgAiAByNAJgAAAAAAABENEF8Q - EUx1Y2lkYUdyYW5kZS1Cb2xk0iYnKClaJGNsYXNzbmFtZVgkY2xh - c3Nlc1ZOU0ZvbnSiKCpYTlNPYmplY3TTCiwtLi8wXE5TQ29sb3JT - cGFjZVdOU1doaXRlgAoQA0IwANImJzIzV05TQ29sb3KiMirSJic1 - NlxOU0RpY3Rpb25hcnmiNSrSJic4OV8QEk5TQXR0cmlidXRlZFN0 - cmluZ6I6Kl8QEk5TQXR0cmlidXRlZFN0cmluZ18QD05TS2V5ZWRB - cmNoaXZlctE9PlRyb290gAEACAARABoAIwAtADIANwBFAEsAUgBf - AGYAbwBxAHMAdQB/AIYAjgCZAJsAngCgAKIApQCnAKkAsAC4AMEA - yADPANgA2gDcAOUA6AD8AQEBDAEVARwBHwEoAS8BPAFEAUYBSAFL - AVABWAFbAWABbQFwAXUBigGNAaIBtAG3AbwAAAAAAAACAQAAAAAA - AAA/AAAAAAAAAAAAAAAAAAABvg== - - - - $classes - - NSMutableData - NSData - NSObject - - $classname - NSMutableData - - - $class - - CF$UID - 95 - - NS.keys - - - CF$UID - 669 - - - CF$UID - 685 - - - CF$UID - 686 - - - CF$UID - 671 - - - CF$UID - 687 - - - CF$UID - 688 - - - NS.objects - - - CF$UID - 689 - - - CF$UID - 105 - - - CF$UID - 690 - - - CF$UID - 692 - - - CF$UID - 105 - - - CF$UID - 105 - - - - IDEActivityReportStringSegmentType - IDEActivityReportStringSegmentDate - IDEActivityReportStringSegmentDateStyle - IDEActivityReportStringSegmentTimeStyle - 3 - - $class - - CF$UID - 691 - - NS.time - 363631454.18081301 - - - $classes - - NSDate - NSObject - - $classname - NSDate - - Yesterday at 17:44 - 106 - - $class - - CF$UID - 121 - - NS.objects - - - CF$UID - 2 - - - - - $class - - CF$UID - 121 - - NS.objects - - - CF$UID - 696 - - - CF$UID - 698 - - - CF$UID - 700 - - - CF$UID - 702 - - - CF$UID - 704 - - - CF$UID - 706 - - - CF$UID - 707 - - - CF$UID - 709 - - - CF$UID - 711 - - - - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 697 - - - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/mert/InterpolatedScorer.h - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 699 - - - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/mert/StatisticsBasedScorer.h - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 701 - - - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/mert/StatisticsBasedScorer.cpp - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 703 - - - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/moses/src/ThreadPool.h - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 705 - - - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/moses/src/ThreadPool.cpp - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 423 - - - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 708 - - - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/mert/extractor.cpp - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 710 - - - file://localhost/Users/hieuhoang/unison/workspace/github/hieuhoang/mert/mert.cpp - - $class - - CF$UID - 94 - - NS.base - - CF$UID - 0 - - NS.relative - - CF$UID - 214 - - - - $top - - State - - CF$UID - 1 - - - $version - 100000 - - diff --git a/contrib/other-builds/mert.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist b/contrib/other-builds/mert.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist deleted file mode 100644 index 5029ca7bdc..0000000000 --- a/contrib/other-builds/mert.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - diff --git a/contrib/other-builds/mert.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/extractor.xcscheme b/contrib/other-builds/mert.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/extractor.xcscheme deleted file mode 100644 index 48258bc54a..0000000000 --- a/contrib/other-builds/mert.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/extractor.xcscheme +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/contrib/other-builds/mert.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/mert.xcscheme b/contrib/other-builds/mert.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/mert.xcscheme deleted file mode 100644 index 2d41b933cc..0000000000 --- a/contrib/other-builds/mert.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/mert.xcscheme +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/contrib/other-builds/mert.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/xcschememanagement.plist b/contrib/other-builds/mert.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index d55559c756..0000000000 --- a/contrib/other-builds/mert.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,32 +0,0 @@ - - - - - SchemeUserState - - extractor.xcscheme - - orderHint - 1 - - mert.xcscheme - - orderHint - 2 - - - SuppressBuildableAutocreation - - 1E1D825E15AC640800FE42E9 - - primary - - - 1EB0AF041593A2180007E2A4 - - primary - - - - - diff --git a/contrib/other-builds/mert_lib.xcodeproj/project.pbxproj b/contrib/other-builds/mert_lib.xcodeproj/project.pbxproj deleted file mode 100644 index 2729d67fab..0000000000 --- a/contrib/other-builds/mert_lib.xcodeproj/project.pbxproj +++ /dev/null @@ -1,621 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1E2CCFB915939E5D00D858D1 /* BleuScorer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF3A15939E5D00D858D1 /* BleuScorer.cpp */; }; - 1E2CCFBA15939E5D00D858D1 /* BleuScorer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF3B15939E5D00D858D1 /* BleuScorer.h */; }; - 1E2CCFBC15939E5D00D858D1 /* CderScorer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF3D15939E5D00D858D1 /* CderScorer.cpp */; }; - 1E2CCFBD15939E5D00D858D1 /* CderScorer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF3E15939E5D00D858D1 /* CderScorer.h */; }; - 1E2CCFBE15939E5D00D858D1 /* Data.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF3F15939E5D00D858D1 /* Data.cpp */; }; - 1E2CCFBF15939E5D00D858D1 /* Data.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF4015939E5D00D858D1 /* Data.h */; }; - 1E2CCFC315939E5D00D858D1 /* Fdstream.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF5115939E5D00D858D1 /* Fdstream.h */; }; - 1E2CCFC415939E5D00D858D1 /* FeatureArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF5215939E5D00D858D1 /* FeatureArray.cpp */; }; - 1E2CCFC515939E5D00D858D1 /* FeatureArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF5315939E5D00D858D1 /* FeatureArray.h */; }; - 1E2CCFC615939E5D00D858D1 /* FeatureData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF5415939E5D00D858D1 /* FeatureData.cpp */; }; - 1E2CCFC715939E5D00D858D1 /* FeatureData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF5515939E5D00D858D1 /* FeatureData.h */; }; - 1E2CCFC815939E5D00D858D1 /* FeatureDataIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF5615939E5D00D858D1 /* FeatureDataIterator.cpp */; }; - 1E2CCFC915939E5D00D858D1 /* FeatureDataIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF5715939E5D00D858D1 /* FeatureDataIterator.h */; }; - 1E2CCFCB15939E5D00D858D1 /* FeatureStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF5915939E5D00D858D1 /* FeatureStats.cpp */; }; - 1E2CCFCC15939E5D00D858D1 /* FeatureStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF5A15939E5D00D858D1 /* FeatureStats.h */; }; - 1E2CCFCD15939E5D00D858D1 /* FileStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF5B15939E5D00D858D1 /* FileStream.cpp */; }; - 1E2CCFCE15939E5D00D858D1 /* FileStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF5C15939E5D00D858D1 /* FileStream.h */; }; - 1E2CCFCF15939E5D00D858D1 /* GzFileBuf.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF5D15939E5D00D858D1 /* GzFileBuf.cpp */; }; - 1E2CCFD015939E5D00D858D1 /* GzFileBuf.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF5E15939E5D00D858D1 /* GzFileBuf.h */; }; - 1E2CCFD115939E5D00D858D1 /* HypPackEnumerator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF5F15939E5D00D858D1 /* HypPackEnumerator.cpp */; }; - 1E2CCFD215939E5D00D858D1 /* HypPackEnumerator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF6015939E5D00D858D1 /* HypPackEnumerator.h */; }; - 1E2CCFD315939E5D00D858D1 /* InterpolatedScorer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF6115939E5D00D858D1 /* InterpolatedScorer.cpp */; }; - 1E2CCFD415939E5D00D858D1 /* InterpolatedScorer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF6215939E5D00D858D1 /* InterpolatedScorer.h */; }; - 1E2CCFD715939E5D00D858D1 /* MergeScorer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF6515939E5D00D858D1 /* MergeScorer.cpp */; }; - 1E2CCFD815939E5D00D858D1 /* MergeScorer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF6615939E5D00D858D1 /* MergeScorer.h */; }; - 1E2CCFD915939E5D00D858D1 /* mert.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF6715939E5D00D858D1 /* mert.cpp */; }; - 1E2CCFDA15939E5D00D858D1 /* MiraFeatureVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF6815939E5D00D858D1 /* MiraFeatureVector.cpp */; }; - 1E2CCFDB15939E5D00D858D1 /* MiraFeatureVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF6915939E5D00D858D1 /* MiraFeatureVector.h */; }; - 1E2CCFDC15939E5D00D858D1 /* MiraWeightVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF6A15939E5D00D858D1 /* MiraWeightVector.cpp */; }; - 1E2CCFDD15939E5D00D858D1 /* MiraWeightVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF6B15939E5D00D858D1 /* MiraWeightVector.h */; }; - 1E2CCFDE15939E5D00D858D1 /* Ngram.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF6C15939E5D00D858D1 /* Ngram.h */; }; - 1E2CCFE015939E5D00D858D1 /* Optimizer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF6E15939E5D00D858D1 /* Optimizer.cpp */; }; - 1E2CCFE115939E5D00D858D1 /* Optimizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF6F15939E5D00D858D1 /* Optimizer.h */; }; - 1E2CCFE215939E5D00D858D1 /* OptimizerFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF7015939E5D00D858D1 /* OptimizerFactory.cpp */; }; - 1E2CCFE315939E5D00D858D1 /* OptimizerFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF7115939E5D00D858D1 /* OptimizerFactory.h */; }; - 1E2CCFE515939E5D00D858D1 /* PerScorer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF7315939E5D00D858D1 /* PerScorer.cpp */; }; - 1E2CCFE615939E5D00D858D1 /* PerScorer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF7415939E5D00D858D1 /* PerScorer.h */; }; - 1E2CCFE715939E5D00D858D1 /* Point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF7515939E5D00D858D1 /* Point.cpp */; }; - 1E2CCFE815939E5D00D858D1 /* Point.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF7615939E5D00D858D1 /* Point.h */; }; - 1E2CCFEA15939E5D00D858D1 /* PreProcessFilter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF7815939E5D00D858D1 /* PreProcessFilter.cpp */; }; - 1E2CCFEB15939E5D00D858D1 /* PreProcessFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF7915939E5D00D858D1 /* PreProcessFilter.h */; }; - 1E2CCFED15939E5D00D858D1 /* Reference.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF7B15939E5D00D858D1 /* Reference.h */; }; - 1E2CCFEF15939E5D00D858D1 /* ScopedVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF7D15939E5D00D858D1 /* ScopedVector.h */; }; - 1E2CCFF015939E5D00D858D1 /* ScoreArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF7E15939E5D00D858D1 /* ScoreArray.cpp */; }; - 1E2CCFF115939E5D00D858D1 /* ScoreArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF7F15939E5D00D858D1 /* ScoreArray.h */; }; - 1E2CCFF215939E5D00D858D1 /* ScoreData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF8015939E5D00D858D1 /* ScoreData.cpp */; }; - 1E2CCFF315939E5D00D858D1 /* ScoreData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF8115939E5D00D858D1 /* ScoreData.h */; }; - 1E2CCFF415939E5D00D858D1 /* ScoreDataIterator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF8215939E5D00D858D1 /* ScoreDataIterator.cpp */; }; - 1E2CCFF515939E5D00D858D1 /* ScoreDataIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF8315939E5D00D858D1 /* ScoreDataIterator.h */; }; - 1E2CCFF615939E5D00D858D1 /* Scorer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF8415939E5D00D858D1 /* Scorer.cpp */; }; - 1E2CCFF715939E5D00D858D1 /* Scorer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF8515939E5D00D858D1 /* Scorer.h */; }; - 1E2CCFF815939E5D00D858D1 /* ScorerFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF8615939E5D00D858D1 /* ScorerFactory.cpp */; }; - 1E2CCFF915939E5D00D858D1 /* ScorerFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF8715939E5D00D858D1 /* ScorerFactory.h */; }; - 1E2CCFFA15939E5D00D858D1 /* ScoreStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF8815939E5D00D858D1 /* ScoreStats.cpp */; }; - 1E2CCFFB15939E5D00D858D1 /* ScoreStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF8915939E5D00D858D1 /* ScoreStats.h */; }; - 1E2CCFFC15939E5D00D858D1 /* SemposOverlapping.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF8A15939E5D00D858D1 /* SemposOverlapping.cpp */; }; - 1E2CCFFD15939E5D00D858D1 /* SemposOverlapping.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF8B15939E5D00D858D1 /* SemposOverlapping.h */; }; - 1E2CCFFE15939E5D00D858D1 /* SemposScorer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF8C15939E5D00D858D1 /* SemposScorer.cpp */; }; - 1E2CCFFF15939E5D00D858D1 /* SemposScorer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF8D15939E5D00D858D1 /* SemposScorer.h */; }; - 1E2CD00015939E5D00D858D1 /* Singleton.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF8E15939E5D00D858D1 /* Singleton.h */; }; - 1E2CD00215939E5D00D858D1 /* alignmentStruct.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF9115939E5D00D858D1 /* alignmentStruct.cpp */; }; - 1E2CD00315939E5D00D858D1 /* alignmentStruct.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF9215939E5D00D858D1 /* alignmentStruct.h */; }; - 1E2CD00415939E5D00D858D1 /* bestShiftStruct.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF9315939E5D00D858D1 /* bestShiftStruct.h */; }; - 1E2CD00515939E5D00D858D1 /* hashMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF9415939E5D00D858D1 /* hashMap.cpp */; }; - 1E2CD00615939E5D00D858D1 /* hashMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF9515939E5D00D858D1 /* hashMap.h */; }; - 1E2CD00715939E5D00D858D1 /* hashMapInfos.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF9615939E5D00D858D1 /* hashMapInfos.cpp */; }; - 1E2CD00815939E5D00D858D1 /* hashMapInfos.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF9715939E5D00D858D1 /* hashMapInfos.h */; }; - 1E2CD00915939E5D00D858D1 /* hashMapStringInfos.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF9815939E5D00D858D1 /* hashMapStringInfos.cpp */; }; - 1E2CD00A15939E5D00D858D1 /* hashMapStringInfos.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF9915939E5D00D858D1 /* hashMapStringInfos.h */; }; - 1E2CD00B15939E5D00D858D1 /* infosHasher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF9A15939E5D00D858D1 /* infosHasher.cpp */; }; - 1E2CD00C15939E5D00D858D1 /* infosHasher.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF9B15939E5D00D858D1 /* infosHasher.h */; }; - 1E2CD00D15939E5D00D858D1 /* stringHasher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF9C15939E5D00D858D1 /* stringHasher.cpp */; }; - 1E2CD00E15939E5D00D858D1 /* stringHasher.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF9D15939E5D00D858D1 /* stringHasher.h */; }; - 1E2CD00F15939E5D00D858D1 /* stringInfosHasher.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCF9E15939E5D00D858D1 /* stringInfosHasher.cpp */; }; - 1E2CD01015939E5D00D858D1 /* stringInfosHasher.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCF9F15939E5D00D858D1 /* stringInfosHasher.h */; }; - 1E2CD01115939E5D00D858D1 /* terAlignment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCFA015939E5D00D858D1 /* terAlignment.cpp */; }; - 1E2CD01215939E5D00D858D1 /* terAlignment.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCFA115939E5D00D858D1 /* terAlignment.h */; }; - 1E2CD01315939E5D00D858D1 /* tercalc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCFA215939E5D00D858D1 /* tercalc.cpp */; }; - 1E2CD01415939E5D00D858D1 /* tercalc.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCFA315939E5D00D858D1 /* tercalc.h */; }; - 1E2CD01515939E5D00D858D1 /* terShift.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCFA415939E5D00D858D1 /* terShift.cpp */; }; - 1E2CD01615939E5D00D858D1 /* terShift.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCFA515939E5D00D858D1 /* terShift.h */; }; - 1E2CD01715939E5D00D858D1 /* tools.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCFA615939E5D00D858D1 /* tools.cpp */; }; - 1E2CD01815939E5D00D858D1 /* tools.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCFA715939E5D00D858D1 /* tools.h */; }; - 1E2CD01915939E5D00D858D1 /* TerScorer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCFA815939E5D00D858D1 /* TerScorer.cpp */; }; - 1E2CD01A15939E5D00D858D1 /* TerScorer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCFA915939E5D00D858D1 /* TerScorer.h */; }; - 1E2CD01C15939E5D00D858D1 /* Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCFAE15939E5D00D858D1 /* Timer.cpp */; }; - 1E2CD01D15939E5D00D858D1 /* Timer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCFAF15939E5D00D858D1 /* Timer.h */; }; - 1E2CD01F15939E5D00D858D1 /* Types.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCFB215939E5D00D858D1 /* Types.h */; }; - 1E2CD02015939E5D00D858D1 /* Util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCFB315939E5D00D858D1 /* Util.cpp */; }; - 1E2CD02115939E5D00D858D1 /* Util.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCFB415939E5D00D858D1 /* Util.h */; }; - 1E2CD02315939E5D00D858D1 /* Vocabulary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E2CCFB615939E5D00D858D1 /* Vocabulary.cpp */; }; - 1E2CD02415939E5D00D858D1 /* Vocabulary.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E2CCFB715939E5D00D858D1 /* Vocabulary.h */; }; - 1E39621B1594CFD1006FE978 /* PermutationScorer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E3962191594CFD1006FE978 /* PermutationScorer.cpp */; }; - 1E3962201594CFF9006FE978 /* Permutation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E39621E1594CFF9006FE978 /* Permutation.cpp */; }; - 1E3962211594CFF9006FE978 /* Permutation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E39621F1594CFF9006FE978 /* Permutation.h */; }; - 1E3962231594D0FF006FE978 /* SentenceLevelScorer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E3962221594D0FF006FE978 /* SentenceLevelScorer.cpp */; }; - 1E3962251594D12C006FE978 /* SentenceLevelScorer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E3962241594D12C006FE978 /* SentenceLevelScorer.h */; }; - 1E43CA3415973474000E29D3 /* PermutationScorer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E43CA3315973474000E29D3 /* PermutationScorer.h */; }; - 1E689F21159A529C00DD995A /* ThreadPool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E689F1F159A529C00DD995A /* ThreadPool.cpp */; }; - 1E689F22159A529C00DD995A /* ThreadPool.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E689F20159A529C00DD995A /* ThreadPool.h */; }; - 1EE52B561596B3E4006DC938 /* StatisticsBasedScorer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EE52B551596B3E4006DC938 /* StatisticsBasedScorer.h */; }; - 1EE52B591596B3FC006DC938 /* StatisticsBasedScorer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EE52B581596B3FC006DC938 /* StatisticsBasedScorer.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 1E2CCF3315939E2D00D858D1 /* libmert_lib.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libmert_lib.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 1E2CCF3A15939E5D00D858D1 /* BleuScorer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BleuScorer.cpp; path = ../../mert/BleuScorer.cpp; sourceTree = ""; }; - 1E2CCF3B15939E5D00D858D1 /* BleuScorer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BleuScorer.h; path = ../../mert/BleuScorer.h; sourceTree = ""; }; - 1E2CCF3D15939E5D00D858D1 /* CderScorer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CderScorer.cpp; path = ../../mert/CderScorer.cpp; sourceTree = ""; }; - 1E2CCF3E15939E5D00D858D1 /* CderScorer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CderScorer.h; path = ../../mert/CderScorer.h; sourceTree = ""; }; - 1E2CCF3F15939E5D00D858D1 /* Data.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Data.cpp; path = ../../mert/Data.cpp; sourceTree = ""; }; - 1E2CCF4015939E5D00D858D1 /* Data.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Data.h; path = ../../mert/Data.h; sourceTree = ""; }; - 1E2CCF5115939E5D00D858D1 /* Fdstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Fdstream.h; path = ../../mert/Fdstream.h; sourceTree = ""; }; - 1E2CCF5215939E5D00D858D1 /* FeatureArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FeatureArray.cpp; path = ../../mert/FeatureArray.cpp; sourceTree = ""; }; - 1E2CCF5315939E5D00D858D1 /* FeatureArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FeatureArray.h; path = ../../mert/FeatureArray.h; sourceTree = ""; }; - 1E2CCF5415939E5D00D858D1 /* FeatureData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FeatureData.cpp; path = ../../mert/FeatureData.cpp; sourceTree = ""; }; - 1E2CCF5515939E5D00D858D1 /* FeatureData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FeatureData.h; path = ../../mert/FeatureData.h; sourceTree = ""; }; - 1E2CCF5615939E5D00D858D1 /* FeatureDataIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FeatureDataIterator.cpp; path = ../../mert/FeatureDataIterator.cpp; sourceTree = ""; }; - 1E2CCF5715939E5D00D858D1 /* FeatureDataIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FeatureDataIterator.h; path = ../../mert/FeatureDataIterator.h; sourceTree = ""; }; - 1E2CCF5915939E5D00D858D1 /* FeatureStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FeatureStats.cpp; path = ../../mert/FeatureStats.cpp; sourceTree = ""; }; - 1E2CCF5A15939E5D00D858D1 /* FeatureStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FeatureStats.h; path = ../../mert/FeatureStats.h; sourceTree = ""; }; - 1E2CCF5B15939E5D00D858D1 /* FileStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FileStream.cpp; path = ../../mert/FileStream.cpp; sourceTree = ""; }; - 1E2CCF5C15939E5D00D858D1 /* FileStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileStream.h; path = ../../mert/FileStream.h; sourceTree = ""; }; - 1E2CCF5D15939E5D00D858D1 /* GzFileBuf.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GzFileBuf.cpp; path = ../../mert/GzFileBuf.cpp; sourceTree = ""; }; - 1E2CCF5E15939E5D00D858D1 /* GzFileBuf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GzFileBuf.h; path = ../../mert/GzFileBuf.h; sourceTree = ""; }; - 1E2CCF5F15939E5D00D858D1 /* HypPackEnumerator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HypPackEnumerator.cpp; path = ../../mert/HypPackEnumerator.cpp; sourceTree = ""; }; - 1E2CCF6015939E5D00D858D1 /* HypPackEnumerator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HypPackEnumerator.h; path = ../../mert/HypPackEnumerator.h; sourceTree = ""; }; - 1E2CCF6115939E5D00D858D1 /* InterpolatedScorer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InterpolatedScorer.cpp; path = ../../mert/InterpolatedScorer.cpp; sourceTree = ""; }; - 1E2CCF6215939E5D00D858D1 /* InterpolatedScorer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InterpolatedScorer.h; path = ../../mert/InterpolatedScorer.h; sourceTree = ""; }; - 1E2CCF6515939E5D00D858D1 /* MergeScorer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MergeScorer.cpp; path = ../../mert/MergeScorer.cpp; sourceTree = ""; }; - 1E2CCF6615939E5D00D858D1 /* MergeScorer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MergeScorer.h; path = ../../mert/MergeScorer.h; sourceTree = ""; }; - 1E2CCF6715939E5D00D858D1 /* mert.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = mert.cpp; path = ../../mert/mert.cpp; sourceTree = ""; }; - 1E2CCF6815939E5D00D858D1 /* MiraFeatureVector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MiraFeatureVector.cpp; path = ../../mert/MiraFeatureVector.cpp; sourceTree = ""; }; - 1E2CCF6915939E5D00D858D1 /* MiraFeatureVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MiraFeatureVector.h; path = ../../mert/MiraFeatureVector.h; sourceTree = ""; }; - 1E2CCF6A15939E5D00D858D1 /* MiraWeightVector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MiraWeightVector.cpp; path = ../../mert/MiraWeightVector.cpp; sourceTree = ""; }; - 1E2CCF6B15939E5D00D858D1 /* MiraWeightVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MiraWeightVector.h; path = ../../mert/MiraWeightVector.h; sourceTree = ""; }; - 1E2CCF6C15939E5D00D858D1 /* Ngram.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Ngram.h; path = ../../mert/Ngram.h; sourceTree = ""; }; - 1E2CCF6E15939E5D00D858D1 /* Optimizer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Optimizer.cpp; path = ../../mert/Optimizer.cpp; sourceTree = ""; }; - 1E2CCF6F15939E5D00D858D1 /* Optimizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Optimizer.h; path = ../../mert/Optimizer.h; sourceTree = ""; }; - 1E2CCF7015939E5D00D858D1 /* OptimizerFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = OptimizerFactory.cpp; path = ../../mert/OptimizerFactory.cpp; sourceTree = ""; }; - 1E2CCF7115939E5D00D858D1 /* OptimizerFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OptimizerFactory.h; path = ../../mert/OptimizerFactory.h; sourceTree = ""; }; - 1E2CCF7315939E5D00D858D1 /* PerScorer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PerScorer.cpp; path = ../../mert/PerScorer.cpp; sourceTree = ""; }; - 1E2CCF7415939E5D00D858D1 /* PerScorer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PerScorer.h; path = ../../mert/PerScorer.h; sourceTree = ""; }; - 1E2CCF7515939E5D00D858D1 /* Point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Point.cpp; path = ../../mert/Point.cpp; sourceTree = ""; }; - 1E2CCF7615939E5D00D858D1 /* Point.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Point.h; path = ../../mert/Point.h; sourceTree = ""; }; - 1E2CCF7815939E5D00D858D1 /* PreProcessFilter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PreProcessFilter.cpp; path = ../../mert/PreProcessFilter.cpp; sourceTree = ""; }; - 1E2CCF7915939E5D00D858D1 /* PreProcessFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PreProcessFilter.h; path = ../../mert/PreProcessFilter.h; sourceTree = ""; }; - 1E2CCF7B15939E5D00D858D1 /* Reference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Reference.h; path = ../../mert/Reference.h; sourceTree = ""; }; - 1E2CCF7D15939E5D00D858D1 /* ScopedVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScopedVector.h; path = ../../mert/ScopedVector.h; sourceTree = ""; }; - 1E2CCF7E15939E5D00D858D1 /* ScoreArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScoreArray.cpp; path = ../../mert/ScoreArray.cpp; sourceTree = ""; }; - 1E2CCF7F15939E5D00D858D1 /* ScoreArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScoreArray.h; path = ../../mert/ScoreArray.h; sourceTree = ""; }; - 1E2CCF8015939E5D00D858D1 /* ScoreData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScoreData.cpp; path = ../../mert/ScoreData.cpp; sourceTree = ""; }; - 1E2CCF8115939E5D00D858D1 /* ScoreData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScoreData.h; path = ../../mert/ScoreData.h; sourceTree = ""; }; - 1E2CCF8215939E5D00D858D1 /* ScoreDataIterator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScoreDataIterator.cpp; path = ../../mert/ScoreDataIterator.cpp; sourceTree = ""; }; - 1E2CCF8315939E5D00D858D1 /* ScoreDataIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScoreDataIterator.h; path = ../../mert/ScoreDataIterator.h; sourceTree = ""; }; - 1E2CCF8415939E5D00D858D1 /* Scorer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scorer.cpp; path = ../../mert/Scorer.cpp; sourceTree = ""; }; - 1E2CCF8515939E5D00D858D1 /* Scorer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scorer.h; path = ../../mert/Scorer.h; sourceTree = ""; }; - 1E2CCF8615939E5D00D858D1 /* ScorerFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScorerFactory.cpp; path = ../../mert/ScorerFactory.cpp; sourceTree = ""; }; - 1E2CCF8715939E5D00D858D1 /* ScorerFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScorerFactory.h; path = ../../mert/ScorerFactory.h; sourceTree = ""; }; - 1E2CCF8815939E5D00D858D1 /* ScoreStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScoreStats.cpp; path = ../../mert/ScoreStats.cpp; sourceTree = ""; }; - 1E2CCF8915939E5D00D858D1 /* ScoreStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScoreStats.h; path = ../../mert/ScoreStats.h; sourceTree = ""; }; - 1E2CCF8A15939E5D00D858D1 /* SemposOverlapping.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemposOverlapping.cpp; path = ../../mert/SemposOverlapping.cpp; sourceTree = ""; }; - 1E2CCF8B15939E5D00D858D1 /* SemposOverlapping.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemposOverlapping.h; path = ../../mert/SemposOverlapping.h; sourceTree = ""; }; - 1E2CCF8C15939E5D00D858D1 /* SemposScorer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SemposScorer.cpp; path = ../../mert/SemposScorer.cpp; sourceTree = ""; }; - 1E2CCF8D15939E5D00D858D1 /* SemposScorer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SemposScorer.h; path = ../../mert/SemposScorer.h; sourceTree = ""; }; - 1E2CCF8E15939E5D00D858D1 /* Singleton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Singleton.h; path = ../../mert/Singleton.h; sourceTree = ""; }; - 1E2CCF9115939E5D00D858D1 /* alignmentStruct.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = alignmentStruct.cpp; sourceTree = ""; }; - 1E2CCF9215939E5D00D858D1 /* alignmentStruct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = alignmentStruct.h; sourceTree = ""; }; - 1E2CCF9315939E5D00D858D1 /* bestShiftStruct.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = bestShiftStruct.h; sourceTree = ""; }; - 1E2CCF9415939E5D00D858D1 /* hashMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = hashMap.cpp; sourceTree = ""; }; - 1E2CCF9515939E5D00D858D1 /* hashMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hashMap.h; sourceTree = ""; }; - 1E2CCF9615939E5D00D858D1 /* hashMapInfos.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = hashMapInfos.cpp; sourceTree = ""; }; - 1E2CCF9715939E5D00D858D1 /* hashMapInfos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hashMapInfos.h; sourceTree = ""; }; - 1E2CCF9815939E5D00D858D1 /* hashMapStringInfos.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = hashMapStringInfos.cpp; sourceTree = ""; }; - 1E2CCF9915939E5D00D858D1 /* hashMapStringInfos.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hashMapStringInfos.h; sourceTree = ""; }; - 1E2CCF9A15939E5D00D858D1 /* infosHasher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = infosHasher.cpp; sourceTree = ""; }; - 1E2CCF9B15939E5D00D858D1 /* infosHasher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = infosHasher.h; sourceTree = ""; }; - 1E2CCF9C15939E5D00D858D1 /* stringHasher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = stringHasher.cpp; sourceTree = ""; }; - 1E2CCF9D15939E5D00D858D1 /* stringHasher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stringHasher.h; sourceTree = ""; }; - 1E2CCF9E15939E5D00D858D1 /* stringInfosHasher.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = stringInfosHasher.cpp; sourceTree = ""; }; - 1E2CCF9F15939E5D00D858D1 /* stringInfosHasher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = stringInfosHasher.h; sourceTree = ""; }; - 1E2CCFA015939E5D00D858D1 /* terAlignment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = terAlignment.cpp; sourceTree = ""; }; - 1E2CCFA115939E5D00D858D1 /* terAlignment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = terAlignment.h; sourceTree = ""; }; - 1E2CCFA215939E5D00D858D1 /* tercalc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tercalc.cpp; sourceTree = ""; }; - 1E2CCFA315939E5D00D858D1 /* tercalc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tercalc.h; sourceTree = ""; }; - 1E2CCFA415939E5D00D858D1 /* terShift.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = terShift.cpp; sourceTree = ""; }; - 1E2CCFA515939E5D00D858D1 /* terShift.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = terShift.h; sourceTree = ""; }; - 1E2CCFA615939E5D00D858D1 /* tools.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = tools.cpp; sourceTree = ""; }; - 1E2CCFA715939E5D00D858D1 /* tools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = tools.h; sourceTree = ""; }; - 1E2CCFA815939E5D00D858D1 /* TerScorer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TerScorer.cpp; path = ../../mert/TerScorer.cpp; sourceTree = ""; }; - 1E2CCFA915939E5D00D858D1 /* TerScorer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TerScorer.h; path = ../../mert/TerScorer.h; sourceTree = ""; }; - 1E2CCFAE15939E5D00D858D1 /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Timer.cpp; path = ../../mert/Timer.cpp; sourceTree = ""; }; - 1E2CCFAF15939E5D00D858D1 /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Timer.h; path = ../../mert/Timer.h; sourceTree = ""; }; - 1E2CCFB215939E5D00D858D1 /* Types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Types.h; path = ../../mert/Types.h; sourceTree = ""; }; - 1E2CCFB315939E5D00D858D1 /* Util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Util.cpp; path = ../../mert/Util.cpp; sourceTree = ""; }; - 1E2CCFB415939E5D00D858D1 /* Util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Util.h; path = ../../mert/Util.h; sourceTree = ""; }; - 1E2CCFB615939E5D00D858D1 /* Vocabulary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Vocabulary.cpp; path = ../../mert/Vocabulary.cpp; sourceTree = ""; }; - 1E2CCFB715939E5D00D858D1 /* Vocabulary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Vocabulary.h; path = ../../mert/Vocabulary.h; sourceTree = ""; }; - 1E3962191594CFD1006FE978 /* PermutationScorer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PermutationScorer.cpp; path = ../../mert/PermutationScorer.cpp; sourceTree = ""; }; - 1E39621E1594CFF9006FE978 /* Permutation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Permutation.cpp; path = ../../mert/Permutation.cpp; sourceTree = ""; }; - 1E39621F1594CFF9006FE978 /* Permutation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Permutation.h; path = ../../mert/Permutation.h; sourceTree = ""; }; - 1E3962221594D0FF006FE978 /* SentenceLevelScorer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SentenceLevelScorer.cpp; path = ../../mert/SentenceLevelScorer.cpp; sourceTree = ""; }; - 1E3962241594D12C006FE978 /* SentenceLevelScorer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentenceLevelScorer.h; path = ../../mert/SentenceLevelScorer.h; sourceTree = ""; }; - 1E43CA3315973474000E29D3 /* PermutationScorer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PermutationScorer.h; path = ../../mert/PermutationScorer.h; sourceTree = ""; }; - 1E689F1F159A529C00DD995A /* ThreadPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPool.cpp; path = ../../moses/src/ThreadPool.cpp; sourceTree = ""; }; - 1E689F20159A529C00DD995A /* ThreadPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPool.h; path = ../../moses/src/ThreadPool.h; sourceTree = ""; }; - 1EE52B551596B3E4006DC938 /* StatisticsBasedScorer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StatisticsBasedScorer.h; path = ../../mert/StatisticsBasedScorer.h; sourceTree = ""; }; - 1EE52B581596B3FC006DC938 /* StatisticsBasedScorer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StatisticsBasedScorer.cpp; path = ../../mert/StatisticsBasedScorer.cpp; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1E2CCF3015939E2D00D858D1 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1E2CCF2815939E2D00D858D1 = { - isa = PBXGroup; - children = ( - 1E689F1F159A529C00DD995A /* ThreadPool.cpp */, - 1E689F20159A529C00DD995A /* ThreadPool.h */, - 1EE52B581596B3FC006DC938 /* StatisticsBasedScorer.cpp */, - 1EE52B551596B3E4006DC938 /* StatisticsBasedScorer.h */, - 1E3962241594D12C006FE978 /* SentenceLevelScorer.h */, - 1E3962221594D0FF006FE978 /* SentenceLevelScorer.cpp */, - 1E39621E1594CFF9006FE978 /* Permutation.cpp */, - 1E39621F1594CFF9006FE978 /* Permutation.h */, - 1E3962191594CFD1006FE978 /* PermutationScorer.cpp */, - 1E43CA3315973474000E29D3 /* PermutationScorer.h */, - 1E2CCF3A15939E5D00D858D1 /* BleuScorer.cpp */, - 1E2CCF3B15939E5D00D858D1 /* BleuScorer.h */, - 1E2CCF3D15939E5D00D858D1 /* CderScorer.cpp */, - 1E2CCF3E15939E5D00D858D1 /* CderScorer.h */, - 1E2CCF3F15939E5D00D858D1 /* Data.cpp */, - 1E2CCF4015939E5D00D858D1 /* Data.h */, - 1E2CCF5115939E5D00D858D1 /* Fdstream.h */, - 1E2CCF5215939E5D00D858D1 /* FeatureArray.cpp */, - 1E2CCF5315939E5D00D858D1 /* FeatureArray.h */, - 1E2CCF5415939E5D00D858D1 /* FeatureData.cpp */, - 1E2CCF5515939E5D00D858D1 /* FeatureData.h */, - 1E2CCF5615939E5D00D858D1 /* FeatureDataIterator.cpp */, - 1E2CCF5715939E5D00D858D1 /* FeatureDataIterator.h */, - 1E2CCF5915939E5D00D858D1 /* FeatureStats.cpp */, - 1E2CCF5A15939E5D00D858D1 /* FeatureStats.h */, - 1E2CCF5B15939E5D00D858D1 /* FileStream.cpp */, - 1E2CCF5C15939E5D00D858D1 /* FileStream.h */, - 1E2CCF5D15939E5D00D858D1 /* GzFileBuf.cpp */, - 1E2CCF5E15939E5D00D858D1 /* GzFileBuf.h */, - 1E2CCF5F15939E5D00D858D1 /* HypPackEnumerator.cpp */, - 1E2CCF6015939E5D00D858D1 /* HypPackEnumerator.h */, - 1E2CCF6115939E5D00D858D1 /* InterpolatedScorer.cpp */, - 1E2CCF6215939E5D00D858D1 /* InterpolatedScorer.h */, - 1E2CCF6515939E5D00D858D1 /* MergeScorer.cpp */, - 1E2CCF6615939E5D00D858D1 /* MergeScorer.h */, - 1E2CCF6715939E5D00D858D1 /* mert.cpp */, - 1E2CCF6815939E5D00D858D1 /* MiraFeatureVector.cpp */, - 1E2CCF6915939E5D00D858D1 /* MiraFeatureVector.h */, - 1E2CCF6A15939E5D00D858D1 /* MiraWeightVector.cpp */, - 1E2CCF6B15939E5D00D858D1 /* MiraWeightVector.h */, - 1E2CCF6C15939E5D00D858D1 /* Ngram.h */, - 1E2CCF6E15939E5D00D858D1 /* Optimizer.cpp */, - 1E2CCF6F15939E5D00D858D1 /* Optimizer.h */, - 1E2CCF7015939E5D00D858D1 /* OptimizerFactory.cpp */, - 1E2CCF7115939E5D00D858D1 /* OptimizerFactory.h */, - 1E2CCF7315939E5D00D858D1 /* PerScorer.cpp */, - 1E2CCF7415939E5D00D858D1 /* PerScorer.h */, - 1E2CCF7515939E5D00D858D1 /* Point.cpp */, - 1E2CCF7615939E5D00D858D1 /* Point.h */, - 1E2CCF7815939E5D00D858D1 /* PreProcessFilter.cpp */, - 1E2CCF7915939E5D00D858D1 /* PreProcessFilter.h */, - 1E2CCF7B15939E5D00D858D1 /* Reference.h */, - 1E2CCF7D15939E5D00D858D1 /* ScopedVector.h */, - 1E2CCF7E15939E5D00D858D1 /* ScoreArray.cpp */, - 1E2CCF7F15939E5D00D858D1 /* ScoreArray.h */, - 1E2CCF8015939E5D00D858D1 /* ScoreData.cpp */, - 1E2CCF8115939E5D00D858D1 /* ScoreData.h */, - 1E2CCF8215939E5D00D858D1 /* ScoreDataIterator.cpp */, - 1E2CCF8315939E5D00D858D1 /* ScoreDataIterator.h */, - 1E2CCF8415939E5D00D858D1 /* Scorer.cpp */, - 1E2CCF8515939E5D00D858D1 /* Scorer.h */, - 1E2CCF8615939E5D00D858D1 /* ScorerFactory.cpp */, - 1E2CCF8715939E5D00D858D1 /* ScorerFactory.h */, - 1E2CCF8815939E5D00D858D1 /* ScoreStats.cpp */, - 1E2CCF8915939E5D00D858D1 /* ScoreStats.h */, - 1E2CCF8A15939E5D00D858D1 /* SemposOverlapping.cpp */, - 1E2CCF8B15939E5D00D858D1 /* SemposOverlapping.h */, - 1E2CCF8C15939E5D00D858D1 /* SemposScorer.cpp */, - 1E2CCF8D15939E5D00D858D1 /* SemposScorer.h */, - 1E2CCF8E15939E5D00D858D1 /* Singleton.h */, - 1E2CCF9015939E5D00D858D1 /* TER */, - 1E2CCFA815939E5D00D858D1 /* TerScorer.cpp */, - 1E2CCFA915939E5D00D858D1 /* TerScorer.h */, - 1E2CCFAE15939E5D00D858D1 /* Timer.cpp */, - 1E2CCFAF15939E5D00D858D1 /* Timer.h */, - 1E2CCFB215939E5D00D858D1 /* Types.h */, - 1E2CCFB315939E5D00D858D1 /* Util.cpp */, - 1E2CCFB415939E5D00D858D1 /* Util.h */, - 1E2CCFB615939E5D00D858D1 /* Vocabulary.cpp */, - 1E2CCFB715939E5D00D858D1 /* Vocabulary.h */, - 1E2CCF3415939E2D00D858D1 /* Products */, - ); - sourceTree = ""; - }; - 1E2CCF3415939E2D00D858D1 /* Products */ = { - isa = PBXGroup; - children = ( - 1E2CCF3315939E2D00D858D1 /* libmert_lib.a */, - ); - name = Products; - sourceTree = ""; - }; - 1E2CCF9015939E5D00D858D1 /* TER */ = { - isa = PBXGroup; - children = ( - 1E2CCF9115939E5D00D858D1 /* alignmentStruct.cpp */, - 1E2CCF9215939E5D00D858D1 /* alignmentStruct.h */, - 1E2CCF9315939E5D00D858D1 /* bestShiftStruct.h */, - 1E2CCF9415939E5D00D858D1 /* hashMap.cpp */, - 1E2CCF9515939E5D00D858D1 /* hashMap.h */, - 1E2CCF9615939E5D00D858D1 /* hashMapInfos.cpp */, - 1E2CCF9715939E5D00D858D1 /* hashMapInfos.h */, - 1E2CCF9815939E5D00D858D1 /* hashMapStringInfos.cpp */, - 1E2CCF9915939E5D00D858D1 /* hashMapStringInfos.h */, - 1E2CCF9A15939E5D00D858D1 /* infosHasher.cpp */, - 1E2CCF9B15939E5D00D858D1 /* infosHasher.h */, - 1E2CCF9C15939E5D00D858D1 /* stringHasher.cpp */, - 1E2CCF9D15939E5D00D858D1 /* stringHasher.h */, - 1E2CCF9E15939E5D00D858D1 /* stringInfosHasher.cpp */, - 1E2CCF9F15939E5D00D858D1 /* stringInfosHasher.h */, - 1E2CCFA015939E5D00D858D1 /* terAlignment.cpp */, - 1E2CCFA115939E5D00D858D1 /* terAlignment.h */, - 1E2CCFA215939E5D00D858D1 /* tercalc.cpp */, - 1E2CCFA315939E5D00D858D1 /* tercalc.h */, - 1E2CCFA415939E5D00D858D1 /* terShift.cpp */, - 1E2CCFA515939E5D00D858D1 /* terShift.h */, - 1E2CCFA615939E5D00D858D1 /* tools.cpp */, - 1E2CCFA715939E5D00D858D1 /* tools.h */, - ); - name = TER; - path = ../../mert/TER; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 1E2CCF3115939E2D00D858D1 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E2CCFBA15939E5D00D858D1 /* BleuScorer.h in Headers */, - 1E2CCFBD15939E5D00D858D1 /* CderScorer.h in Headers */, - 1E2CCFBF15939E5D00D858D1 /* Data.h in Headers */, - 1E2CCFC315939E5D00D858D1 /* Fdstream.h in Headers */, - 1E2CCFC515939E5D00D858D1 /* FeatureArray.h in Headers */, - 1E2CCFC715939E5D00D858D1 /* FeatureData.h in Headers */, - 1E2CCFC915939E5D00D858D1 /* FeatureDataIterator.h in Headers */, - 1E2CCFCC15939E5D00D858D1 /* FeatureStats.h in Headers */, - 1E2CCFCE15939E5D00D858D1 /* FileStream.h in Headers */, - 1E2CCFD015939E5D00D858D1 /* GzFileBuf.h in Headers */, - 1E2CCFD215939E5D00D858D1 /* HypPackEnumerator.h in Headers */, - 1E2CCFD415939E5D00D858D1 /* InterpolatedScorer.h in Headers */, - 1E2CCFD815939E5D00D858D1 /* MergeScorer.h in Headers */, - 1E2CCFDB15939E5D00D858D1 /* MiraFeatureVector.h in Headers */, - 1E2CCFDD15939E5D00D858D1 /* MiraWeightVector.h in Headers */, - 1E2CCFDE15939E5D00D858D1 /* Ngram.h in Headers */, - 1E2CCFE115939E5D00D858D1 /* Optimizer.h in Headers */, - 1E2CCFE315939E5D00D858D1 /* OptimizerFactory.h in Headers */, - 1E2CCFE615939E5D00D858D1 /* PerScorer.h in Headers */, - 1E2CCFE815939E5D00D858D1 /* Point.h in Headers */, - 1E2CCFEB15939E5D00D858D1 /* PreProcessFilter.h in Headers */, - 1E2CCFED15939E5D00D858D1 /* Reference.h in Headers */, - 1E2CCFEF15939E5D00D858D1 /* ScopedVector.h in Headers */, - 1E2CCFF115939E5D00D858D1 /* ScoreArray.h in Headers */, - 1E2CCFF315939E5D00D858D1 /* ScoreData.h in Headers */, - 1E2CCFF515939E5D00D858D1 /* ScoreDataIterator.h in Headers */, - 1E2CCFF715939E5D00D858D1 /* Scorer.h in Headers */, - 1E2CCFF915939E5D00D858D1 /* ScorerFactory.h in Headers */, - 1E2CCFFB15939E5D00D858D1 /* ScoreStats.h in Headers */, - 1E2CCFFD15939E5D00D858D1 /* SemposOverlapping.h in Headers */, - 1E2CCFFF15939E5D00D858D1 /* SemposScorer.h in Headers */, - 1E2CD00015939E5D00D858D1 /* Singleton.h in Headers */, - 1E2CD00315939E5D00D858D1 /* alignmentStruct.h in Headers */, - 1E2CD00415939E5D00D858D1 /* bestShiftStruct.h in Headers */, - 1E2CD00615939E5D00D858D1 /* hashMap.h in Headers */, - 1E2CD00815939E5D00D858D1 /* hashMapInfos.h in Headers */, - 1E2CD00A15939E5D00D858D1 /* hashMapStringInfos.h in Headers */, - 1E2CD00C15939E5D00D858D1 /* infosHasher.h in Headers */, - 1E2CD00E15939E5D00D858D1 /* stringHasher.h in Headers */, - 1E2CD01015939E5D00D858D1 /* stringInfosHasher.h in Headers */, - 1E2CD01215939E5D00D858D1 /* terAlignment.h in Headers */, - 1E2CD01415939E5D00D858D1 /* tercalc.h in Headers */, - 1E2CD01615939E5D00D858D1 /* terShift.h in Headers */, - 1E2CD01815939E5D00D858D1 /* tools.h in Headers */, - 1E2CD01A15939E5D00D858D1 /* TerScorer.h in Headers */, - 1E2CD01D15939E5D00D858D1 /* Timer.h in Headers */, - 1E2CD01F15939E5D00D858D1 /* Types.h in Headers */, - 1E2CD02115939E5D00D858D1 /* Util.h in Headers */, - 1E2CD02415939E5D00D858D1 /* Vocabulary.h in Headers */, - 1E3962211594CFF9006FE978 /* Permutation.h in Headers */, - 1E3962251594D12C006FE978 /* SentenceLevelScorer.h in Headers */, - 1EE52B561596B3E4006DC938 /* StatisticsBasedScorer.h in Headers */, - 1E43CA3415973474000E29D3 /* PermutationScorer.h in Headers */, - 1E689F22159A529C00DD995A /* ThreadPool.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 1E2CCF3215939E2D00D858D1 /* mert_lib */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1E2CCF3715939E2D00D858D1 /* Build configuration list for PBXNativeTarget "mert_lib" */; - buildPhases = ( - 1E2CCF2F15939E2D00D858D1 /* Sources */, - 1E2CCF3015939E2D00D858D1 /* Frameworks */, - 1E2CCF3115939E2D00D858D1 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = mert_lib; - productName = mert_lib; - productReference = 1E2CCF3315939E2D00D858D1 /* libmert_lib.a */; - productType = "com.apple.product-type.library.static"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 1E2CCF2A15939E2D00D858D1 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 1E2CCF2D15939E2D00D858D1 /* Build configuration list for PBXProject "mert_lib" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 1E2CCF2815939E2D00D858D1; - productRefGroup = 1E2CCF3415939E2D00D858D1 /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 1E2CCF3215939E2D00D858D1 /* mert_lib */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 1E2CCF2F15939E2D00D858D1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E2CCFB915939E5D00D858D1 /* BleuScorer.cpp in Sources */, - 1E2CCFBC15939E5D00D858D1 /* CderScorer.cpp in Sources */, - 1E2CCFBE15939E5D00D858D1 /* Data.cpp in Sources */, - 1E2CCFC415939E5D00D858D1 /* FeatureArray.cpp in Sources */, - 1E2CCFC615939E5D00D858D1 /* FeatureData.cpp in Sources */, - 1E2CCFC815939E5D00D858D1 /* FeatureDataIterator.cpp in Sources */, - 1E2CCFCB15939E5D00D858D1 /* FeatureStats.cpp in Sources */, - 1E2CCFCD15939E5D00D858D1 /* FileStream.cpp in Sources */, - 1E2CCFCF15939E5D00D858D1 /* GzFileBuf.cpp in Sources */, - 1E2CCFD115939E5D00D858D1 /* HypPackEnumerator.cpp in Sources */, - 1E2CCFD315939E5D00D858D1 /* InterpolatedScorer.cpp in Sources */, - 1E2CCFD715939E5D00D858D1 /* MergeScorer.cpp in Sources */, - 1E2CCFD915939E5D00D858D1 /* mert.cpp in Sources */, - 1E2CCFDA15939E5D00D858D1 /* MiraFeatureVector.cpp in Sources */, - 1E2CCFDC15939E5D00D858D1 /* MiraWeightVector.cpp in Sources */, - 1E2CCFE015939E5D00D858D1 /* Optimizer.cpp in Sources */, - 1E2CCFE215939E5D00D858D1 /* OptimizerFactory.cpp in Sources */, - 1E2CCFE515939E5D00D858D1 /* PerScorer.cpp in Sources */, - 1E2CCFE715939E5D00D858D1 /* Point.cpp in Sources */, - 1E2CCFEA15939E5D00D858D1 /* PreProcessFilter.cpp in Sources */, - 1E2CCFF015939E5D00D858D1 /* ScoreArray.cpp in Sources */, - 1E2CCFF215939E5D00D858D1 /* ScoreData.cpp in Sources */, - 1E2CCFF415939E5D00D858D1 /* ScoreDataIterator.cpp in Sources */, - 1E2CCFF615939E5D00D858D1 /* Scorer.cpp in Sources */, - 1E2CCFF815939E5D00D858D1 /* ScorerFactory.cpp in Sources */, - 1E2CCFFA15939E5D00D858D1 /* ScoreStats.cpp in Sources */, - 1E2CCFFC15939E5D00D858D1 /* SemposOverlapping.cpp in Sources */, - 1E2CCFFE15939E5D00D858D1 /* SemposScorer.cpp in Sources */, - 1E2CD00215939E5D00D858D1 /* alignmentStruct.cpp in Sources */, - 1E2CD00515939E5D00D858D1 /* hashMap.cpp in Sources */, - 1E2CD00715939E5D00D858D1 /* hashMapInfos.cpp in Sources */, - 1E2CD00915939E5D00D858D1 /* hashMapStringInfos.cpp in Sources */, - 1E2CD00B15939E5D00D858D1 /* infosHasher.cpp in Sources */, - 1E2CD00D15939E5D00D858D1 /* stringHasher.cpp in Sources */, - 1E2CD00F15939E5D00D858D1 /* stringInfosHasher.cpp in Sources */, - 1E2CD01115939E5D00D858D1 /* terAlignment.cpp in Sources */, - 1E2CD01315939E5D00D858D1 /* tercalc.cpp in Sources */, - 1E2CD01515939E5D00D858D1 /* terShift.cpp in Sources */, - 1E2CD01715939E5D00D858D1 /* tools.cpp in Sources */, - 1E2CD01915939E5D00D858D1 /* TerScorer.cpp in Sources */, - 1E2CD01C15939E5D00D858D1 /* Timer.cpp in Sources */, - 1E2CD02015939E5D00D858D1 /* Util.cpp in Sources */, - 1E2CD02315939E5D00D858D1 /* Vocabulary.cpp in Sources */, - 1E39621B1594CFD1006FE978 /* PermutationScorer.cpp in Sources */, - 1E3962201594CFF9006FE978 /* Permutation.cpp in Sources */, - 1E3962231594D0FF006FE978 /* SentenceLevelScorer.cpp in Sources */, - 1EE52B591596B3FC006DC938 /* StatisticsBasedScorer.cpp in Sources */, - 1E689F21159A529C00DD995A /* ThreadPool.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1E2CCF3515939E2D00D858D1 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - 1E2CCF3615939E2D00D858D1 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - }; - name = Release; - }; - 1E2CCF3815939E2D00D858D1 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - EXECUTABLE_PREFIX = lib; - "GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = ( - "DEBUG=1", - "$(inherited)", - WITH_THREADS, - ); - HEADER_SEARCH_PATHS = ( - ../.., - /opt/local/include, - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 1E2CCF3915939E2D00D858D1 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - EXECUTABLE_PREFIX = lib; - GCC_PREPROCESSOR_DEFINITIONS = WITH_THREADS; - HEADER_SEARCH_PATHS = ( - ../.., - /opt/local/include, - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1E2CCF2D15939E2D00D858D1 /* Build configuration list for PBXProject "mert_lib" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1E2CCF3515939E2D00D858D1 /* Debug */, - 1E2CCF3615939E2D00D858D1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1E2CCF3715939E2D00D858D1 /* Build configuration list for PBXNativeTarget "mert_lib" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1E2CCF3815939E2D00D858D1 /* Debug */, - 1E2CCF3915939E2D00D858D1 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 1E2CCF2A15939E2D00D858D1 /* Project object */; -} diff --git a/contrib/other-builds/mert_lib.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/mert_lib.xcscheme b/contrib/other-builds/mert_lib.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/mert_lib.xcscheme deleted file mode 100644 index 70f1edce09..0000000000 --- a/contrib/other-builds/mert_lib.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/mert_lib.xcscheme +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/contrib/other-builds/mert_lib.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/xcschememanagement.plist b/contrib/other-builds/mert_lib.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index fcf1c691d5..0000000000 --- a/contrib/other-builds/mert_lib.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - SchemeUserState - - mert_lib.xcscheme - - orderHint - 0 - - - SuppressBuildableAutocreation - - 1E2CCF3215939E2D00D858D1 - - primary - - - - - diff --git a/contrib/other-builds/mert_lib/.cproject b/contrib/other-builds/mert_lib/.cproject index e1c19b8229..a3deea5c08 100644 --- a/contrib/other-builds/mert_lib/.cproject +++ b/contrib/other-builds/mert_lib/.cproject @@ -11,7 +11,7 @@ - + @@ -19,24 +19,28 @@ - + - + - @@ -47,7 +51,7 @@ - + @@ -63,7 +67,7 @@ - + @@ -71,20 +75,20 @@ - + - - @@ -126,4 +130,5 @@ + diff --git a/contrib/other-builds/mert_lib/.project b/contrib/other-builds/mert_lib/.project index f6517ac904..5a4757a0ba 100644 --- a/contrib/other-builds/mert_lib/.project +++ b/contrib/other-builds/mert_lib/.project @@ -91,10 +91,1260 @@ 1 PARENT-3-PROJECT_LOC/mert/BleuDocScorer.h + + BleuScorer.cpp + 1 + PARENT-3-PROJECT_LOC/mert/BleuScorer.cpp + + + BleuScorer.h + 1 + PARENT-3-PROJECT_LOC/mert/BleuScorer.h + + + BleuScorerTest.cpp + 1 + PARENT-3-PROJECT_LOC/mert/BleuScorerTest.cpp + + + CderScorer.cpp + 1 + PARENT-3-PROJECT_LOC/mert/CderScorer.cpp + + + CderScorer.h + 1 + PARENT-3-PROJECT_LOC/mert/CderScorer.h + + + Data.cpp + 1 + PARENT-3-PROJECT_LOC/mert/Data.cpp + + + Data.h + 1 + PARENT-3-PROJECT_LOC/mert/Data.h + + + DataTest.cpp + 1 + PARENT-3-PROJECT_LOC/mert/DataTest.cpp + + + Fdstream.h + 1 + PARENT-3-PROJECT_LOC/mert/Fdstream.h + + + FeatureArray.cpp + 1 + PARENT-3-PROJECT_LOC/mert/FeatureArray.cpp + + + FeatureArray.h + 1 + PARENT-3-PROJECT_LOC/mert/FeatureArray.h + + + FeatureData.cpp + 1 + PARENT-3-PROJECT_LOC/mert/FeatureData.cpp + + + FeatureData.h + 1 + PARENT-3-PROJECT_LOC/mert/FeatureData.h + + + FeatureDataIterator.cpp + 1 + PARENT-3-PROJECT_LOC/mert/FeatureDataIterator.cpp + + + FeatureDataIterator.h + 1 + PARENT-3-PROJECT_LOC/mert/FeatureDataIterator.h + + + FeatureDataTest.cpp + 1 + PARENT-3-PROJECT_LOC/mert/FeatureDataTest.cpp + + + FeatureStats.cpp + 1 + PARENT-3-PROJECT_LOC/mert/FeatureStats.cpp + + + FeatureStats.h + 1 + PARENT-3-PROJECT_LOC/mert/FeatureStats.h + + + FileStream.cpp + 1 + PARENT-3-PROJECT_LOC/mert/FileStream.cpp + + + FileStream.h + 1 + PARENT-3-PROJECT_LOC/mert/FileStream.h + + + GzFileBuf.cpp + 1 + PARENT-3-PROJECT_LOC/mert/GzFileBuf.cpp + + + GzFileBuf.h + 1 + PARENT-3-PROJECT_LOC/mert/GzFileBuf.h + + + HwcmScorer.cpp + 1 + PARENT-3-PROJECT_LOC/mert/HwcmScorer.cpp + + + HwcmScorer.h + 1 + PARENT-3-PROJECT_LOC/mert/HwcmScorer.h + + + HypPackEnumerator.cpp + 1 + PARENT-3-PROJECT_LOC/mert/HypPackEnumerator.cpp + + + HypPackEnumerator.h + 1 + PARENT-3-PROJECT_LOC/mert/HypPackEnumerator.h + + + InternalTree.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/InternalTree.cpp + + + InternalTree.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/InternalTree.h + + + InterpolatedScorer.cpp + 1 + PARENT-3-PROJECT_LOC/mert/InterpolatedScorer.cpp + + + InterpolatedScorer.h + 1 + PARENT-3-PROJECT_LOC/mert/InterpolatedScorer.h + + + Jamfile + 1 + PARENT-3-PROJECT_LOC/mert/Jamfile + + + M2.cpp + 1 + PARENT-3-PROJECT_LOC/mert/M2.cpp + + + M2.h + 1 + PARENT-3-PROJECT_LOC/mert/M2.h + + + M2Scorer.cpp + 1 + PARENT-3-PROJECT_LOC/mert/M2Scorer.cpp + + + M2Scorer.h + 1 + PARENT-3-PROJECT_LOC/mert/M2Scorer.h + + + MeteorScorer.cpp + 1 + PARENT-3-PROJECT_LOC/mert/MeteorScorer.cpp + + + MeteorScorer.h + 1 + PARENT-3-PROJECT_LOC/mert/MeteorScorer.h + + + MiraFeatureVector.cpp + 1 + PARENT-3-PROJECT_LOC/mert/MiraFeatureVector.cpp + + + MiraFeatureVector.h + 1 + PARENT-3-PROJECT_LOC/mert/MiraFeatureVector.h + + + MiraWeightVector.cpp + 1 + PARENT-3-PROJECT_LOC/mert/MiraWeightVector.cpp + + + MiraWeightVector.h + 1 + PARENT-3-PROJECT_LOC/mert/MiraWeightVector.h + + + Ngram.h + 1 + PARENT-3-PROJECT_LOC/mert/Ngram.h + + + NgramTest.cpp + 1 + PARENT-3-PROJECT_LOC/mert/NgramTest.cpp + + + Optimizer.cpp + 1 + PARENT-3-PROJECT_LOC/mert/Optimizer.cpp + + + Optimizer.h + 1 + PARENT-3-PROJECT_LOC/mert/Optimizer.h + + + OptimizerFactory.cpp + 1 + PARENT-3-PROJECT_LOC/mert/OptimizerFactory.cpp + + + OptimizerFactory.h + 1 + PARENT-3-PROJECT_LOC/mert/OptimizerFactory.h + + + OptimizerFactoryTest.cpp + 1 + PARENT-3-PROJECT_LOC/mert/OptimizerFactoryTest.cpp + + + PerScorer.cpp + 1 + PARENT-3-PROJECT_LOC/mert/PerScorer.cpp + + + PerScorer.h + 1 + PARENT-3-PROJECT_LOC/mert/PerScorer.h + + + Permutation.cpp + 1 + PARENT-3-PROJECT_LOC/mert/Permutation.cpp + + + Permutation.h + 1 + PARENT-3-PROJECT_LOC/mert/Permutation.h + + + PermutationScorer.cpp + 1 + PARENT-3-PROJECT_LOC/mert/PermutationScorer.cpp + + + PermutationScorer.h + 1 + PARENT-3-PROJECT_LOC/mert/PermutationScorer.h + + + Point.cpp + 1 + PARENT-3-PROJECT_LOC/mert/Point.cpp + + + Point.h + 1 + PARENT-3-PROJECT_LOC/mert/Point.h + + + PointTest.cpp + 1 + PARENT-3-PROJECT_LOC/mert/PointTest.cpp + + + PreProcessFilter.cpp + 1 + PARENT-3-PROJECT_LOC/mert/PreProcessFilter.cpp + + + PreProcessFilter.h + 1 + PARENT-3-PROJECT_LOC/mert/PreProcessFilter.h + + + Reference.h + 1 + PARENT-3-PROJECT_LOC/mert/Reference.h + + + ReferenceTest.cpp + 1 + PARENT-3-PROJECT_LOC/mert/ReferenceTest.cpp + + + ScopedVector.h + 1 + PARENT-3-PROJECT_LOC/mert/ScopedVector.h + + + ScoreArray.cpp + 1 + PARENT-3-PROJECT_LOC/mert/ScoreArray.cpp + + + ScoreArray.h + 1 + PARENT-3-PROJECT_LOC/mert/ScoreArray.h + + + ScoreData.cpp + 1 + PARENT-3-PROJECT_LOC/mert/ScoreData.cpp + + + ScoreData.h + 1 + PARENT-3-PROJECT_LOC/mert/ScoreData.h + + + ScoreDataIterator.cpp + 1 + PARENT-3-PROJECT_LOC/mert/ScoreDataIterator.cpp + + + ScoreDataIterator.h + 1 + PARENT-3-PROJECT_LOC/mert/ScoreDataIterator.h + + + ScoreStats.cpp + 1 + PARENT-3-PROJECT_LOC/mert/ScoreStats.cpp + + + ScoreStats.h + 1 + PARENT-3-PROJECT_LOC/mert/ScoreStats.h + + + Scorer.cpp + 1 + PARENT-3-PROJECT_LOC/mert/Scorer.cpp + + + Scorer.h + 1 + PARENT-3-PROJECT_LOC/mert/Scorer.h + + + ScorerFactory.cpp + 1 + PARENT-3-PROJECT_LOC/mert/ScorerFactory.cpp + + + ScorerFactory.h + 1 + PARENT-3-PROJECT_LOC/mert/ScorerFactory.h + + + SemposOverlapping.cpp + 1 + PARENT-3-PROJECT_LOC/mert/SemposOverlapping.cpp + + + SemposOverlapping.h + 1 + PARENT-3-PROJECT_LOC/mert/SemposOverlapping.h + + + SemposScorer.cpp + 1 + PARENT-3-PROJECT_LOC/mert/SemposScorer.cpp + + + SemposScorer.h + 1 + PARENT-3-PROJECT_LOC/mert/SemposScorer.h + + + SentenceLevelScorer.cpp + 1 + PARENT-3-PROJECT_LOC/mert/SentenceLevelScorer.cpp + + + SentenceLevelScorer.h + 1 + PARENT-3-PROJECT_LOC/mert/SentenceLevelScorer.h + + + Singleton.h + 1 + PARENT-3-PROJECT_LOC/mert/Singleton.h + + + SingletonTest.cpp + 1 + PARENT-3-PROJECT_LOC/mert/SingletonTest.cpp + + + StatisticsBasedScorer.cpp + 1 + PARENT-3-PROJECT_LOC/mert/StatisticsBasedScorer.cpp + + + StatisticsBasedScorer.h + 1 + PARENT-3-PROJECT_LOC/mert/StatisticsBasedScorer.h + + + TER + 2 + virtual:/virtual + + + TODO + 1 + PARENT-3-PROJECT_LOC/mert/TODO + + + TerScorer.cpp + 1 + PARENT-3-PROJECT_LOC/mert/TerScorer.cpp + + + TerScorer.h + 1 + PARENT-3-PROJECT_LOC/mert/TerScorer.h + + + Timer.cpp + 1 + PARENT-3-PROJECT_LOC/mert/Timer.cpp + + + Timer.h + 1 + PARENT-3-PROJECT_LOC/mert/Timer.h + + + TimerTest.cpp + 1 + PARENT-3-PROJECT_LOC/mert/TimerTest.cpp + + + Types.h + 1 + PARENT-3-PROJECT_LOC/mert/Types.h + + + Util.cpp + 1 + PARENT-3-PROJECT_LOC/mert/Util.cpp + + + Util.h + 1 + PARENT-3-PROJECT_LOC/mert/Util.h + + + UtilTest.cpp + 1 + PARENT-3-PROJECT_LOC/mert/UtilTest.cpp + + + Vocabulary.cpp + 1 + PARENT-3-PROJECT_LOC/mert/Vocabulary.cpp + + + Vocabulary.h + 1 + PARENT-3-PROJECT_LOC/mert/Vocabulary.h + + + VocabularyTest.cpp + 1 + PARENT-3-PROJECT_LOC/mert/VocabularyTest.cpp + + + bin + 2 + virtual:/virtual + + + evaluator + 1 + PARENT-3-PROJECT_LOC/mert/evaluator + + + evaluator.cpp + 1 + PARENT-3-PROJECT_LOC/mert/evaluator.cpp + + + example + 2 + virtual:/virtual + + + extractor + 1 + PARENT-3-PROJECT_LOC/mert/extractor + + + extractor.cpp + 1 + PARENT-3-PROJECT_LOC/mert/extractor.cpp + + + kbmira + 1 + PARENT-3-PROJECT_LOC/mert/kbmira + + + kbmira.cpp + 1 + PARENT-3-PROJECT_LOC/mert/kbmira.cpp + mert + 1 + PARENT-3-PROJECT_LOC/mert/mert + + + mert.cpp + 1 + PARENT-3-PROJECT_LOC/mert/mert.cpp + + + pro + 1 + PARENT-3-PROJECT_LOC/mert/pro + + + pro.cpp + 1 + PARENT-3-PROJECT_LOC/mert/pro.cpp + + + sentence-bleu + 1 + PARENT-3-PROJECT_LOC/mert/sentence-bleu + + + sentence-bleu.cpp + 1 + PARENT-3-PROJECT_LOC/mert/sentence-bleu.cpp + + + test_scorer_data + 2 + virtual:/virtual + + + TER/alignmentStruct.cpp + 1 + PARENT-3-PROJECT_LOC/mert/TER/alignmentStruct.cpp + + + TER/alignmentStruct.h + 1 + PARENT-3-PROJECT_LOC/mert/TER/alignmentStruct.h + + + TER/bestShiftStruct.cpp + 1 + PARENT-3-PROJECT_LOC/mert/TER/bestShiftStruct.cpp + + + TER/bestShiftStruct.h + 1 + PARENT-3-PROJECT_LOC/mert/TER/bestShiftStruct.h + + + TER/hashMap.cpp + 1 + PARENT-3-PROJECT_LOC/mert/TER/hashMap.cpp + + + TER/hashMap.h + 1 + PARENT-3-PROJECT_LOC/mert/TER/hashMap.h + + + TER/hashMapInfos.cpp + 1 + PARENT-3-PROJECT_LOC/mert/TER/hashMapInfos.cpp + + + TER/hashMapInfos.h + 1 + PARENT-3-PROJECT_LOC/mert/TER/hashMapInfos.h + + + TER/hashMapStringInfos.cpp + 1 + PARENT-3-PROJECT_LOC/mert/TER/hashMapStringInfos.cpp + + + TER/hashMapStringInfos.h + 1 + PARENT-3-PROJECT_LOC/mert/TER/hashMapStringInfos.h + + + TER/infosHasher.cpp + 1 + PARENT-3-PROJECT_LOC/mert/TER/infosHasher.cpp + + + TER/infosHasher.h + 1 + PARENT-3-PROJECT_LOC/mert/TER/infosHasher.h + + + TER/stringHasher.cpp + 1 + PARENT-3-PROJECT_LOC/mert/TER/stringHasher.cpp + + + TER/stringHasher.h + 1 + PARENT-3-PROJECT_LOC/mert/TER/stringHasher.h + + + TER/stringInfosHasher.cpp + 1 + PARENT-3-PROJECT_LOC/mert/TER/stringInfosHasher.cpp + + + TER/stringInfosHasher.h + 1 + PARENT-3-PROJECT_LOC/mert/TER/stringInfosHasher.h + + + TER/terAlignment.cpp + 1 + PARENT-3-PROJECT_LOC/mert/TER/terAlignment.cpp + + + TER/terAlignment.h + 1 + PARENT-3-PROJECT_LOC/mert/TER/terAlignment.h + + + TER/terShift.cpp + 1 + PARENT-3-PROJECT_LOC/mert/TER/terShift.cpp + + + TER/terShift.h + 1 + PARENT-3-PROJECT_LOC/mert/TER/terShift.h + + + TER/tercalc.cpp + 1 + PARENT-3-PROJECT_LOC/mert/TER/tercalc.cpp + + + TER/tercalc.h + 1 + PARENT-3-PROJECT_LOC/mert/TER/tercalc.h + + + TER/tools.cpp + 1 + PARENT-3-PROJECT_LOC/mert/TER/tools.cpp + + + TER/tools.h + 1 + PARENT-3-PROJECT_LOC/mert/TER/tools.h + + + bin/gcc-4.8 + 2 + virtual:/virtual + + + example/NBEST + 1 + PARENT-3-PROJECT_LOC/mert/example/NBEST + + + example/README.oldmert + 1 + PARENT-3-PROJECT_LOC/mert/example/README.oldmert + + + example/REF + 1 + PARENT-3-PROJECT_LOC/mert/example/REF + + + example/REF.0 + 1 + PARENT-3-PROJECT_LOC/mert/example/REF.0 + + + example/REF.1 + 1 + PARENT-3-PROJECT_LOC/mert/example/REF.1 + + + example/REF.2 + 1 + PARENT-3-PROJECT_LOC/mert/example/REF.2 + + + example/gzipped_test.sh + 1 + PARENT-3-PROJECT_LOC/mert/example/gzipped_test.sh + + + example/init.opt + 1 + PARENT-3-PROJECT_LOC/mert/example/init.opt + + + example/memcheck_extractor.sh + 1 + PARENT-3-PROJECT_LOC/mert/example/memcheck_extractor.sh + + + example/memcheck_mert.sh + 1 + PARENT-3-PROJECT_LOC/mert/example/memcheck_mert.sh + + + example/normal_test.sh + 1 + PARENT-3-PROJECT_LOC/mert/example/normal_test.sh + + + example/smoke_test.sh + 1 + PARENT-3-PROJECT_LOC/mert/example/smoke_test.sh + + + test_scorer_data/nbest.out + 1 + PARENT-3-PROJECT_LOC/mert/test_scorer_data/nbest.out + + + test_scorer_data/reference.txt + 1 + PARENT-3-PROJECT_LOC/mert/test_scorer_data/reference.txt + + + bin/gcc-4.8/release + 2 + virtual:/virtual + + + bin/gcc-4.8/release/debug-symbols-on + 2 + virtual:/virtual + + + bin/gcc-4.8/release/debug-symbols-on/link-static + 2 + virtual:/virtual + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BleuDocScorer.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BleuDocScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BleuScorer.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BleuScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BleuScorerTest.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BleuScorerTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/CderScorer.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/CderScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Data.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Data.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/DataTest.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/DataTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureArray.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureArray.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureData.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureData.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureDataIterator.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureDataIterator.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureDataTest.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureDataTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureStats.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureStats.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FileStream.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FileStream.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/GzFileBuf.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/GzFileBuf.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/HypPackEnumerator.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/HypPackEnumerator.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/InterpolatedScorer.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/InterpolatedScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MeteorScorer.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MeteorScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MiraFeatureVector.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MiraFeatureVector.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MiraWeightVector.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MiraWeightVector.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/NgramTest.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/NgramTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Optimizer.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Optimizer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/OptimizerFactory.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/OptimizerFactory.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/OptimizerFactoryTest.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/OptimizerFactoryTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PerScorer.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PerScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Permutation.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Permutation.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PermutationScorer.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PermutationScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Point.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Point.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PointTest.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PointTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PreProcessFilter.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PreProcessFilter.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ReferenceTest.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ReferenceTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreArray.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreArray.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreData.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreData.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreDataIterator.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreDataIterator.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreStats.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreStats.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Scorer.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Scorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScorerFactory.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScorerFactory.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SemposOverlapping.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SemposOverlapping.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SemposScorer.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SemposScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SentenceLevelScorer.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SentenceLevelScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SingletonTest.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SingletonTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/StatisticsBasedScorer.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/StatisticsBasedScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER 2 - PARENT-3-PROJECT_LOC/mert + virtual:/virtual + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TerScorer.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TerScorer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ThreadPool.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ThreadPool.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Timer.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Timer.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TimerTest.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TimerTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Util.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Util.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/UtilTest.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/UtilTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Vocabulary.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Vocabulary.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/VocabularyTest.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/VocabularyTest.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/bleu_scorer_test + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/bleu_scorer_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/bleu_scorer_test.passed + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/bleu_scorer_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/data_test + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/data_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/data_test.passed + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/data_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/evaluator + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/evaluator + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/evaluator.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/evaluator.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/extractor + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/extractor + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/extractor.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/extractor.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/feature_data_test + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/feature_data_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/feature_data_test.passed + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/feature_data_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/kbmira + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/kbmira + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/kbmira.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/kbmira.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/libmert_lib.a + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/libmert_lib.a + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/mert + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/mert + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/mert.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/mert.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ngram_test + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ngram_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ngram_test.passed + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ngram_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/optimizer_factory_test + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/optimizer_factory_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/optimizer_factory_test.passed + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/optimizer_factory_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/point_test + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/point_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/point_test.passed + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/point_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/pro + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/pro + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/pro.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/pro.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/reference_test + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/reference_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/reference_test.passed + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/reference_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/sentence-bleu + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/sentence-bleu + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/sentence-bleu.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/sentence-bleu.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/singleton_test + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/singleton_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/singleton_test.passed + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/singleton_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/timer_test + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/timer_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/timer_test.passed + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/timer_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/util_test + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/util_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/util_test.passed + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/util_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/vocabulary_test + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/vocabulary_test + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/vocabulary_test.passed + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/vocabulary_test.passed + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/alignmentStruct.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/alignmentStruct.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/hashMap.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/hashMap.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/hashMapInfos.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/hashMapInfos.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/hashMapStringInfos.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/hashMapStringInfos.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/infosHasher.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/infosHasher.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/stringHasher.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/stringHasher.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/stringInfosHasher.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/stringInfosHasher.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/terAlignment.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/terAlignment.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/terShift.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/terShift.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/tercalc.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/tercalc.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/tools.o + 1 + /home/hieu/workspace/github/mosesdecoder/mert/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TER/tools.o diff --git a/contrib/other-builds/moses-chart-cmd.vcxproj b/contrib/other-builds/moses-chart-cmd.vcxproj deleted file mode 100644 index 25fe745886..0000000000 --- a/contrib/other-builds/moses-chart-cmd.vcxproj +++ /dev/null @@ -1,115 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {C3AF5C05-D4EC-41D2-8319-D1E69B9B5820} - moseschartcmd - Win32Proj - - - - Application - Unicode - true - - - Application - Unicode - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - true - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - false - - - - Disabled - C:\Program Files\boost\boost_1_47;$(SolutionDir)/moses/src;$(SolutionDir)/kenlm;$(SolutionDir);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;LM_INTERNAL;TRACE_ENABLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - - - zdll.lib;$(SolutionDir)$(Configuration)\moses.lib;$(SolutionDir)$(Configuration)\kenlm.lib;%(AdditionalDependencies) - true - Console - false - - - MachineX86 - - - - - C:\Program Files\boost\boost_1_47;$(SolutionDir)/moses/src;$(SolutionDir)/kenlm;$(SolutionDir);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;LM_INTERNAL;TRACE_ENABLE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - - - zdll.lib;$(SolutionDir)$(Configuration)\moses.lib;$(SolutionDir)$(Configuration)\kenlm.lib;%(AdditionalDependencies) - true - Console - true - true - false - - - MachineX86 - - - - - - - - - - - - - - - {8122157a-0de5-44ff-8e5b-024ed6ace7af} - false - - - {8b07671b-cbaf-4514-affd-ce238cd427e9} - false - - - - - - \ No newline at end of file diff --git a/contrib/other-builds/moses-chart-cmd.xcodeproj/project.pbxproj b/contrib/other-builds/moses-chart-cmd.xcodeproj/project.pbxproj deleted file mode 100644 index cc0f3caf7f..0000000000 --- a/contrib/other-builds/moses-chart-cmd.xcodeproj/project.pbxproj +++ /dev/null @@ -1,486 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 1EAF9DC614B9F8CD005E8EBD /* liblm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EAF9DC314B9F8BA005E8EBD /* liblm.a */; }; - 1EAF9DC714B9F8CD005E8EBD /* libmoses.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EAF9DAD14B9F8AD005E8EBD /* libmoses.a */; }; - 1EAF9DC814B9F8CD005E8EBD /* libOnDiskPt.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EAF9DB614B9F8B1005E8EBD /* libOnDiskPt.a */; }; - 1EBC53E7164C4B1400ADFA2C /* libsearch.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EBC53BD164C4AC300ADFA2C /* libsearch.a */; }; - 1EF0719F14B9F1D40052152A /* IOWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EF0718A14B9F1D40052152A /* IOWrapper.cpp */; }; - 1EF071A214B9F1D40052152A /* Main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EF0718E14B9F1D40052152A /* Main.cpp */; }; - 1EF071A414B9F1D40052152A /* mbr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EF0719114B9F1D40052152A /* mbr.cpp */; }; - 1EF071A614B9F1D40052152A /* TranslationAnalysis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EF0719414B9F1D40052152A /* TranslationAnalysis.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1EAF9DAC14B9F8AD005E8EBD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EAF9DA514B9F8AD005E8EBD /* moses.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC046055464E500DB518D; - remoteInfo = moses; - }; - 1EAF9DB514B9F8B1005E8EBD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EAF9DAE14B9F8B1005E8EBD /* OnDiskPt.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC046055464E500DB518D; - remoteInfo = OnDiskPt; - }; - 1EAF9DC214B9F8BA005E8EBD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EAF9DB714B9F8B9005E8EBD /* lm.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1EE8C2E91476A48E002496F2; - remoteInfo = lm; - }; - 1EAF9DCB14B9F8D6005E8EBD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EAF9DAE14B9F8B1005E8EBD /* OnDiskPt.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC045055464E500DB518D; - remoteInfo = OnDiskPt; - }; - 1EAF9DCD14B9F8D6005E8EBD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EAF9DA514B9F8AD005E8EBD /* moses.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC045055464E500DB518D; - remoteInfo = moses; - }; - 1EAF9DCF14B9F8D6005E8EBD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EAF9DB714B9F8B9005E8EBD /* lm.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 1EE8C2E81476A48E002496F2; - remoteInfo = lm; - }; - 1EBC53BC164C4AC300ADFA2C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EBC53B5164C4AC300ADFA2C /* search.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1EBC53AE164C4A6200ADFA2C; - remoteInfo = search; - }; - 1EBC53E5164C4AFC00ADFA2C /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EBC53B5164C4AC300ADFA2C /* search.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 1EBC53AD164C4A6200ADFA2C; - remoteInfo = search; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 8DD76F690486A84900D96B5E /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 8; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1EAF9DA514B9F8AD005E8EBD /* moses.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = moses.xcodeproj; sourceTree = ""; }; - 1EAF9DAE14B9F8B1005E8EBD /* OnDiskPt.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = OnDiskPt.xcodeproj; sourceTree = ""; }; - 1EAF9DB714B9F8B9005E8EBD /* lm.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = lm.xcodeproj; sourceTree = ""; }; - 1EBC53B5164C4AC300ADFA2C /* search.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = search.xcodeproj; sourceTree = ""; }; - 1EF0718A14B9F1D40052152A /* IOWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IOWrapper.cpp; path = "../../moses-chart-cmd/src/IOWrapper.cpp"; sourceTree = ""; }; - 1EF0718B14B9F1D40052152A /* IOWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IOWrapper.h; path = "../../moses-chart-cmd/src/IOWrapper.h"; sourceTree = ""; }; - 1EF0718E14B9F1D40052152A /* Main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = "../../moses-chart-cmd/src/Main.cpp"; sourceTree = ""; }; - 1EF0718F14B9F1D40052152A /* Main.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Main.h; path = "../../moses-chart-cmd/src/Main.h"; sourceTree = ""; }; - 1EF0719114B9F1D40052152A /* mbr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = mbr.cpp; path = "../../moses-chart-cmd/src/mbr.cpp"; sourceTree = ""; }; - 1EF0719214B9F1D40052152A /* mbr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mbr.h; path = "../../moses-chart-cmd/src/mbr.h"; sourceTree = ""; }; - 1EF0719414B9F1D40052152A /* TranslationAnalysis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TranslationAnalysis.cpp; path = "../../moses-chart-cmd/src/TranslationAnalysis.cpp"; sourceTree = ""; }; - 1EF0719514B9F1D40052152A /* TranslationAnalysis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TranslationAnalysis.h; path = "../../moses-chart-cmd/src/TranslationAnalysis.h"; sourceTree = ""; }; - 8DD76F6C0486A84900D96B5E /* moses-chart-cmd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "moses-chart-cmd"; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8DD76F660486A84900D96B5E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EBC53E7164C4B1400ADFA2C /* libsearch.a in Frameworks */, - 1EAF9DC614B9F8CD005E8EBD /* liblm.a in Frameworks */, - 1EAF9DC714B9F8CD005E8EBD /* libmoses.a in Frameworks */, - 1EAF9DC814B9F8CD005E8EBD /* libOnDiskPt.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 08FB7794FE84155DC02AAC07 /* moses-chart-cmd */ = { - isa = PBXGroup; - children = ( - 08FB7795FE84155DC02AAC07 /* Source */, - C6859E8C029090F304C91782 /* Documentation */, - 1AB674ADFE9D54B511CA2CBB /* Products */, - 1EAF9DB714B9F8B9005E8EBD /* lm.xcodeproj */, - 1EAF9DA514B9F8AD005E8EBD /* moses.xcodeproj */, - 1EAF9DAE14B9F8B1005E8EBD /* OnDiskPt.xcodeproj */, - 1EBC53B5164C4AC300ADFA2C /* search.xcodeproj */, - ); - name = "moses-chart-cmd"; - sourceTree = ""; - }; - 08FB7795FE84155DC02AAC07 /* Source */ = { - isa = PBXGroup; - children = ( - 1EF0718A14B9F1D40052152A /* IOWrapper.cpp */, - 1EF0718B14B9F1D40052152A /* IOWrapper.h */, - 1EF0718E14B9F1D40052152A /* Main.cpp */, - 1EF0718F14B9F1D40052152A /* Main.h */, - 1EF0719114B9F1D40052152A /* mbr.cpp */, - 1EF0719214B9F1D40052152A /* mbr.h */, - 1EF0719414B9F1D40052152A /* TranslationAnalysis.cpp */, - 1EF0719514B9F1D40052152A /* TranslationAnalysis.h */, - ); - name = Source; - sourceTree = ""; - }; - 1AB674ADFE9D54B511CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8DD76F6C0486A84900D96B5E /* moses-chart-cmd */, - ); - name = Products; - sourceTree = ""; - }; - 1EAF9DA614B9F8AD005E8EBD /* Products */ = { - isa = PBXGroup; - children = ( - 1EAF9DAD14B9F8AD005E8EBD /* libmoses.a */, - ); - name = Products; - sourceTree = ""; - }; - 1EAF9DAF14B9F8B1005E8EBD /* Products */ = { - isa = PBXGroup; - children = ( - 1EAF9DB614B9F8B1005E8EBD /* libOnDiskPt.a */, - ); - name = Products; - sourceTree = ""; - }; - 1EAF9DB814B9F8B9005E8EBD /* Products */ = { - isa = PBXGroup; - children = ( - 1EAF9DC314B9F8BA005E8EBD /* liblm.a */, - ); - name = Products; - sourceTree = ""; - }; - 1EBC53B6164C4AC300ADFA2C /* Products */ = { - isa = PBXGroup; - children = ( - 1EBC53BD164C4AC300ADFA2C /* libsearch.a */, - ); - name = Products; - sourceTree = ""; - }; - C6859E8C029090F304C91782 /* Documentation */ = { - isa = PBXGroup; - children = ( - ); - name = Documentation; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8DD76F620486A84900D96B5E /* moses-chart-cmd */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "moses-chart-cmd" */; - buildPhases = ( - 8DD76F640486A84900D96B5E /* Sources */, - 8DD76F660486A84900D96B5E /* Frameworks */, - 8DD76F690486A84900D96B5E /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - 1EBC53E6164C4AFC00ADFA2C /* PBXTargetDependency */, - 1EAF9DCC14B9F8D6005E8EBD /* PBXTargetDependency */, - 1EAF9DCE14B9F8D6005E8EBD /* PBXTargetDependency */, - 1EAF9DD014B9F8D6005E8EBD /* PBXTargetDependency */, - ); - name = "moses-chart-cmd"; - productInstallPath = "$(HOME)/bin"; - productName = "moses-chart-cmd"; - productReference = 8DD76F6C0486A84900D96B5E /* moses-chart-cmd */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "moses-chart-cmd" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 08FB7794FE84155DC02AAC07 /* moses-chart-cmd */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 1EAF9DB814B9F8B9005E8EBD /* Products */; - ProjectRef = 1EAF9DB714B9F8B9005E8EBD /* lm.xcodeproj */; - }, - { - ProductGroup = 1EAF9DA614B9F8AD005E8EBD /* Products */; - ProjectRef = 1EAF9DA514B9F8AD005E8EBD /* moses.xcodeproj */; - }, - { - ProductGroup = 1EAF9DAF14B9F8B1005E8EBD /* Products */; - ProjectRef = 1EAF9DAE14B9F8B1005E8EBD /* OnDiskPt.xcodeproj */; - }, - { - ProductGroup = 1EBC53B6164C4AC300ADFA2C /* Products */; - ProjectRef = 1EBC53B5164C4AC300ADFA2C /* search.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 8DD76F620486A84900D96B5E /* moses-chart-cmd */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 1EAF9DAD14B9F8AD005E8EBD /* libmoses.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libmoses.a; - remoteRef = 1EAF9DAC14B9F8AD005E8EBD /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1EAF9DB614B9F8B1005E8EBD /* libOnDiskPt.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libOnDiskPt.a; - remoteRef = 1EAF9DB514B9F8B1005E8EBD /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1EAF9DC314B9F8BA005E8EBD /* liblm.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = liblm.a; - remoteRef = 1EAF9DC214B9F8BA005E8EBD /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1EBC53BD164C4AC300ADFA2C /* libsearch.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libsearch.a; - remoteRef = 1EBC53BC164C4AC300ADFA2C /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXSourcesBuildPhase section */ - 8DD76F640486A84900D96B5E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EF0719F14B9F1D40052152A /* IOWrapper.cpp in Sources */, - 1EF071A214B9F1D40052152A /* Main.cpp in Sources */, - 1EF071A414B9F1D40052152A /* mbr.cpp in Sources */, - 1EF071A614B9F1D40052152A /* TranslationAnalysis.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 1EAF9DCC14B9F8D6005E8EBD /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = OnDiskPt; - targetProxy = 1EAF9DCB14B9F8D6005E8EBD /* PBXContainerItemProxy */; - }; - 1EAF9DCE14B9F8D6005E8EBD /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = moses; - targetProxy = 1EAF9DCD14B9F8D6005E8EBD /* PBXContainerItemProxy */; - }; - 1EAF9DD014B9F8D6005E8EBD /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = lm; - targetProxy = 1EAF9DCF14B9F8D6005E8EBD /* PBXContainerItemProxy */; - }; - 1EBC53E6164C4AFC00ADFA2C /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = search; - targetProxy = 1EBC53E5164C4AFC00ADFA2C /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1DEB923208733DC60010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - TRACE_ENABLE, - _LARGE_FILES, - "_FILE_OFFSET_BITS=64", - "MAX_NUM_FACTORS=4", - ); - HEADER_SEARCH_PATHS = /opt/local/include; - INSTALL_PATH = /usr/local/bin; - LIBRARY_SEARCH_PATHS = ( - ../../irstlm/lib, - ../../srilm/lib/macosx, - /opt/local/lib, - ../../cmph/lib, - ); - OTHER_LDFLAGS = ( - "-lz", - "-lirstlm", - "-lmisc", - "-ldstruct", - "-loolm", - "-lflm", - "-llattice", - "-lboost_thread-mt", - "-lboost_filesystem-mt", - "-lboost_system-mt", - "-lcmph", - ); - PRODUCT_NAME = "moses-chart-cmd"; - SDKROOT = ""; - USER_HEADER_SEARCH_PATHS = "../../ ../../moses/src"; - }; - name = Debug; - }; - 1DEB923308733DC60010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_MODEL_TUNING = G5; - GCC_PREPROCESSOR_DEFINITIONS = ( - TRACE_ENABLE, - _LARGE_FILES, - "_FILE_OFFSET_BITS=64", - "MAX_NUM_FACTORS=4", - ); - HEADER_SEARCH_PATHS = /opt/local/include; - INSTALL_PATH = /usr/local/bin; - LIBRARY_SEARCH_PATHS = ( - ../../irstlm/lib, - ../../srilm/lib/macosx, - /opt/local/lib, - ../../cmph/lib, - ); - OTHER_LDFLAGS = ( - "-lz", - "-lirstlm", - "-lmisc", - "-ldstruct", - "-loolm", - "-lflm", - "-llattice", - "-lboost_thread-mt", - "-lboost_filesystem-mt", - "-lboost_system-mt", - "-lcmph", - ); - PRODUCT_NAME = "moses-chart-cmd"; - SDKROOT = ""; - USER_HEADER_SEARCH_PATHS = "../../ ../../moses/src"; - }; - name = Release; - }; - 1DEB923608733DC60010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - TRACE_ENABLE, - WITH_THREADS, - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - ../../moses/src, - ../.., - "/Users/hieuhoang/workspace/github/moses-smt/moses/src/**", - ); - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = ""; - }; - name = Debug; - }; - 1DEB923708733DC60010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PREPROCESSOR_DEFINITIONS = ( - TRACE_ENABLE, - WITH_THREADS, - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - ../../moses/src, - ../.., - "/Users/hieuhoang/workspace/github/moses-smt/moses/src/**", - ); - ONLY_ACTIVE_ARCH = YES; - PREBINDING = NO; - SDKROOT = ""; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1DEB923108733DC60010E9CD /* Build configuration list for PBXNativeTarget "moses-chart-cmd" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB923208733DC60010E9CD /* Debug */, - 1DEB923308733DC60010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1DEB923508733DC60010E9CD /* Build configuration list for PBXProject "moses-chart-cmd" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB923608733DC60010E9CD /* Debug */, - 1DEB923708733DC60010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; -} diff --git a/contrib/other-builds/moses-chart-cmd/.cproject b/contrib/other-builds/moses-chart-cmd/.cproject deleted file mode 100644 index 7c3b36547a..0000000000 --- a/contrib/other-builds/moses-chart-cmd/.cproject +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/contrib/other-builds/moses-chart-cmd/.project b/contrib/other-builds/moses-chart-cmd/.project deleted file mode 100644 index 5022e23ffb..0000000000 --- a/contrib/other-builds/moses-chart-cmd/.project +++ /dev/null @@ -1,135 +0,0 @@ - - - moses-chart-cmd - - - lm - moses - OnDiskPt - search - util - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - ?name? - - - - org.eclipse.cdt.make.core.append_environment - true - - - org.eclipse.cdt.make.core.autoBuildTarget - all - - - org.eclipse.cdt.make.core.buildArguments - -j3 - - - org.eclipse.cdt.make.core.buildCommand - make - - - org.eclipse.cdt.make.core.buildLocation - ${workspace_loc:/moses-chart-cmd/Debug} - - - org.eclipse.cdt.make.core.cleanBuildTarget - clean - - - org.eclipse.cdt.make.core.contents - org.eclipse.cdt.make.core.activeConfigSettings - - - org.eclipse.cdt.make.core.enableAutoBuild - false - - - org.eclipse.cdt.make.core.enableCleanBuild - true - - - org.eclipse.cdt.make.core.enableFullBuild - true - - - org.eclipse.cdt.make.core.fullBuildTarget - all - - - org.eclipse.cdt.make.core.stopOnError - true - - - org.eclipse.cdt.make.core.useDefaultBuildCmd - true - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - IOWrapper.cpp - 1 - PARENT-3-PROJECT_LOC/moses-chart-cmd/IOWrapper.cpp - - - IOWrapper.h - 1 - PARENT-3-PROJECT_LOC/moses-chart-cmd/IOWrapper.h - - - Jamfile - 1 - PARENT-3-PROJECT_LOC/moses-chart-cmd/Jamfile - - - Main.cpp - 1 - PARENT-3-PROJECT_LOC/moses-chart-cmd/Main.cpp - - - Main.h - 1 - PARENT-3-PROJECT_LOC/moses-chart-cmd/Main.h - - - TranslationAnalysis.cpp - 1 - PARENT-3-PROJECT_LOC/moses-chart-cmd/TranslationAnalysis.cpp - - - TranslationAnalysis.h - 1 - PARENT-3-PROJECT_LOC/moses-chart-cmd/TranslationAnalysis.h - - - mbr.cpp - 1 - PARENT-3-PROJECT_LOC/moses-chart-cmd/mbr.cpp - - - mbr.h - 1 - PARENT-3-PROJECT_LOC/moses-chart-cmd/mbr.h - - - diff --git a/contrib/other-builds/moses-cmd.vcxproj b/contrib/other-builds/moses-cmd.vcxproj deleted file mode 100644 index 85e338c8cb..0000000000 --- a/contrib/other-builds/moses-cmd.vcxproj +++ /dev/null @@ -1,194 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {E2233DB1-5592-46FE-9420-E529420612FA} - mosescmd - Win32Proj - - - - Application - Unicode - true - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - true - true - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - false - false - C:\Program Files\boost\boost_1_47;$(IncludePath) - C:\Program Files\boost\boost_1_47;$(IncludePath) - C:\Program Files\boost\boost_1_47;$(IncludePath) - C:\Program Files\boost\boost_1_47;$(IncludePath) - C:\Program Files\boost\boost_1_47\lib;$(LibraryPath) - C:\Program Files\boost\boost_1_47\lib;$(LibraryPath) - C:\Program Files\boost\boost_1_47\lib;$(LibraryPath) - C:\Program Files\boost\boost_1_47\lib;$(LibraryPath) - - - - Disabled - C:\Program Files\boost\boost_1_51;$(SolutionDir)/../../moses/src;$(SolutionDir)/../..;%(AdditionalIncludeDirectories) - WITH_THREADS;NO_PIPES;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - - - C:\GnuWin32\lib\zlib.lib;$(SolutionDir)$(Configuration)\moses.lib;$(SolutionDir)$(Configuration)\kenlm.lib;$(SolutionDir)$(Configuration)\OnDiskPt.lib;%(AdditionalDependencies) - true - Console - false - - - MachineX86 - C:\Program Files\boost\boost_1_51\lib - - - - - Disabled - C:\Program Files\boost\boost_1_51;$(SolutionDir)/../../moses/src;$(SolutionDir)/../..;%(AdditionalIncludeDirectories) - WITH_THREADS;NO_PIPES;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - - - C:\GnuWin32\lib\zlib.lib;$(SolutionDir)$(Configuration)\moses.lib;$(SolutionDir)$(Configuration)\kenlm.lib;$(SolutionDir)$(Configuration)\OnDiskPt.lib;%(AdditionalDependencies) - true - Console - false - - - C:\Program Files\boost\boost_1_51\lib - - - - - C:\boost\boost_1_47;$(SolutionDir)/../../moses/src;$(SolutionDir)/../..;%(AdditionalIncludeDirectories) - WITH_THREADS;NO_PIPES;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - - - C:\GnuWin32\lib\zlib.lib;$(SolutionDir)$(Configuration)\moses.lib;$(SolutionDir)$(Configuration)\kenlm.lib;$(SolutionDir)$(Configuration)\OnDiskPt.lib;%(AdditionalDependencies) - true - Console - true - true - false - - - MachineX86 - C:\boost\boost_1_47\lib - - - - - C:\boost\boost_1_47;$(SolutionDir)/../../moses/src;$(SolutionDir)/../..;%(AdditionalIncludeDirectories) - WITH_THREADS;NO_PIPES;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - - - C:\GnuWin32\lib\zlib.lib;$(SolutionDir)$(Configuration)\moses.lib;$(SolutionDir)$(Configuration)\kenlm.lib;$(SolutionDir)$(Configuration)\OnDiskPt.lib;%(AdditionalDependencies) - true - Console - true - true - false - - - C:\boost\boost_1_47\lib - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/contrib/other-builds/moses-cmd.xcodeproj/project.pbxproj b/contrib/other-builds/moses-cmd.xcodeproj/project.pbxproj deleted file mode 100644 index 5bf91e2b83..0000000000 --- a/contrib/other-builds/moses-cmd.xcodeproj/project.pbxproj +++ /dev/null @@ -1,498 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 42; - objects = { - -/* Begin PBXBuildFile section */ - 1EAF9D7A14B9F566005E8EBD /* IOWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EAF9D5B14B9F566005E8EBD /* IOWrapper.cpp */; }; - 1EAF9D7C14B9F566005E8EBD /* Jamfile in Sources */ = {isa = PBXBuildFile; fileRef = 1EAF9D5E14B9F566005E8EBD /* Jamfile */; }; - 1EAF9D7D14B9F566005E8EBD /* LatticeMBR.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EAF9D5F14B9F566005E8EBD /* LatticeMBR.cpp */; }; - 1EAF9D8114B9F566005E8EBD /* Main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EAF9D6414B9F566005E8EBD /* Main.cpp */; }; - 1EAF9D8314B9F566005E8EBD /* mbr.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EAF9D6714B9F566005E8EBD /* mbr.cpp */; }; - 1EAF9D8514B9F566005E8EBD /* TranslationAnalysis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EAF9D6A14B9F566005E8EBD /* TranslationAnalysis.cpp */; }; - 1EAF9D9D14B9F7B6005E8EBD /* libOnDiskPt.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EAF9D9C14B9F7A6005E8EBD /* libOnDiskPt.a */; }; - 1EF070A914B9F0380052152A /* liblm.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EF0708A14B9EF070052152A /* liblm.a */; }; - 1EF070AA14B9F0380052152A /* libmoses.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EF0709014B9EF0E0052152A /* libmoses.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1EAF9D9B14B9F7A6005E8EBD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EAF9D9414B9F7A6005E8EBD /* OnDiskPt.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC046055464E500DB518D; - remoteInfo = OnDiskPt; - }; - 1EAF9D9E14B9F7BD005E8EBD /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EAF9D9414B9F7A6005E8EBD /* OnDiskPt.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC045055464E500DB518D; - remoteInfo = OnDiskPt; - }; - 1EF0708914B9EF070052152A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EF0708514B9EF070052152A /* lm.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1EE8C2E91476A48E002496F2; - remoteInfo = lm; - }; - 1EF0708F14B9EF0E0052152A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EF0708B14B9EF0D0052152A /* moses.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC046055464E500DB518D; - remoteInfo = moses; - }; - 1EF070AD14B9F03F0052152A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EF0708B14B9EF0D0052152A /* moses.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC045055464E500DB518D; - remoteInfo = moses; - }; - 1EF070AF14B9F0430052152A /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EF0708514B9EF070052152A /* lm.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 1EE8C2E81476A48E002496F2; - remoteInfo = lm; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 8DD76F690486A84900D96B5E /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 8; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1EAF9D5B14B9F566005E8EBD /* IOWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = IOWrapper.cpp; path = "../../moses-cmd/src/IOWrapper.cpp"; sourceTree = ""; }; - 1EAF9D5C14B9F566005E8EBD /* IOWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IOWrapper.h; path = "../../moses-cmd/src/IOWrapper.h"; sourceTree = ""; }; - 1EAF9D5E14B9F566005E8EBD /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; name = Jamfile; path = "../../moses-cmd/src/Jamfile"; sourceTree = ""; }; - 1EAF9D5F14B9F566005E8EBD /* LatticeMBR.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LatticeMBR.cpp; path = "../../moses-cmd/src/LatticeMBR.cpp"; sourceTree = ""; }; - 1EAF9D6014B9F566005E8EBD /* LatticeMBR.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LatticeMBR.h; path = "../../moses-cmd/src/LatticeMBR.h"; sourceTree = ""; }; - 1EAF9D6414B9F566005E8EBD /* Main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Main.cpp; path = "../../moses-cmd/src/Main.cpp"; sourceTree = ""; }; - 1EAF9D6514B9F566005E8EBD /* Main.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Main.h; path = "../../moses-cmd/src/Main.h"; sourceTree = ""; }; - 1EAF9D6714B9F566005E8EBD /* mbr.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = mbr.cpp; path = "../../moses-cmd/src/mbr.cpp"; sourceTree = ""; }; - 1EAF9D6814B9F566005E8EBD /* mbr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = mbr.h; path = "../../moses-cmd/src/mbr.h"; sourceTree = ""; }; - 1EAF9D6A14B9F566005E8EBD /* TranslationAnalysis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TranslationAnalysis.cpp; path = "../../moses-cmd/src/TranslationAnalysis.cpp"; sourceTree = ""; }; - 1EAF9D6B14B9F566005E8EBD /* TranslationAnalysis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TranslationAnalysis.h; path = "../../moses-cmd/src/TranslationAnalysis.h"; sourceTree = ""; }; - 1EAF9D9414B9F7A6005E8EBD /* OnDiskPt.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = OnDiskPt.xcodeproj; sourceTree = ""; }; - 1EF0708514B9EF070052152A /* lm.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = lm.xcodeproj; sourceTree = ""; }; - 1EF0708B14B9EF0D0052152A /* moses.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = moses.xcodeproj; sourceTree = ""; }; - 8DD76F6C0486A84900D96B5E /* moses-cmd */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = "moses-cmd"; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 8DD76F660486A84900D96B5E /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EAF9D9D14B9F7B6005E8EBD /* libOnDiskPt.a in Frameworks */, - 1EF070A914B9F0380052152A /* liblm.a in Frameworks */, - 1EF070AA14B9F0380052152A /* libmoses.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 08FB7794FE84155DC02AAC07 /* moses-cmd */ = { - isa = PBXGroup; - children = ( - 08FB7795FE84155DC02AAC07 /* Source */, - C6859E8C029090F304C91782 /* Documentation */, - 1AB674ADFE9D54B511CA2CBB /* Products */, - 1EAF9D9414B9F7A6005E8EBD /* OnDiskPt.xcodeproj */, - 1EF0708514B9EF070052152A /* lm.xcodeproj */, - 1EF0708B14B9EF0D0052152A /* moses.xcodeproj */, - ); - name = "moses-cmd"; - sourceTree = ""; - }; - 08FB7795FE84155DC02AAC07 /* Source */ = { - isa = PBXGroup; - children = ( - 1EAF9D5B14B9F566005E8EBD /* IOWrapper.cpp */, - 1EAF9D5C14B9F566005E8EBD /* IOWrapper.h */, - 1EAF9D5E14B9F566005E8EBD /* Jamfile */, - 1EAF9D5F14B9F566005E8EBD /* LatticeMBR.cpp */, - 1EAF9D6014B9F566005E8EBD /* LatticeMBR.h */, - 1EAF9D6414B9F566005E8EBD /* Main.cpp */, - 1EAF9D6514B9F566005E8EBD /* Main.h */, - 1EAF9D6714B9F566005E8EBD /* mbr.cpp */, - 1EAF9D6814B9F566005E8EBD /* mbr.h */, - 1EAF9D6A14B9F566005E8EBD /* TranslationAnalysis.cpp */, - 1EAF9D6B14B9F566005E8EBD /* TranslationAnalysis.h */, - ); - name = Source; - sourceTree = ""; - }; - 1AB674ADFE9D54B511CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8DD76F6C0486A84900D96B5E /* moses-cmd */, - ); - name = Products; - sourceTree = ""; - }; - 1EAF9D9514B9F7A6005E8EBD /* Products */ = { - isa = PBXGroup; - children = ( - 1EAF9D9C14B9F7A6005E8EBD /* libOnDiskPt.a */, - ); - name = Products; - sourceTree = ""; - }; - 1EF0708614B9EF070052152A /* Products */ = { - isa = PBXGroup; - children = ( - 1EF0708A14B9EF070052152A /* liblm.a */, - ); - name = Products; - sourceTree = ""; - }; - 1EF0708C14B9EF0D0052152A /* Products */ = { - isa = PBXGroup; - children = ( - 1EF0709014B9EF0E0052152A /* libmoses.a */, - ); - name = Products; - sourceTree = ""; - }; - C6859E8C029090F304C91782 /* Documentation */ = { - isa = PBXGroup; - children = ( - ); - name = Documentation; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 8DD76F620486A84900D96B5E /* moses-cmd */ = { - isa = PBXNativeTarget; - buildConfigurationList = 03306D3B0C0B23F200CA1311 /* Build configuration list for PBXNativeTarget "moses-cmd" */; - buildPhases = ( - 8DD76F640486A84900D96B5E /* Sources */, - 8DD76F660486A84900D96B5E /* Frameworks */, - 8DD76F690486A84900D96B5E /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - 1EAF9D9F14B9F7BD005E8EBD /* PBXTargetDependency */, - 1EF070B014B9F0430052152A /* PBXTargetDependency */, - 1EF070AE14B9F03F0052152A /* PBXTargetDependency */, - ); - name = "moses-cmd"; - productInstallPath = "$(HOME)/bin"; - productName = "moses-cmd"; - productReference = 8DD76F6C0486A84900D96B5E /* moses-cmd */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 03306D3F0C0B23F200CA1311 /* Build configuration list for PBXProject "moses-cmd" */; - compatibilityVersion = "Xcode 2.4"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 08FB7794FE84155DC02AAC07 /* moses-cmd */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 1EF0708614B9EF070052152A /* Products */; - ProjectRef = 1EF0708514B9EF070052152A /* lm.xcodeproj */; - }, - { - ProductGroup = 1EF0708C14B9EF0D0052152A /* Products */; - ProjectRef = 1EF0708B14B9EF0D0052152A /* moses.xcodeproj */; - }, - { - ProductGroup = 1EAF9D9514B9F7A6005E8EBD /* Products */; - ProjectRef = 1EAF9D9414B9F7A6005E8EBD /* OnDiskPt.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 8DD76F620486A84900D96B5E /* moses-cmd */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 1EAF9D9C14B9F7A6005E8EBD /* libOnDiskPt.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libOnDiskPt.a; - remoteRef = 1EAF9D9B14B9F7A6005E8EBD /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1EF0708A14B9EF070052152A /* liblm.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = liblm.a; - remoteRef = 1EF0708914B9EF070052152A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1EF0709014B9EF0E0052152A /* libmoses.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libmoses.a; - remoteRef = 1EF0708F14B9EF0E0052152A /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXSourcesBuildPhase section */ - 8DD76F640486A84900D96B5E /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EAF9D7A14B9F566005E8EBD /* IOWrapper.cpp in Sources */, - 1EAF9D7C14B9F566005E8EBD /* Jamfile in Sources */, - 1EAF9D7D14B9F566005E8EBD /* LatticeMBR.cpp in Sources */, - 1EAF9D8114B9F566005E8EBD /* Main.cpp in Sources */, - 1EAF9D8314B9F566005E8EBD /* mbr.cpp in Sources */, - 1EAF9D8514B9F566005E8EBD /* TranslationAnalysis.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 1EAF9D9F14B9F7BD005E8EBD /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = OnDiskPt; - targetProxy = 1EAF9D9E14B9F7BD005E8EBD /* PBXContainerItemProxy */; - }; - 1EF070AE14B9F03F0052152A /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = moses; - targetProxy = 1EF070AD14B9F03F0052152A /* PBXContainerItemProxy */; - }; - 1EF070B014B9F0430052152A /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = lm; - targetProxy = 1EF070AF14B9F0430052152A /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 03306D3C0C0B23F200CA1311 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_FIX_AND_CONTINUE = YES; - GCC_GENERATE_DEBUGGING_SYMBOLS = YES; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - LM_SRI, - LM_IRST, - TRACE_ENABLE, - WITH_THREADS, - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - ../, - ../moses/src, - ../kenlm, - /opt/local/include, - ); - INSTALL_PATH = "$(HOME)/bin"; - LIBRARY_SEARCH_PATHS = ( - ../../irstlm/lib, - ../../srilm/lib/macosx, - /opt/local/lib, - ../../cmph/lib, - ); - OTHER_LDFLAGS = ( - "-lz", - "-lirstlm", - "-lmisc", - "-ldstruct", - "-loolm", - "-lflm", - "-llattice", - "-lboost_thread-mt", - "-lboost_system-mt", - "-lcmph", - ); - PREBINDING = NO; - PRODUCT_NAME = "moses-cmd"; - ZERO_LINK = NO; - }; - name = Debug; - }; - 03306D3D0C0B23F200CA1311 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - COPY_PHASE_STRIP = YES; - GCC_ENABLE_FIX_AND_CONTINUE = NO; - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 3; - GCC_PREPROCESSOR_DEFINITIONS = ( - LM_SRI, - LM_IRST, - TRACE_ENABLE, - WITH_THREADS, - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - ../, - ../moses/src, - ../kenlm, - /opt/local/include, - ); - INSTALL_PATH = "$(HOME)/bin"; - LIBRARY_SEARCH_PATHS = ( - ../../irstlm/lib, - ../../srilm/lib/macosx, - /opt/local/lib, - ../../cmph/lib, - ); - OTHER_LDFLAGS = ( - "-lz", - "-lirstlm", - "-lmisc", - "-ldstruct", - "-loolm", - "-lflm", - "-llattice", - "-lboost_thread-mt", - "-lboost_system-mt", - "-lcmph", - ); - PREBINDING = NO; - PRODUCT_NAME = "moses-cmd"; - ZERO_LINK = NO; - }; - name = Release; - }; - 03306D3E0C0B23F200CA1311 /* Default */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_GENERATE_DEBUGGING_SYMBOLS = NO; - GCC_MODEL_TUNING = G5; - GCC_PREPROCESSOR_DEFINITIONS = ( - LM_SRI, - LM_IRST, - TRACE_ENABLE, - WITH_THREADS, - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - ../, - ../moses/src, - ../kenlm, - /opt/local/include, - ); - INSTALL_PATH = "$(HOME)/bin"; - LIBRARY_SEARCH_PATHS = ( - ../../irstlm/lib, - ../../srilm/lib/macosx, - /opt/local/lib, - ../../cmph/lib, - ); - OTHER_LDFLAGS = ( - "-lz", - "-lirstlm", - "-lmisc", - "-ldstruct", - "-loolm", - "-lflm", - "-llattice", - "-lboost_thread-mt", - "-lboost_system-mt", - "-lcmph", - ); - PREBINDING = NO; - PRODUCT_NAME = "moses-cmd"; - }; - name = Default; - }; - 03306D400C0B23F200CA1311 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)"; - ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH_ACTUAL)"; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk"; - USER_HEADER_SEARCH_PATHS = "../../moses/src ../../"; - VALID_ARCHS = "i386 ppc ppc64 ppc7400 ppc970 x86_64"; - }; - name = Debug; - }; - 03306D410C0B23F200CA1311 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)"; - ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH_ACTUAL)"; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk"; - USER_HEADER_SEARCH_PATHS = "../../moses/src ../../"; - VALID_ARCHS = "i386 ppc ppc64 ppc7400 ppc970 x86_64"; - }; - name = Release; - }; - 03306D420C0B23F200CA1311 /* Default */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ONLY_ACTIVE_ARCH_PRE_XCODE_3_1)"; - ONLY_ACTIVE_ARCH_PRE_XCODE_3_1 = "$(NATIVE_ARCH_ACTUAL)"; - SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk"; - USER_HEADER_SEARCH_PATHS = "../../moses/src ../../"; - VALID_ARCHS = "i386 ppc ppc64 ppc7400 ppc970 x86_64"; - }; - name = Default; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 03306D3B0C0B23F200CA1311 /* Build configuration list for PBXNativeTarget "moses-cmd" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 03306D3C0C0B23F200CA1311 /* Debug */, - 03306D3D0C0B23F200CA1311 /* Release */, - 03306D3E0C0B23F200CA1311 /* Default */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Default; - }; - 03306D3F0C0B23F200CA1311 /* Build configuration list for PBXProject "moses-cmd" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 03306D400C0B23F200CA1311 /* Debug */, - 03306D410C0B23F200CA1311 /* Release */, - 03306D420C0B23F200CA1311 /* Default */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Default; - }; -/* End XCConfigurationList section */ - }; - rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; -} diff --git a/contrib/other-builds/moses-cmd.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/moses-cmd.xcscheme b/contrib/other-builds/moses-cmd.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/moses-cmd.xcscheme deleted file mode 100644 index 80894eccad..0000000000 --- a/contrib/other-builds/moses-cmd.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/moses-cmd.xcscheme +++ /dev/null @@ -1,72 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/contrib/other-builds/moses-cmd.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/xcschememanagement.plist b/contrib/other-builds/moses-cmd.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/xcschememanagement.plist deleted file mode 100644 index 29af8ddb41..0000000000 --- a/contrib/other-builds/moses-cmd.xcodeproj/xcuserdata/hieuhoang.xcuserdatad/xcschemes/xcschememanagement.plist +++ /dev/null @@ -1,22 +0,0 @@ - - - - - SchemeUserState - - moses-cmd.xcscheme - - orderHint - 2 - - - SuppressBuildableAutocreation - - 8DD76F620486A84900D96B5E - - primary - - - - - diff --git a/contrib/other-builds/moses-cmd/.cproject b/contrib/other-builds/moses-cmd/.cproject index 3e18bf9271..2dde393bca 100644 --- a/contrib/other-builds/moses-cmd/.cproject +++ b/contrib/other-builds/moses-cmd/.cproject @@ -1,7 +1,5 @@ - - - + @@ -17,22 +15,22 @@ - + - + - - - - + - - @@ -166,13 +174,14 @@ - + - + + diff --git a/contrib/other-builds/moses-cmd/.project b/contrib/other-builds/moses-cmd/.project index 541d60b6fb..9aca6fe7a4 100644 --- a/contrib/other-builds/moses-cmd/.project +++ b/contrib/other-builds/moses-cmd/.project @@ -6,6 +6,7 @@ lm moses OnDiskPt + probingpt search util @@ -86,31 +87,11 @@ org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - IOWrapper.cpp - 1 - PARENT-3-PROJECT_LOC/moses-cmd/IOWrapper.cpp - - - IOWrapper.h - 1 - PARENT-3-PROJECT_LOC/moses-cmd/IOWrapper.h - Jamfile 1 PARENT-3-PROJECT_LOC/moses-cmd/Jamfile - - LatticeMBR.cpp - 1 - PARENT-3-PROJECT_LOC/moses-cmd/LatticeMBR.cpp - - - LatticeMBR.h - 1 - PARENT-3-PROJECT_LOC/moses-cmd/LatticeMBR.h - LatticeMBRGrid.cpp 1 @@ -126,25 +107,5 @@ 1 PARENT-3-PROJECT_LOC/moses-cmd/Main.h - - TranslationAnalysis.cpp - 1 - PARENT-3-PROJECT_LOC/moses-cmd/TranslationAnalysis.cpp - - - TranslationAnalysis.h - 1 - PARENT-3-PROJECT_LOC/moses-cmd/TranslationAnalysis.h - - - mbr.cpp - 1 - PARENT-3-PROJECT_LOC/moses-cmd/mbr.cpp - - - mbr.h - 1 - PARENT-3-PROJECT_LOC/moses-cmd/mbr.h - diff --git a/contrib/other-builds/moses-cmd/moses-cmd.project b/contrib/other-builds/moses-cmd/moses-cmd.project new file mode 100644 index 0000000000..5303ba7c7f --- /dev/null +++ b/contrib/other-builds/moses-cmd/moses-cmd.project @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + None + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + None + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/moses.sln b/contrib/other-builds/moses.sln deleted file mode 100644 index a9ea31234f..0000000000 --- a/contrib/other-builds/moses.sln +++ /dev/null @@ -1,59 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C++ Express 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moses", "moses.vcxproj", "{8122157A-0DE5-44FF-8E5B-024ED6ACE7AF}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "OnDiskPt", "OnDiskPt.vcxproj", "{8B07671B-CBAF-4514-AFFD-CE238CD427E9}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moses-cmd", "moses-cmd.vcxproj", "{E2233DB1-5592-46FE-9420-E529420612FA}" - ProjectSection(ProjectDependencies) = postProject - {A5402E0B-6ED7-465C-9669-E4124A0CDDCB} = {A5402E0B-6ED7-465C-9669-E4124A0CDDCB} - {8B07671B-CBAF-4514-AFFD-CE238CD427E9} = {8B07671B-CBAF-4514-AFFD-CE238CD427E9} - {8122157A-0DE5-44FF-8E5B-024ED6ACE7AF} = {8122157A-0DE5-44FF-8E5B-024ED6ACE7AF} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CreateOnDisk", "CreateOnDisk.vcxproj", "{88AE90C9-72D2-42ED-8389-770ACDCD4308}" - ProjectSection(ProjectDependencies) = postProject - {8B07671B-CBAF-4514-AFFD-CE238CD427E9} = {8B07671B-CBAF-4514-AFFD-CE238CD427E9} - {8122157A-0DE5-44FF-8E5B-024ED6ACE7AF} = {8122157A-0DE5-44FF-8E5B-024ED6ACE7AF} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kenlm", "kenlm.vcxproj", "{A5402E0B-6ED7-465C-9669-E4124A0CDDCB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mosesserver", "mosesserver.vcxproj", "{85811FDF-8AD1-4490-A545-B2F51931A18C}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {8122157A-0DE5-44FF-8E5B-024ED6ACE7AF}.Debug|Win32.ActiveCfg = Debug|Win32 - {8122157A-0DE5-44FF-8E5B-024ED6ACE7AF}.Debug|Win32.Build.0 = Debug|Win32 - {8122157A-0DE5-44FF-8E5B-024ED6ACE7AF}.Release|Win32.ActiveCfg = Release|Win32 - {8122157A-0DE5-44FF-8E5B-024ED6ACE7AF}.Release|Win32.Build.0 = Release|Win32 - {8B07671B-CBAF-4514-AFFD-CE238CD427E9}.Debug|Win32.ActiveCfg = Debug|Win32 - {8B07671B-CBAF-4514-AFFD-CE238CD427E9}.Debug|Win32.Build.0 = Debug|Win32 - {8B07671B-CBAF-4514-AFFD-CE238CD427E9}.Release|Win32.ActiveCfg = Release|Win32 - {8B07671B-CBAF-4514-AFFD-CE238CD427E9}.Release|Win32.Build.0 = Release|Win32 - {E2233DB1-5592-46FE-9420-E529420612FA}.Debug|Win32.ActiveCfg = Debug|Win32 - {E2233DB1-5592-46FE-9420-E529420612FA}.Debug|Win32.Build.0 = Debug|Win32 - {E2233DB1-5592-46FE-9420-E529420612FA}.Release|Win32.ActiveCfg = Release|Win32 - {E2233DB1-5592-46FE-9420-E529420612FA}.Release|Win32.Build.0 = Release|Win32 - {88AE90C9-72D2-42ED-8389-770ACDCD4308}.Debug|Win32.ActiveCfg = Debug|Win32 - {88AE90C9-72D2-42ED-8389-770ACDCD4308}.Debug|Win32.Build.0 = Debug|Win32 - {88AE90C9-72D2-42ED-8389-770ACDCD4308}.Release|Win32.ActiveCfg = Release|Win32 - {88AE90C9-72D2-42ED-8389-770ACDCD4308}.Release|Win32.Build.0 = Release|Win32 - {A5402E0B-6ED7-465C-9669-E4124A0CDDCB}.Debug|Win32.ActiveCfg = Debug|Win32 - {A5402E0B-6ED7-465C-9669-E4124A0CDDCB}.Debug|Win32.Build.0 = Debug|Win32 - {A5402E0B-6ED7-465C-9669-E4124A0CDDCB}.Release|Win32.ActiveCfg = Release|Win32 - {A5402E0B-6ED7-465C-9669-E4124A0CDDCB}.Release|Win32.Build.0 = Release|Win32 - {85811FDF-8AD1-4490-A545-B2F51931A18C}.Debug|Win32.ActiveCfg = Debug|Win32 - {85811FDF-8AD1-4490-A545-B2F51931A18C}.Debug|Win32.Build.0 = Debug|Win32 - {85811FDF-8AD1-4490-A545-B2F51931A18C}.Release|Win32.ActiveCfg = Release|Win32 - {85811FDF-8AD1-4490-A545-B2F51931A18C}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/contrib/other-builds/moses.vcxproj b/contrib/other-builds/moses.vcxproj deleted file mode 100644 index 50beddb0e1..0000000000 --- a/contrib/other-builds/moses.vcxproj +++ /dev/null @@ -1,422 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {8122157A-0DE5-44FF-8E5B-024ED6ACE7AF} - moses - Win32Proj - - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - true - - - StaticLibrary - Unicode - - - StaticLibrary - Unicode - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - C:\Program Files\boost\boost_1_47;C:\GnuWin32\include;$(IncludePath) - C:\Program Files\boostpro\boost_1_51;C:\GnuWin32\include;$(IncludePath) - C:\Program Files\boost\boost_1_47;C:\GnuWin32\include;$(IncludePath) - C:\Program Files\boost\boost_1_47;C:\GnuWin32\include;$(IncludePath) - - - - Disabled - C:\Program Files\boost\boost_1_51;C:\GnuWin32\include;$(SolutionDir)/../../moses/src;$(SolutionDir)/../../;%(AdditionalIncludeDirectories) - WITH_THREADS;NO_PIPES;WIN32;_DEBUG;_CONSOLE;TRACE_ENABLE;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - - - $(OutDir)$(ProjectName).lib - C:\Program Files\boost\boost_1_51\lib;C:\GnuWin32\lib - - - - - Disabled - C:\Program Files\boost\boost_1_51;C:\GnuWin32\include;$(SolutionDir)/../../moses/src;$(SolutionDir)/../../;%(AdditionalIncludeDirectories) - WITH_THREADS;NO_PIPES;WIN32;_DEBUG;_CONSOLE;TRACE_ENABLE;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - - - $(OutDir)$(ProjectName).lib - C:\Program Files\boost\boost_1_51\lib;C:\GnuWin32\lib - - - - - AnySuitable - true - Speed - C:\boost\boost_1_47;$(SolutionDir)/../../moses/src;$(SolutionDir)/../../;%(AdditionalIncludeDirectories) - WITH_THREADS;NO_PIPES;WIN32;NDEBUG;_CONSOLE;LM_INTERNAL;TRACE_ENABLE;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - - - $(OutDir)$(ProjectName).lib - - - - - AnySuitable - true - Speed - C:\boost\boost_1_47;$(SolutionDir)/../../moses/src;$(SolutionDir)/../../;%(AdditionalIncludeDirectories) - WITH_THREADS;NO_PIPES;WIN32;NDEBUG;_CONSOLE;LM_INTERNAL;TRACE_ENABLE;_CRT_SECURE_NO_DEPRECATE;_SCL_SECURE_NO_DEPRECATE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - - - $(OutDir)$(ProjectName).lib - - - - - - \ No newline at end of file diff --git a/contrib/other-builds/moses.xcodeproj/project.pbxproj b/contrib/other-builds/moses.xcodeproj/project.pbxproj deleted file mode 100644 index 32b1350c80..0000000000 --- a/contrib/other-builds/moses.xcodeproj/project.pbxproj +++ /dev/null @@ -1,3159 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1E0BA41815B70E5F00AC70E1 /* PhraseDictionaryFuzzyMatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E0BA41615B70E5F00AC70E1 /* PhraseDictionaryFuzzyMatch.cpp */; }; - 1E0BA41915B70E5F00AC70E1 /* PhraseDictionaryFuzzyMatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E0BA41715B70E5F00AC70E1 /* PhraseDictionaryFuzzyMatch.h */; }; - 1E1D824015AC29BB00FE42E9 /* FileHandler.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E1D823E15AC29BB00FE42E9 /* FileHandler.cpp */; }; - 1E1D824115AC29BB00FE42E9 /* FileHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E1D823F15AC29BB00FE42E9 /* FileHandler.h */; }; - 1E316468163B0C5200F64999 /* BleuScoreFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316464163B0C5200F64999 /* BleuScoreFeature.h */; }; - 1E316469163B0C5200F64999 /* ChartParser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316465163B0C5200F64999 /* ChartParser.cpp */; }; - 1E31646A163B0C5200F64999 /* ChartParser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316466163B0C5200F64999 /* ChartParser.h */; }; - 1E31646B163B0C5200F64999 /* ChartParserCallback.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316467163B0C5200F64999 /* ChartParserCallback.h */; }; - 1E31646D163B0C6D00F64999 /* BleuScoreFeature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E31646C163B0C6D00F64999 /* BleuScoreFeature.cpp */; }; - 1E3165AA163B0CB200F64999 /* FeatureVector.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E31646E163B0CB000F64999 /* FeatureVector.cpp */; }; - 1E3165AB163B0CB200F64999 /* FeatureVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31646F163B0CB000F64999 /* FeatureVector.h */; }; - 1E3165AC163B0CB200F64999 /* FeatureVectorTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316470163B0CB000F64999 /* FeatureVectorTest.cpp */; }; - 1E3165AD163B0CB200F64999 /* FuzzyMatchWrapper.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316478163B0CB000F64999 /* FuzzyMatchWrapper.o */; }; - 1E3165AE163B0CB200F64999 /* libfuzzy-match.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316479163B0CB000F64999 /* libfuzzy-match.a */; }; - 1E3165AF163B0CB200F64999 /* SentenceAlignment.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31647A163B0CB000F64999 /* SentenceAlignment.o */; }; - 1E3165B0163B0CB200F64999 /* SuffixArray.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31647B163B0CB000F64999 /* SuffixArray.o */; }; - 1E3165B1163B0CB200F64999 /* Vocabulary.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31647C163B0CB000F64999 /* Vocabulary.o */; }; - 1E3165B2163B0CB200F64999 /* FuzzyMatchWrapper.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316482163B0CB000F64999 /* FuzzyMatchWrapper.o */; }; - 1E3165B3163B0CB200F64999 /* libfuzzy-match.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316483163B0CB000F64999 /* libfuzzy-match.a */; }; - 1E3165B4163B0CB200F64999 /* SentenceAlignment.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316484163B0CB000F64999 /* SentenceAlignment.o */; }; - 1E3165B5163B0CB200F64999 /* SuffixArray.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316485163B0CB000F64999 /* SuffixArray.o */; }; - 1E3165B6163B0CB200F64999 /* TMMTWrapper.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316486163B0CB000F64999 /* TMMTWrapper.o */; }; - 1E3165B7163B0CB200F64999 /* Vocabulary.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316487163B0CB000F64999 /* Vocabulary.o */; }; - 1E3165B8163B0CB200F64999 /* FuzzyMatchWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316488163B0CB000F64999 /* FuzzyMatchWrapper.cpp */; }; - 1E3165B9163B0CB200F64999 /* FuzzyMatchWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316489163B0CB000F64999 /* FuzzyMatchWrapper.h */; }; - 1E3165BA163B0CB200F64999 /* Jamfile in Sources */ = {isa = PBXBuildFile; fileRef = 1E31648A163B0CB000F64999 /* Jamfile */; }; - 1E3165BB163B0CB200F64999 /* Match.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31648B163B0CB000F64999 /* Match.h */; }; - 1E3165BC163B0CB200F64999 /* SentenceAlignment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E31648C163B0CB000F64999 /* SentenceAlignment.cpp */; }; - 1E3165BD163B0CB200F64999 /* SentenceAlignment.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31648D163B0CB000F64999 /* SentenceAlignment.h */; }; - 1E3165BE163B0CB200F64999 /* SuffixArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E31648E163B0CB000F64999 /* SuffixArray.cpp */; }; - 1E3165BF163B0CB200F64999 /* SuffixArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31648F163B0CB000F64999 /* SuffixArray.h */; }; - 1E3165C0163B0CB200F64999 /* Vocabulary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316490163B0CB000F64999 /* Vocabulary.cpp */; }; - 1E3165C1163B0CB200F64999 /* Vocabulary.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316491163B0CB000F64999 /* Vocabulary.h */; }; - 1E3165C2163B0CB200F64999 /* GlobalLexicalModelUnlimited.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316492163B0CB000F64999 /* GlobalLexicalModelUnlimited.cpp */; }; - 1E3165C3163B0CB200F64999 /* GlobalLexicalModelUnlimited.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316493163B0CB000F64999 /* GlobalLexicalModelUnlimited.h */; }; - 1E3165C4163B0CB200F64999 /* Fill.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31649B163B0CB000F64999 /* Fill.o */; }; - 1E3165C5163B0CB200F64999 /* libIncremental.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31649C163B0CB000F64999 /* libIncremental.a */; }; - 1E3165C6163B0CB200F64999 /* Manager.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31649D163B0CB000F64999 /* Manager.o */; }; - 1E3165C7163B0CB200F64999 /* Fill.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E31649E163B0CB000F64999 /* Fill.cpp */; }; - 1E3165C8163B0CB200F64999 /* Fill.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31649F163B0CB000F64999 /* Fill.h */; }; - 1E3165C9163B0CB200F64999 /* Jamfile in Sources */ = {isa = PBXBuildFile; fileRef = 1E3164A0163B0CB000F64999 /* Jamfile */; }; - 1E3165CA163B0CB200F64999 /* Manager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E3164A1163B0CB000F64999 /* Manager.cpp */; }; - 1E3165CB163B0CB200F64999 /* Manager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E3164A2163B0CB000F64999 /* Manager.h */; }; - 1E3165CE163B0CB200F64999 /* Base.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E3164A8163B0CB000F64999 /* Base.cpp */; }; - 1E3165CF163B0CB200F64999 /* Base.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E3164A9163B0CB000F64999 /* Base.h */; }; - 1E3165D0163B0CB200F64999 /* Base.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164B0163B0CB000F64999 /* Base.o */; }; - 1E3165D1163B0CB200F64999 /* Factory.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164B1163B0CB000F64999 /* Factory.o */; }; - 1E3165D2163B0CB200F64999 /* Implementation.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164B2163B0CB000F64999 /* Implementation.o */; }; - 1E3165D3163B0CB200F64999 /* IRST.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164B3163B0CB000F64999 /* IRST.o */; }; - 1E3165D4163B0CB200F64999 /* Joint.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164B4163B0CB000F64999 /* Joint.o */; }; - 1E3165D5163B0CB200F64999 /* Ken.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164B5163B0CB000F64999 /* Ken.o */; }; - 1E3165D6163B0CB200F64999 /* libLM.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164B6163B0CB000F64999 /* libLM.a */; }; - 1E3165D7163B0CB200F64999 /* MultiFactor.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164B7163B0CB000F64999 /* MultiFactor.o */; }; - 1E3165D8163B0CB200F64999 /* ORLM.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164B8163B0CB000F64999 /* ORLM.o */; }; - 1E3165D9163B0CB200F64999 /* ParallelBackoff.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164B9163B0CB000F64999 /* ParallelBackoff.o */; }; - 1E3165DA163B0CB200F64999 /* Rand.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164BA163B0CB000F64999 /* Rand.o */; }; - 1E3165DB163B0CB200F64999 /* Remote.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164BB163B0CB000F64999 /* Remote.o */; }; - 1E3165DC163B0CB200F64999 /* SingleFactor.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164BC163B0CB000F64999 /* SingleFactor.o */; }; - 1E3165DD163B0CB200F64999 /* SRI.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164BD163B0CB000F64999 /* SRI.o */; }; - 1E3165DE163B0CB200F64999 /* Base.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164C3163B0CB000F64999 /* Base.o */; }; - 1E3165DF163B0CB200F64999 /* Factory.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164C4163B0CB100F64999 /* Factory.o */; }; - 1E3165E0163B0CB200F64999 /* Implementation.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164C5163B0CB100F64999 /* Implementation.o */; }; - 1E3165E1163B0CB200F64999 /* IRST.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164C6163B0CB100F64999 /* IRST.o */; }; - 1E3165E2163B0CB200F64999 /* Joint.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164C7163B0CB100F64999 /* Joint.o */; }; - 1E3165E3163B0CB200F64999 /* Ken.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164C8163B0CB100F64999 /* Ken.o */; }; - 1E3165E4163B0CB200F64999 /* libLM.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164C9163B0CB100F64999 /* libLM.a */; }; - 1E3165E5163B0CB200F64999 /* MultiFactor.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164CA163B0CB100F64999 /* MultiFactor.o */; }; - 1E3165E6163B0CB200F64999 /* ORLM.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164CB163B0CB100F64999 /* ORLM.o */; }; - 1E3165E7163B0CB200F64999 /* ParallelBackoff.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164CC163B0CB100F64999 /* ParallelBackoff.o */; }; - 1E3165E8163B0CB200F64999 /* Rand.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164CD163B0CB100F64999 /* Rand.o */; }; - 1E3165E9163B0CB200F64999 /* Remote.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164CE163B0CB100F64999 /* Remote.o */; }; - 1E3165EA163B0CB200F64999 /* SingleFactor.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164CF163B0CB100F64999 /* SingleFactor.o */; }; - 1E3165EB163B0CB200F64999 /* SRI.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164D0163B0CB100F64999 /* SRI.o */; }; - 1E3165EC163B0CB200F64999 /* Base.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164D2163B0CB100F64999 /* Base.o */; }; - 1E3165ED163B0CB200F64999 /* Factory.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164D3163B0CB100F64999 /* Factory.o */; }; - 1E3165EE163B0CB200F64999 /* Implementation.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164D4163B0CB100F64999 /* Implementation.o */; }; - 1E3165EF163B0CB200F64999 /* IRST.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164D5163B0CB100F64999 /* IRST.o */; }; - 1E3165F0163B0CB200F64999 /* Joint.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164D6163B0CB100F64999 /* Joint.o */; }; - 1E3165F1163B0CB200F64999 /* Ken.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164D7163B0CB100F64999 /* Ken.o */; }; - 1E3165F2163B0CB200F64999 /* MultiFactor.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164D8163B0CB100F64999 /* MultiFactor.o */; }; - 1E3165F3163B0CB200F64999 /* ParallelBackoff.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164D9163B0CB100F64999 /* ParallelBackoff.o */; }; - 1E3165F4163B0CB200F64999 /* Remote.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164DA163B0CB100F64999 /* Remote.o */; }; - 1E3165F5163B0CB200F64999 /* SingleFactor.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164DB163B0CB100F64999 /* SingleFactor.o */; }; - 1E3165F6163B0CB200F64999 /* SRI.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164DC163B0CB100F64999 /* SRI.o */; }; - 1E3165F7163B0CB200F64999 /* Base.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164DF163B0CB100F64999 /* Base.o */; }; - 1E3165F8163B0CB200F64999 /* Factory.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164E0163B0CB100F64999 /* Factory.o */; }; - 1E3165F9163B0CB200F64999 /* Implementation.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164E1163B0CB100F64999 /* Implementation.o */; }; - 1E3165FA163B0CB200F64999 /* Joint.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164E2163B0CB100F64999 /* Joint.o */; }; - 1E3165FB163B0CB200F64999 /* Ken.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164E3163B0CB100F64999 /* Ken.o */; }; - 1E3165FC163B0CB200F64999 /* libLM.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164E4163B0CB100F64999 /* libLM.a */; }; - 1E3165FD163B0CB200F64999 /* MultiFactor.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164E5163B0CB100F64999 /* MultiFactor.o */; }; - 1E3165FE163B0CB200F64999 /* Remote.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164E6163B0CB100F64999 /* Remote.o */; }; - 1E3165FF163B0CB200F64999 /* SingleFactor.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164E7163B0CB100F64999 /* SingleFactor.o */; }; - 1E316600163B0CB200F64999 /* Base.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164ED163B0CB100F64999 /* Base.o */; }; - 1E316601163B0CB200F64999 /* Factory.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164EE163B0CB100F64999 /* Factory.o */; }; - 1E316602163B0CB200F64999 /* Implementation.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164EF163B0CB100F64999 /* Implementation.o */; }; - 1E316603163B0CB200F64999 /* Joint.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164F0163B0CB100F64999 /* Joint.o */; }; - 1E316604163B0CB200F64999 /* Ken.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164F1163B0CB100F64999 /* Ken.o */; }; - 1E316605163B0CB200F64999 /* libLM.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164F2163B0CB100F64999 /* libLM.a */; }; - 1E316606163B0CB200F64999 /* MultiFactor.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164F3163B0CB100F64999 /* MultiFactor.o */; }; - 1E316607163B0CB200F64999 /* Remote.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164F4163B0CB100F64999 /* Remote.o */; }; - 1E316608163B0CB200F64999 /* SingleFactor.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E3164F5163B0CB100F64999 /* SingleFactor.o */; }; - 1E316609163B0CB200F64999 /* Factory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E3164F7163B0CB100F64999 /* Factory.cpp */; }; - 1E31660A163B0CB200F64999 /* Factory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E3164F8163B0CB100F64999 /* Factory.h */; }; - 1E31660B163B0CB200F64999 /* Implementation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E3164F9163B0CB100F64999 /* Implementation.cpp */; }; - 1E31660C163B0CB200F64999 /* Implementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E3164FA163B0CB100F64999 /* Implementation.h */; }; - 1E31660D163B0CB200F64999 /* IRST.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E3164FB163B0CB100F64999 /* IRST.cpp */; }; - 1E31660E163B0CB200F64999 /* IRST.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E3164FC163B0CB100F64999 /* IRST.h */; }; - 1E31660F163B0CB200F64999 /* Jamfile in Sources */ = {isa = PBXBuildFile; fileRef = 1E3164FD163B0CB100F64999 /* Jamfile */; }; - 1E316610163B0CB200F64999 /* Joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E3164FE163B0CB100F64999 /* Joint.cpp */; }; - 1E316611163B0CB200F64999 /* Joint.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E3164FF163B0CB100F64999 /* Joint.h */; }; - 1E316612163B0CB200F64999 /* Ken.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316500163B0CB100F64999 /* Ken.cpp */; }; - 1E316613163B0CB200F64999 /* Ken.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316501163B0CB100F64999 /* Ken.h */; }; - 1E316615163B0CB200F64999 /* LDHT.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316503163B0CB100F64999 /* LDHT.h */; }; - 1E316616163B0CB200F64999 /* MultiFactor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316504163B0CB100F64999 /* MultiFactor.cpp */; }; - 1E316617163B0CB200F64999 /* MultiFactor.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316505163B0CB100F64999 /* MultiFactor.h */; }; - 1E316618163B0CB200F64999 /* ORLM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316506163B0CB100F64999 /* ORLM.cpp */; }; - 1E316619163B0CB200F64999 /* ORLM.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316507163B0CB100F64999 /* ORLM.h */; }; - 1E31661A163B0CB200F64999 /* ParallelBackoff.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316508163B0CB100F64999 /* ParallelBackoff.cpp */; }; - 1E31661B163B0CB200F64999 /* ParallelBackoff.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316509163B0CB100F64999 /* ParallelBackoff.h */; }; - 1E31661E163B0CB200F64999 /* Remote.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E31650C163B0CB100F64999 /* Remote.cpp */; }; - 1E31661F163B0CB200F64999 /* Remote.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31650D163B0CB100F64999 /* Remote.h */; }; - 1E316620163B0CB200F64999 /* SingleFactor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E31650E163B0CB100F64999 /* SingleFactor.cpp */; }; - 1E316621163B0CB200F64999 /* SingleFactor.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31650F163B0CB100F64999 /* SingleFactor.h */; }; - 1E316622163B0CB200F64999 /* SRI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316510163B0CB100F64999 /* SRI.cpp */; }; - 1E316623163B0CB200F64999 /* SRI.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316511163B0CB100F64999 /* SRI.h */; }; - 1E316624163B0CB200F64999 /* MockHypothesis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316513163B0CB100F64999 /* MockHypothesis.cpp */; }; - 1E316625163B0CB200F64999 /* MockHypothesis.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316514163B0CB100F64999 /* MockHypothesis.h */; }; - 1E316628163B0CB200F64999 /* PhraseBoundaryFeature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316518163B0CB100F64999 /* PhraseBoundaryFeature.cpp */; }; - 1E316629163B0CB200F64999 /* PhraseBoundaryFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316519163B0CB100F64999 /* PhraseBoundaryFeature.h */; }; - 1E31662A163B0CB200F64999 /* PhraseLengthFeature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E31651A163B0CB100F64999 /* PhraseLengthFeature.cpp */; }; - 1E31662B163B0CB200F64999 /* PhraseLengthFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31651B163B0CB100F64999 /* PhraseLengthFeature.h */; }; - 1E31662C163B0CB200F64999 /* PhrasePairFeature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E31651C163B0CB100F64999 /* PhrasePairFeature.cpp */; }; - 1E31662D163B0CB200F64999 /* PhrasePairFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31651D163B0CB100F64999 /* PhrasePairFeature.h */; }; - 1E31662E163B0CB200F64999 /* libRuleTable.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316525163B0CB100F64999 /* libRuleTable.a */; }; - 1E31662F163B0CB200F64999 /* LoaderCompact.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316526163B0CB100F64999 /* LoaderCompact.o */; }; - 1E316630163B0CB200F64999 /* LoaderFactory.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316527163B0CB100F64999 /* LoaderFactory.o */; }; - 1E316631163B0CB200F64999 /* LoaderHiero.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316528163B0CB100F64999 /* LoaderHiero.o */; }; - 1E316632163B0CB200F64999 /* LoaderStandard.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316529163B0CB100F64999 /* LoaderStandard.o */; }; - 1E316633163B0CB200F64999 /* PhraseDictionaryALSuffixArray.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31652A163B0CB100F64999 /* PhraseDictionaryALSuffixArray.o */; }; - 1E316634163B0CB200F64999 /* PhraseDictionaryFuzzyMatch.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31652B163B0CB100F64999 /* PhraseDictionaryFuzzyMatch.o */; }; - 1E316635163B0CB200F64999 /* PhraseDictionaryNodeSCFG.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31652C163B0CB100F64999 /* PhraseDictionaryNodeSCFG.o */; }; - 1E316636163B0CB200F64999 /* PhraseDictionaryOnDisk.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31652D163B0CB100F64999 /* PhraseDictionaryOnDisk.o */; }; - 1E316637163B0CB200F64999 /* PhraseDictionarySCFG.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31652E163B0CB100F64999 /* PhraseDictionarySCFG.o */; }; - 1E316638163B0CB200F64999 /* Trie.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31652F163B0CB100F64999 /* Trie.o */; }; - 1E316639163B0CB200F64999 /* UTrie.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316530163B0CB100F64999 /* UTrie.o */; }; - 1E31663A163B0CB200F64999 /* UTrieNode.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316531163B0CB100F64999 /* UTrieNode.o */; }; - 1E31663B163B0CB200F64999 /* libRuleTable.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316537163B0CB100F64999 /* libRuleTable.a */; }; - 1E31663C163B0CB200F64999 /* LoaderCompact.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316538163B0CB100F64999 /* LoaderCompact.o */; }; - 1E31663D163B0CB200F64999 /* LoaderFactory.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316539163B0CB100F64999 /* LoaderFactory.o */; }; - 1E31663E163B0CB200F64999 /* LoaderHiero.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31653A163B0CB100F64999 /* LoaderHiero.o */; }; - 1E31663F163B0CB200F64999 /* LoaderStandard.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31653B163B0CB100F64999 /* LoaderStandard.o */; }; - 1E316640163B0CB200F64999 /* PhraseDictionaryALSuffixArray.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31653C163B0CB100F64999 /* PhraseDictionaryALSuffixArray.o */; }; - 1E316641163B0CB200F64999 /* PhraseDictionaryFuzzyMatch.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31653D163B0CB100F64999 /* PhraseDictionaryFuzzyMatch.o */; }; - 1E316642163B0CB200F64999 /* PhraseDictionaryNodeSCFG.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31653E163B0CB100F64999 /* PhraseDictionaryNodeSCFG.o */; }; - 1E316643163B0CB200F64999 /* PhraseDictionaryOnDisk.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31653F163B0CB100F64999 /* PhraseDictionaryOnDisk.o */; }; - 1E316644163B0CB200F64999 /* PhraseDictionarySCFG.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316540163B0CB100F64999 /* PhraseDictionarySCFG.o */; }; - 1E316645163B0CB200F64999 /* PhraseDictionaryTMExtract.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316541163B0CB100F64999 /* PhraseDictionaryTMExtract.o */; }; - 1E316646163B0CB200F64999 /* Trie.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316542163B0CB100F64999 /* Trie.o */; }; - 1E316647163B0CB200F64999 /* UTrie.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316543163B0CB100F64999 /* UTrie.o */; }; - 1E316648163B0CB200F64999 /* UTrieNode.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316544163B0CB100F64999 /* UTrieNode.o */; }; - 1E316649163B0CB200F64999 /* LoaderCompact.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316546163B0CB100F64999 /* LoaderCompact.o */; }; - 1E31664A163B0CB200F64999 /* LoaderFactory.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316547163B0CB100F64999 /* LoaderFactory.o */; }; - 1E31664B163B0CB200F64999 /* LoaderHiero.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316548163B0CB100F64999 /* LoaderHiero.o */; }; - 1E31664C163B0CB200F64999 /* LoaderStandard.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316549163B0CB100F64999 /* LoaderStandard.o */; }; - 1E31664D163B0CB200F64999 /* PhraseDictionaryALSuffixArray.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31654A163B0CB100F64999 /* PhraseDictionaryALSuffixArray.o */; }; - 1E31664E163B0CB200F64999 /* PhraseDictionaryNodeSCFG.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31654B163B0CB100F64999 /* PhraseDictionaryNodeSCFG.o */; }; - 1E31664F163B0CB200F64999 /* PhraseDictionaryOnDisk.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31654C163B0CB100F64999 /* PhraseDictionaryOnDisk.o */; }; - 1E316650163B0CB200F64999 /* PhraseDictionarySCFG.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31654D163B0CB100F64999 /* PhraseDictionarySCFG.o */; }; - 1E316651163B0CB200F64999 /* Trie.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31654E163B0CB100F64999 /* Trie.o */; }; - 1E316652163B0CB200F64999 /* UTrie.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31654F163B0CB100F64999 /* UTrie.o */; }; - 1E316653163B0CB200F64999 /* UTrieNode.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316550163B0CB100F64999 /* UTrieNode.o */; }; - 1E316654163B0CB200F64999 /* Jamfile in Sources */ = {isa = PBXBuildFile; fileRef = 1E316551163B0CB100F64999 /* Jamfile */; }; - 1E316655163B0CB200F64999 /* Loader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316552163B0CB100F64999 /* Loader.h */; }; - 1E316656163B0CB200F64999 /* LoaderCompact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316553163B0CB100F64999 /* LoaderCompact.cpp */; }; - 1E316657163B0CB200F64999 /* LoaderCompact.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316554163B0CB100F64999 /* LoaderCompact.h */; }; - 1E316658163B0CB200F64999 /* LoaderFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316555163B0CB100F64999 /* LoaderFactory.cpp */; }; - 1E316659163B0CB200F64999 /* LoaderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316556163B0CB100F64999 /* LoaderFactory.h */; }; - 1E31665A163B0CB200F64999 /* LoaderHiero.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316557163B0CB100F64999 /* LoaderHiero.cpp */; }; - 1E31665B163B0CB200F64999 /* LoaderHiero.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316558163B0CB100F64999 /* LoaderHiero.h */; }; - 1E31665C163B0CB200F64999 /* LoaderStandard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316559163B0CB100F64999 /* LoaderStandard.cpp */; }; - 1E31665D163B0CB200F64999 /* LoaderStandard.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31655A163B0CB100F64999 /* LoaderStandard.h */; }; - 1E31665E163B0CB200F64999 /* PhraseDictionaryALSuffixArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E31655B163B0CB100F64999 /* PhraseDictionaryALSuffixArray.cpp */; }; - 1E31665F163B0CB200F64999 /* PhraseDictionaryALSuffixArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31655C163B0CB100F64999 /* PhraseDictionaryALSuffixArray.h */; }; - 1E316660163B0CB200F64999 /* PhraseDictionaryFuzzyMatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E31655D163B0CB100F64999 /* PhraseDictionaryFuzzyMatch.cpp */; }; - 1E316661163B0CB200F64999 /* PhraseDictionaryFuzzyMatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31655E163B0CB100F64999 /* PhraseDictionaryFuzzyMatch.h */; }; - 1E316662163B0CB200F64999 /* PhraseDictionaryNodeSCFG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E31655F163B0CB100F64999 /* PhraseDictionaryNodeSCFG.cpp */; }; - 1E316663163B0CB200F64999 /* PhraseDictionaryNodeSCFG.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316560163B0CB100F64999 /* PhraseDictionaryNodeSCFG.h */; }; - 1E316664163B0CB200F64999 /* PhraseDictionaryOnDisk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316561163B0CB100F64999 /* PhraseDictionaryOnDisk.cpp */; }; - 1E316665163B0CB200F64999 /* PhraseDictionaryOnDisk.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316562163B0CB100F64999 /* PhraseDictionaryOnDisk.h */; }; - 1E316666163B0CB200F64999 /* PhraseDictionarySCFG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316563163B0CB100F64999 /* PhraseDictionarySCFG.cpp */; }; - 1E316667163B0CB200F64999 /* PhraseDictionarySCFG.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316564163B0CB100F64999 /* PhraseDictionarySCFG.h */; }; - 1E316668163B0CB200F64999 /* Trie.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316565163B0CB100F64999 /* Trie.cpp */; }; - 1E316669163B0CB200F64999 /* Trie.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316566163B0CB100F64999 /* Trie.h */; }; - 1E31666A163B0CB200F64999 /* UTrie.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316567163B0CB100F64999 /* UTrie.cpp */; }; - 1E31666B163B0CB200F64999 /* UTrie.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316568163B0CB100F64999 /* UTrie.h */; }; - 1E31666C163B0CB200F64999 /* UTrieNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316569163B0CB100F64999 /* UTrieNode.cpp */; }; - 1E31666D163B0CB200F64999 /* UTrieNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31656A163B0CB100F64999 /* UTrieNode.h */; }; - 1E31666E163B0CB200F64999 /* ApplicableRuleTrie.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E31656C163B0CB100F64999 /* ApplicableRuleTrie.cpp */; }; - 1E31666F163B0CB200F64999 /* ApplicableRuleTrie.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31656D163B0CB100F64999 /* ApplicableRuleTrie.h */; }; - 1E316670163B0CB200F64999 /* ApplicableRuleTrie.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316574163B0CB200F64999 /* ApplicableRuleTrie.o */; }; - 1E316671163B0CB200F64999 /* libScope3Parser.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316575163B0CB200F64999 /* libScope3Parser.a */; }; - 1E316672163B0CB200F64999 /* Parser.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316576163B0CB200F64999 /* Parser.o */; }; - 1E316673163B0CB200F64999 /* StackLatticeBuilder.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316577163B0CB200F64999 /* StackLatticeBuilder.o */; }; - 1E316674163B0CB200F64999 /* VarSpanTrieBuilder.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316578163B0CB200F64999 /* VarSpanTrieBuilder.o */; }; - 1E316675163B0CB200F64999 /* ApplicableRuleTrie.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31657E163B0CB200F64999 /* ApplicableRuleTrie.o */; }; - 1E316676163B0CB200F64999 /* libScope3Parser.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E31657F163B0CB200F64999 /* libScope3Parser.a */; }; - 1E316677163B0CB200F64999 /* Parser.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316580163B0CB200F64999 /* Parser.o */; }; - 1E316678163B0CB200F64999 /* StackLatticeBuilder.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316581163B0CB200F64999 /* StackLatticeBuilder.o */; }; - 1E316679163B0CB200F64999 /* VarSpanTrieBuilder.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316582163B0CB200F64999 /* VarSpanTrieBuilder.o */; }; - 1E31667A163B0CB200F64999 /* ApplicableRuleTrie.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316584163B0CB200F64999 /* ApplicableRuleTrie.o */; }; - 1E31667B163B0CB200F64999 /* Parser.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316585163B0CB200F64999 /* Parser.o */; }; - 1E31667C163B0CB200F64999 /* StackLatticeBuilder.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316586163B0CB200F64999 /* StackLatticeBuilder.o */; }; - 1E31667D163B0CB200F64999 /* VarSpanTrieBuilder.o in Frameworks */ = {isa = PBXBuildFile; fileRef = 1E316587163B0CB200F64999 /* VarSpanTrieBuilder.o */; }; - 1E31667E163B0CB200F64999 /* IntermediateVarSpanNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316588163B0CB200F64999 /* IntermediateVarSpanNode.h */; }; - 1E31667F163B0CB200F64999 /* Jamfile in Sources */ = {isa = PBXBuildFile; fileRef = 1E316589163B0CB200F64999 /* Jamfile */; }; - 1E316680163B0CB200F64999 /* Parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E31658A163B0CB200F64999 /* Parser.cpp */; }; - 1E316681163B0CB200F64999 /* Parser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31658B163B0CB200F64999 /* Parser.h */; }; - 1E316682163B0CB200F64999 /* SentenceMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31658C163B0CB200F64999 /* SentenceMap.h */; }; - 1E316683163B0CB200F64999 /* StackLattice.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31658D163B0CB200F64999 /* StackLattice.h */; }; - 1E316684163B0CB200F64999 /* StackLatticeBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E31658E163B0CB200F64999 /* StackLatticeBuilder.cpp */; }; - 1E316685163B0CB200F64999 /* StackLatticeBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31658F163B0CB200F64999 /* StackLatticeBuilder.h */; }; - 1E316686163B0CB200F64999 /* StackLatticeSearcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316590163B0CB200F64999 /* StackLatticeSearcher.h */; }; - 1E316687163B0CB200F64999 /* VarSpanNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316591163B0CB200F64999 /* VarSpanNode.h */; }; - 1E316688163B0CB200F64999 /* VarSpanTrieBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316592163B0CB200F64999 /* VarSpanTrieBuilder.cpp */; }; - 1E316689163B0CB200F64999 /* VarSpanTrieBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316593163B0CB200F64999 /* VarSpanTrieBuilder.h */; }; - 1E31668A163B0CB200F64999 /* ScoreComponentCollectionTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316594163B0CB200F64999 /* ScoreComponentCollectionTest.cpp */; }; - 1E31668B163B0CB200F64999 /* SourceWordDeletionFeature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316595163B0CB200F64999 /* SourceWordDeletionFeature.cpp */; }; - 1E31668C163B0CB200F64999 /* SourceWordDeletionFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316596163B0CB200F64999 /* SourceWordDeletionFeature.h */; }; - 1E31668D163B0CB200F64999 /* SparsePhraseDictionaryFeature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E316597163B0CB200F64999 /* SparsePhraseDictionaryFeature.cpp */; }; - 1E31668E163B0CB200F64999 /* SparsePhraseDictionaryFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E316598163B0CB200F64999 /* SparsePhraseDictionaryFeature.h */; }; - 1E316690163B0CB200F64999 /* StackVec.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E31659B163B0CB200F64999 /* StackVec.h */; }; - 1E316696163B0CB200F64999 /* TargetBigramFeature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E3165A2163B0CB200F64999 /* TargetBigramFeature.cpp */; }; - 1E316697163B0CB200F64999 /* TargetBigramFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E3165A3163B0CB200F64999 /* TargetBigramFeature.h */; }; - 1E316698163B0CB200F64999 /* TargetBigramFeatureTest.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E3165A4163B0CB200F64999 /* TargetBigramFeatureTest.cpp */; }; - 1E316699163B0CB200F64999 /* TargetNgramFeature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E3165A5163B0CB200F64999 /* TargetNgramFeature.cpp */; }; - 1E31669A163B0CB200F64999 /* TargetNgramFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E3165A6163B0CB200F64999 /* TargetNgramFeature.h */; }; - 1E31669B163B0CB200F64999 /* TargetWordInsertionFeature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E3165A7163B0CB200F64999 /* TargetWordInsertionFeature.cpp */; }; - 1E31669C163B0CB200F64999 /* TargetWordInsertionFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E3165A8163B0CB200F64999 /* TargetWordInsertionFeature.h */; }; - 1E31669D163B0CB200F64999 /* Terminal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E3165A9163B0CB200F64999 /* Terminal.h */; }; - 1E365EEA16120F4600BA335B /* ChartTranslationOptions.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E365EE816120F4600BA335B /* ChartTranslationOptions.cpp */; }; - 1E365EEB16120F4600BA335B /* ChartTranslationOptions.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E365EE916120F4600BA335B /* ChartTranslationOptions.h */; }; - 1E619EA115B8713700C2D7A7 /* ChartRuleLookupManagerMemoryPerSentence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E619E9F15B8713600C2D7A7 /* ChartRuleLookupManagerMemoryPerSentence.cpp */; }; - 1E619EA215B8713700C2D7A7 /* ChartRuleLookupManagerMemoryPerSentence.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E619EA015B8713700C2D7A7 /* ChartRuleLookupManagerMemoryPerSentence.h */; }; - 1E6D9FD615D027560064D436 /* BlockHashIndex.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E6D9FBD15D027560064D436 /* BlockHashIndex.cpp */; }; - 1E6D9FD715D027560064D436 /* BlockHashIndex.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E6D9FBE15D027560064D436 /* BlockHashIndex.h */; }; - 1E6D9FD815D027560064D436 /* CanonicalHuffman.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E6D9FBF15D027560064D436 /* CanonicalHuffman.h */; }; - 1E6D9FD915D027560064D436 /* CmphStringVectorAdapter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E6D9FC015D027560064D436 /* CmphStringVectorAdapter.cpp */; }; - 1E6D9FDA15D027560064D436 /* CmphStringVectorAdapter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E6D9FC115D027560064D436 /* CmphStringVectorAdapter.h */; }; - 1E6D9FDB15D027560064D436 /* ConsistantPhrases.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E6D9FC215D027560064D436 /* ConsistantPhrases.h */; }; - 1E6D9FDD15D027560064D436 /* LexicalReorderingTableCompact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E6D9FC415D027560064D436 /* LexicalReorderingTableCompact.cpp */; }; - 1E6D9FDE15D027560064D436 /* LexicalReorderingTableCompact.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E6D9FC515D027560064D436 /* LexicalReorderingTableCompact.h */; }; - 1E6D9FDF15D027560064D436 /* LexicalReorderingTableCreator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E6D9FC615D027560064D436 /* LexicalReorderingTableCreator.cpp */; }; - 1E6D9FE015D027560064D436 /* LexicalReorderingTableCreator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E6D9FC715D027560064D436 /* LexicalReorderingTableCreator.h */; }; - 1E6D9FE115D027560064D436 /* ListCoders.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E6D9FC815D027560064D436 /* ListCoders.h */; }; - 1E6D9FE215D027560064D436 /* MmapAllocator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E6D9FC915D027560064D436 /* MmapAllocator.h */; }; - 1E6D9FE315D027560064D436 /* MonotonicVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E6D9FCA15D027560064D436 /* MonotonicVector.h */; }; - 1E6D9FE415D027560064D436 /* MurmurHash3.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E6D9FCB15D027560064D436 /* MurmurHash3.cpp */; }; - 1E6D9FE515D027560064D436 /* MurmurHash3.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E6D9FCC15D027560064D436 /* MurmurHash3.h */; }; - 1E6D9FE615D027560064D436 /* PackedArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E6D9FCD15D027560064D436 /* PackedArray.h */; }; - 1E6D9FE715D027560064D436 /* PhraseDecoder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E6D9FCE15D027560064D436 /* PhraseDecoder.cpp */; }; - 1E6D9FE815D027560064D436 /* PhraseDecoder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E6D9FCF15D027560064D436 /* PhraseDecoder.h */; }; - 1E6D9FE915D027560064D436 /* PhraseDictionaryCompact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E6D9FD015D027560064D436 /* PhraseDictionaryCompact.cpp */; }; - 1E6D9FEA15D027560064D436 /* PhraseDictionaryCompact.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E6D9FD115D027560064D436 /* PhraseDictionaryCompact.h */; }; - 1E6D9FEB15D027560064D436 /* PhraseTableCreator.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E6D9FD215D027560064D436 /* PhraseTableCreator.cpp */; }; - 1E6D9FEC15D027560064D436 /* PhraseTableCreator.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E6D9FD315D027560064D436 /* PhraseTableCreator.h */; }; - 1E6D9FED15D027560064D436 /* StringVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E6D9FD415D027560064D436 /* StringVector.h */; }; - 1E6D9FEE15D027560064D436 /* TargetPhraseCollectionCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E6D9FD515D027560064D436 /* TargetPhraseCollectionCache.h */; }; - 1E879EA715A346F90051F346 /* SearchNormalBatch.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1E879EA515A346F90051F346 /* SearchNormalBatch.cpp */; }; - 1E879EA815A346F90051F346 /* SearchNormalBatch.h in Headers */ = {isa = PBXBuildFile; fileRef = 1E879EA615A346F90051F346 /* SearchNormalBatch.h */; }; - 1EAC363514CDC79300DF97C3 /* Loader.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EAC362C14CDC79300DF97C3 /* Loader.h */; }; - 1EAC363614CDC79300DF97C3 /* LoaderCompact.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EAC362D14CDC79300DF97C3 /* LoaderCompact.cpp */; }; - 1EAC363714CDC79300DF97C3 /* LoaderCompact.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EAC362E14CDC79300DF97C3 /* LoaderCompact.h */; }; - 1EAC363814CDC79300DF97C3 /* LoaderFactory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EAC362F14CDC79300DF97C3 /* LoaderFactory.cpp */; }; - 1EAC363914CDC79300DF97C3 /* LoaderFactory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EAC363014CDC79300DF97C3 /* LoaderFactory.h */; }; - 1EAC363A14CDC79300DF97C3 /* LoaderHiero.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EAC363114CDC79300DF97C3 /* LoaderHiero.cpp */; }; - 1EAC363B14CDC79300DF97C3 /* LoaderHiero.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EAC363214CDC79300DF97C3 /* LoaderHiero.h */; }; - 1EAC363C14CDC79300DF97C3 /* LoaderStandard.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EAC363314CDC79300DF97C3 /* LoaderStandard.cpp */; }; - 1EAC363D14CDC79300DF97C3 /* LoaderStandard.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EAC363414CDC79300DF97C3 /* LoaderStandard.h */; }; - 1EBC53A0164C44FC00ADFA2C /* WordTranslationFeature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EBC539E164C44FC00ADFA2C /* WordTranslationFeature.cpp */; }; - 1EBC53A1164C44FC00ADFA2C /* WordTranslationFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC539F164C44FC00ADFA2C /* WordTranslationFeature.h */; }; - 1EC32DB815D2D90700A313B1 /* ThrowingFwrite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC32DB615D2D90700A313B1 /* ThrowingFwrite.cpp */; }; - 1EC32DB915D2D90700A313B1 /* ThrowingFwrite.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC32DB715D2D90700A313B1 /* ThrowingFwrite.h */; }; - 1EC7374614B977AB00238410 /* AlignmentInfo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC735D314B977AA00238410 /* AlignmentInfo.cpp */; }; - 1EC7374714B977AB00238410 /* AlignmentInfo.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735D414B977AA00238410 /* AlignmentInfo.h */; }; - 1EC7374814B977AB00238410 /* AlignmentInfoCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC735D514B977AA00238410 /* AlignmentInfoCollection.cpp */; }; - 1EC7374914B977AB00238410 /* AlignmentInfoCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735D614B977AA00238410 /* AlignmentInfoCollection.h */; }; - 1EC7374A14B977AB00238410 /* BilingualDynSuffixArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC735D714B977AA00238410 /* BilingualDynSuffixArray.cpp */; }; - 1EC7374B14B977AB00238410 /* BilingualDynSuffixArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735D814B977AA00238410 /* BilingualDynSuffixArray.h */; }; - 1EC7374C14B977AB00238410 /* BitmapContainer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC735D914B977AA00238410 /* BitmapContainer.cpp */; }; - 1EC7374D14B977AB00238410 /* BitmapContainer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735DA14B977AA00238410 /* BitmapContainer.h */; }; - 1EC7374F14B977AB00238410 /* ChartCell.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC735DC14B977AA00238410 /* ChartCell.cpp */; }; - 1EC7375014B977AB00238410 /* ChartCell.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735DD14B977AA00238410 /* ChartCell.h */; }; - 1EC7375114B977AB00238410 /* ChartCellCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC735DE14B977AA00238410 /* ChartCellCollection.cpp */; }; - 1EC7375214B977AB00238410 /* ChartCellCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735DF14B977AA00238410 /* ChartCellCollection.h */; }; - 1EC7375314B977AB00238410 /* ChartCellLabel.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735E014B977AA00238410 /* ChartCellLabel.h */; }; - 1EC7375414B977AB00238410 /* ChartCellLabelSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735E114B977AA00238410 /* ChartCellLabelSet.h */; }; - 1EC7375514B977AB00238410 /* ChartHypothesis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC735E214B977AA00238410 /* ChartHypothesis.cpp */; }; - 1EC7375614B977AB00238410 /* ChartHypothesis.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735E314B977AA00238410 /* ChartHypothesis.h */; }; - 1EC7375714B977AB00238410 /* ChartHypothesisCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC735E414B977AA00238410 /* ChartHypothesisCollection.cpp */; }; - 1EC7375814B977AB00238410 /* ChartHypothesisCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735E514B977AA00238410 /* ChartHypothesisCollection.h */; }; - 1EC7375914B977AB00238410 /* ChartManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC735E614B977AA00238410 /* ChartManager.cpp */; }; - 1EC7375A14B977AB00238410 /* ChartManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735E714B977AA00238410 /* ChartManager.h */; }; - 1EC7375C14B977AB00238410 /* ChartRuleLookupManager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735E914B977AA00238410 /* ChartRuleLookupManager.h */; }; - 1EC7376514B977AB00238410 /* ChartTranslationOptionList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC735F214B977AA00238410 /* ChartTranslationOptionList.cpp */; }; - 1EC7376614B977AB00238410 /* ChartTranslationOptionList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735F314B977AA00238410 /* ChartTranslationOptionList.h */; }; - 1EC7376714B977AB00238410 /* ChartTrellisDetour.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC735F414B977AA00238410 /* ChartTrellisDetour.cpp */; }; - 1EC7376814B977AB00238410 /* ChartTrellisDetour.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735F514B977AA00238410 /* ChartTrellisDetour.h */; }; - 1EC7376914B977AB00238410 /* ChartTrellisDetourQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC735F614B977AA00238410 /* ChartTrellisDetourQueue.cpp */; }; - 1EC7376A14B977AB00238410 /* ChartTrellisDetourQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735F714B977AA00238410 /* ChartTrellisDetourQueue.h */; }; - 1EC7376B14B977AB00238410 /* ChartTrellisNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC735F814B977AA00238410 /* ChartTrellisNode.cpp */; }; - 1EC7376C14B977AB00238410 /* ChartTrellisNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735F914B977AA00238410 /* ChartTrellisNode.h */; }; - 1EC7376D14B977AB00238410 /* ChartTrellisPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC735FA14B977AA00238410 /* ChartTrellisPath.cpp */; }; - 1EC7376E14B977AB00238410 /* ChartTrellisPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735FB14B977AA00238410 /* ChartTrellisPath.h */; }; - 1EC7376F14B977AB00238410 /* ChartTrellisPathList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735FC14B977AA00238410 /* ChartTrellisPathList.h */; }; - 1EC7377014B977AB00238410 /* ConfusionNet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC735FD14B977AA00238410 /* ConfusionNet.cpp */; }; - 1EC7377114B977AB00238410 /* ConfusionNet.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC735FE14B977AA00238410 /* ConfusionNet.h */; }; - 1EC7377214B977AB00238410 /* DecodeFeature.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC735FF14B977AA00238410 /* DecodeFeature.cpp */; }; - 1EC7377314B977AB00238410 /* DecodeFeature.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7360014B977AA00238410 /* DecodeFeature.h */; }; - 1EC7377414B977AB00238410 /* DecodeGraph.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7360114B977AA00238410 /* DecodeGraph.cpp */; }; - 1EC7377514B977AB00238410 /* DecodeGraph.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7360214B977AA00238410 /* DecodeGraph.h */; }; - 1EC7377614B977AB00238410 /* DecodeStep.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7360314B977AA00238410 /* DecodeStep.cpp */; }; - 1EC7377714B977AB00238410 /* DecodeStep.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7360414B977AA00238410 /* DecodeStep.h */; }; - 1EC7377814B977AB00238410 /* DecodeStepGeneration.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7360514B977AA00238410 /* DecodeStepGeneration.cpp */; }; - 1EC7377914B977AB00238410 /* DecodeStepGeneration.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7360614B977AA00238410 /* DecodeStepGeneration.h */; }; - 1EC7377A14B977AB00238410 /* DecodeStepTranslation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7360714B977AA00238410 /* DecodeStepTranslation.cpp */; }; - 1EC7377B14B977AB00238410 /* DecodeStepTranslation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7360814B977AA00238410 /* DecodeStepTranslation.h */; }; - 1EC7377C14B977AB00238410 /* Dictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7360914B977AA00238410 /* Dictionary.cpp */; }; - 1EC7377D14B977AB00238410 /* Dictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7360A14B977AA00238410 /* Dictionary.h */; }; - 1EC7378414B977AB00238410 /* DummyScoreProducers.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7361114B977AA00238410 /* DummyScoreProducers.cpp */; }; - 1EC7378514B977AB00238410 /* DummyScoreProducers.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7361214B977AA00238410 /* DummyScoreProducers.h */; }; - 1EC7378614B977AB00238410 /* fdstream.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7361414B977AA00238410 /* fdstream.h */; }; - 1EC7378914B977AB00238410 /* hash.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7361714B977AA00238410 /* hash.h */; }; - 1EC7378A14B977AB00238410 /* onlineRLM.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7361914B977AA00238410 /* onlineRLM.h */; }; - 1EC7378B14B977AB00238410 /* params.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7361B14B977AA00238410 /* params.cpp */; }; - 1EC7378C14B977AB00238410 /* params.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7361D14B977AA00238410 /* params.h */; }; - 1EC7378D14B977AB00238410 /* perfectHash.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7361F14B977AA00238410 /* perfectHash.h */; }; - 1EC7378E14B977AB00238410 /* quantizer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7362114B977AA00238410 /* quantizer.h */; }; - 1EC7378F14B977AB00238410 /* RandLMCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7362314B977AA00238410 /* RandLMCache.h */; }; - 1EC7379014B977AB00238410 /* RandLMFilter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7362514B977AA00238410 /* RandLMFilter.h */; }; - 1EC7379114B977AB00238410 /* types.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7362714B977AA00238410 /* types.h */; }; - 1EC7379214B977AB00238410 /* utils.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7362814B977AA00238410 /* utils.h */; }; - 1EC7379314B977AB00238410 /* vocab.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7362914B977AA00238410 /* vocab.cpp */; }; - 1EC7379414B977AB00238410 /* vocab.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7362B14B977AA00238410 /* vocab.h */; }; - 1EC7379514B977AB00238410 /* DynSuffixArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7362C14B977AA00238410 /* DynSuffixArray.cpp */; }; - 1EC7379614B977AB00238410 /* DynSuffixArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7362D14B977AA00238410 /* DynSuffixArray.h */; }; - 1EC7379714B977AB00238410 /* Factor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7362E14B977AA00238410 /* Factor.cpp */; }; - 1EC7379814B977AB00238410 /* Factor.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7362F14B977AA00238410 /* Factor.h */; }; - 1EC7379914B977AB00238410 /* FactorCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7363014B977AA00238410 /* FactorCollection.cpp */; }; - 1EC7379A14B977AB00238410 /* FactorCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7363114B977AA00238410 /* FactorCollection.h */; }; - 1EC7379B14B977AB00238410 /* FactorTypeSet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7363214B977AA00238410 /* FactorTypeSet.cpp */; }; - 1EC7379C14B977AB00238410 /* FactorTypeSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7363314B977AA00238410 /* FactorTypeSet.h */; }; - 1EC7379D14B977AB00238410 /* FeatureFunction.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7363414B977AA00238410 /* FeatureFunction.cpp */; }; - 1EC7379E14B977AB00238410 /* FeatureFunction.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7363514B977AA00238410 /* FeatureFunction.h */; }; - 1EC7379F14B977AB00238410 /* FFState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7363614B977AA00238410 /* FFState.cpp */; }; - 1EC737A014B977AB00238410 /* FFState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7363714B977AA00238410 /* FFState.h */; }; - 1EC737A114B977AB00238410 /* File.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7363814B977AA00238410 /* File.cpp */; }; - 1EC737A214B977AB00238410 /* File.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7363914B977AA00238410 /* File.h */; }; - 1EC737A314B977AB00238410 /* FilePtr.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7363A14B977AA00238410 /* FilePtr.h */; }; - 1EC737A414B977AB00238410 /* FloydWarshall.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7363B14B977AA00238410 /* FloydWarshall.cpp */; }; - 1EC737A514B977AB00238410 /* FloydWarshall.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7363C14B977AA00238410 /* FloydWarshall.h */; }; - 1EC737A614B977AB00238410 /* GenerationDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7363D14B977AA00238410 /* GenerationDictionary.cpp */; }; - 1EC737A714B977AB00238410 /* GenerationDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7363E14B977AA00238410 /* GenerationDictionary.h */; }; - 1EC737A814B977AB00238410 /* GlobalLexicalModel.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7363F14B977AA00238410 /* GlobalLexicalModel.cpp */; }; - 1EC737A914B977AB00238410 /* GlobalLexicalModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7364014B977AA00238410 /* GlobalLexicalModel.h */; }; - 1EC737AA14B977AB00238410 /* gzfilebuf.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7364114B977AA00238410 /* gzfilebuf.h */; }; - 1EC737AD14B977AB00238410 /* Hypothesis.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7364514B977AA00238410 /* Hypothesis.cpp */; }; - 1EC737AE14B977AB00238410 /* Hypothesis.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7364614B977AA00238410 /* Hypothesis.h */; }; - 1EC737AF14B977AB00238410 /* HypothesisStack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7364714B977AA00238410 /* HypothesisStack.cpp */; }; - 1EC737B014B977AB00238410 /* HypothesisStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7364814B977AA00238410 /* HypothesisStack.h */; }; - 1EC737B114B977AB00238410 /* HypothesisStackCubePruning.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7364914B977AA00238410 /* HypothesisStackCubePruning.cpp */; }; - 1EC737B214B977AB00238410 /* HypothesisStackCubePruning.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7364A14B977AA00238410 /* HypothesisStackCubePruning.h */; }; - 1EC737B314B977AB00238410 /* HypothesisStackNormal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7364B14B977AA00238410 /* HypothesisStackNormal.cpp */; }; - 1EC737B414B977AB00238410 /* HypothesisStackNormal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7364C14B977AA00238410 /* HypothesisStackNormal.h */; }; - 1EC737B514B977AB00238410 /* InputFileStream.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7364D14B977AA00238410 /* InputFileStream.cpp */; }; - 1EC737B614B977AB00238410 /* InputFileStream.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7364E14B977AA00238410 /* InputFileStream.h */; }; - 1EC737B714B977AB00238410 /* InputType.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7364F14B977AA00238410 /* InputType.cpp */; }; - 1EC737B814B977AB00238410 /* InputType.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7365014B977AA00238410 /* InputType.h */; }; - 1EC737BB14B977AB00238410 /* LexicalReordering.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7365414B977AA00238410 /* LexicalReordering.cpp */; }; - 1EC737BC14B977AB00238410 /* LexicalReordering.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7365514B977AA00238410 /* LexicalReordering.h */; }; - 1EC737BD14B977AB00238410 /* LexicalReorderingState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7365614B977AA00238410 /* LexicalReorderingState.cpp */; }; - 1EC737BE14B977AB00238410 /* LexicalReorderingState.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7365714B977AA00238410 /* LexicalReorderingState.h */; }; - 1EC737BF14B977AB00238410 /* LexicalReorderingTable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7365814B977AA00238410 /* LexicalReorderingTable.cpp */; }; - 1EC737C014B977AB00238410 /* LexicalReorderingTable.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7365914B977AA00238410 /* LexicalReorderingTable.h */; }; - 1EC737C114B977AB00238410 /* Base.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7365C14B977AA00238410 /* Base.cpp */; }; - 1EC737C214B977AB00238410 /* Base.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7365E14B977AA00238410 /* Base.h */; }; - 1EC737DA14B977AB00238410 /* Factory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7368714B977AA00238410 /* Factory.cpp */; }; - 1EC737DB14B977AB00238410 /* Factory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7368814B977AA00238410 /* Factory.h */; }; - 1EC737DC14B977AB00238410 /* Implementation.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7368914B977AA00238410 /* Implementation.cpp */; }; - 1EC737DD14B977AB00238410 /* Implementation.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7368B14B977AA00238410 /* Implementation.h */; }; - 1EC737DE14B977AB00238410 /* IRST.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7368D14B977AA00238410 /* IRST.cpp */; }; - 1EC737DF14B977AB00238410 /* IRST.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7368F14B977AA00238410 /* IRST.h */; }; - 1EC737E114B977AB00238410 /* Joint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7369114B977AA00238410 /* Joint.cpp */; }; - 1EC737E214B977AB00238410 /* Joint.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7369214B977AA00238410 /* Joint.h */; }; - 1EC737E314B977AB00238410 /* Ken.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7369314B977AA00238410 /* Ken.cpp */; }; - 1EC737E414B977AB00238410 /* Ken.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7369514B977AA00238410 /* Ken.h */; }; - 1EC737E514B977AB00238410 /* MultiFactor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7369714B977AA00238410 /* MultiFactor.cpp */; }; - 1EC737E614B977AB00238410 /* MultiFactor.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7369814B977AA00238410 /* MultiFactor.h */; }; - 1EC737E714B977AB00238410 /* ORLM.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7369914B977AA00238410 /* ORLM.cpp */; }; - 1EC737E814B977AB00238410 /* ORLM.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7369B14B977AA00238410 /* ORLM.h */; }; - 1EC737ED14B977AB00238410 /* Remote.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736A314B977AA00238410 /* Remote.cpp */; }; - 1EC737EE14B977AB00238410 /* Remote.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736A414B977AA00238410 /* Remote.h */; }; - 1EC737EF14B977AB00238410 /* SingleFactor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736A514B977AA00238410 /* SingleFactor.cpp */; }; - 1EC737F014B977AB00238410 /* SingleFactor.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736A614B977AA00238410 /* SingleFactor.h */; }; - 1EC737F114B977AB00238410 /* SRI.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736A714B977AA00238410 /* SRI.cpp */; }; - 1EC737F214B977AB00238410 /* SRI.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736A814B977AA00238410 /* SRI.h */; }; - 1EC737F314B977AB00238410 /* LMList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736A914B977AA00238410 /* LMList.cpp */; }; - 1EC737F414B977AB00238410 /* LMList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736AA14B977AA00238410 /* LMList.h */; }; - 1EC737F514B977AB00238410 /* LVoc.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736AB14B977AA00238410 /* LVoc.cpp */; }; - 1EC737F614B977AB00238410 /* LVoc.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736AC14B977AA00238410 /* LVoc.h */; }; - 1EC737F714B977AB00238410 /* Manager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736AD14B977AA00238410 /* Manager.cpp */; }; - 1EC737F814B977AB00238410 /* Manager.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736AE14B977AA00238410 /* Manager.h */; }; - 1EC737F914B977AB00238410 /* NonTerminal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736AF14B977AA00238410 /* NonTerminal.cpp */; }; - 1EC737FA14B977AB00238410 /* NonTerminal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736B014B977AA00238410 /* NonTerminal.h */; }; - 1EC737FB14B977AB00238410 /* ObjectPool.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736B114B977AA00238410 /* ObjectPool.h */; }; - 1EC737FC14B977AB00238410 /* OutputCollector.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736B214B977AA00238410 /* OutputCollector.h */; }; - 1EC737FE14B977AB00238410 /* Parameter.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736B514B977AA00238410 /* Parameter.cpp */; }; - 1EC737FF14B977AB00238410 /* Parameter.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736B614B977AA00238410 /* Parameter.h */; }; - 1EC7380014B977AB00238410 /* PartialTranslOptColl.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736B714B977AA00238410 /* PartialTranslOptColl.cpp */; }; - 1EC7380114B977AB00238410 /* PartialTranslOptColl.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736B814B977AA00238410 /* PartialTranslOptColl.h */; }; - 1EC7380214B977AB00238410 /* PCNTools.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736B914B977AA00238410 /* PCNTools.cpp */; }; - 1EC7380314B977AB00238410 /* PCNTools.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736BA14B977AA00238410 /* PCNTools.h */; }; - 1EC7380414B977AB00238410 /* PDTAimp.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736BB14B977AA00238410 /* PDTAimp.h */; }; - 1EC7380514B977AB00238410 /* Phrase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736BC14B977AA00238410 /* Phrase.cpp */; }; - 1EC7380614B977AB00238410 /* Phrase.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736BD14B977AA00238410 /* Phrase.h */; }; - 1EC7380714B977AB00238410 /* PhraseDictionary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736BE14B977AA00238410 /* PhraseDictionary.cpp */; }; - 1EC7380814B977AB00238410 /* PhraseDictionary.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736BF14B977AA00238410 /* PhraseDictionary.h */; }; - 1EC7380B14B977AB00238410 /* PhraseDictionaryDynSuffixArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736C214B977AA00238410 /* PhraseDictionaryDynSuffixArray.cpp */; }; - 1EC7380C14B977AB00238410 /* PhraseDictionaryDynSuffixArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736C314B977AA00238410 /* PhraseDictionaryDynSuffixArray.h */; }; - 1EC7380F14B977AB00238410 /* PhraseDictionaryMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736C614B977AA00238410 /* PhraseDictionaryMemory.cpp */; }; - 1EC7381014B977AB00238410 /* PhraseDictionaryMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736C714B977AA00238410 /* PhraseDictionaryMemory.h */; }; - 1EC7381114B977AB00238410 /* PhraseDictionaryNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736C814B977AA00238410 /* PhraseDictionaryNode.cpp */; }; - 1EC7381214B977AB00238410 /* PhraseDictionaryNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736C914B977AA00238410 /* PhraseDictionaryNode.h */; }; - 1EC7381914B977AB00238410 /* PhraseDictionaryTree.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736D014B977AA00238410 /* PhraseDictionaryTree.cpp */; }; - 1EC7381A14B977AB00238410 /* PhraseDictionaryTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736D114B977AA00238410 /* PhraseDictionaryTree.h */; }; - 1EC7381B14B977AB00238410 /* PhraseDictionaryTreeAdaptor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736D214B977AA00238410 /* PhraseDictionaryTreeAdaptor.cpp */; }; - 1EC7381C14B977AB00238410 /* PhraseDictionaryTreeAdaptor.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736D314B977AA00238410 /* PhraseDictionaryTreeAdaptor.h */; }; - 1EC7381D14B977AB00238410 /* PrefixTree.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736D414B977AA00238410 /* PrefixTree.h */; }; - 1EC7381E14B977AB00238410 /* PrefixTreeMap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736D514B977AA00238410 /* PrefixTreeMap.cpp */; }; - 1EC7381F14B977AB00238410 /* PrefixTreeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736D614B977AA00238410 /* PrefixTreeMap.h */; }; - 1EC7382014B977AB00238410 /* ReorderingConstraint.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736D714B977AA00238410 /* ReorderingConstraint.cpp */; }; - 1EC7382114B977AB00238410 /* ReorderingConstraint.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736D814B977AA00238410 /* ReorderingConstraint.h */; }; - 1EC7382214B977AB00238410 /* ReorderingStack.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736D914B977AA00238410 /* ReorderingStack.cpp */; }; - 1EC7382314B977AB00238410 /* ReorderingStack.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736DA14B977AA00238410 /* ReorderingStack.h */; }; - 1EC7382414B977AB00238410 /* RuleCube.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736DC14B977AA00238410 /* RuleCube.cpp */; }; - 1EC7382514B977AB00238410 /* RuleCube.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736DD14B977AB00238410 /* RuleCube.h */; }; - 1EC7382614B977AB00238410 /* RuleCubeItem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736DE14B977AB00238410 /* RuleCubeItem.cpp */; }; - 1EC7382714B977AB00238410 /* RuleCubeItem.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736DF14B977AB00238410 /* RuleCubeItem.h */; }; - 1EC7382814B977AB00238410 /* RuleCubeQueue.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736E014B977AB00238410 /* RuleCubeQueue.cpp */; }; - 1EC7382914B977AB00238410 /* RuleCubeQueue.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736E114B977AB00238410 /* RuleCubeQueue.h */; }; - 1EC7383314B977AB00238410 /* ScoreComponentCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736EB14B977AB00238410 /* ScoreComponentCollection.cpp */; }; - 1EC7383414B977AB00238410 /* ScoreComponentCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736EC14B977AB00238410 /* ScoreComponentCollection.h */; }; - 1EC7383714B977AB00238410 /* ScoreProducer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736EF14B977AB00238410 /* ScoreProducer.cpp */; }; - 1EC7383814B977AB00238410 /* ScoreProducer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736F014B977AB00238410 /* ScoreProducer.h */; }; - 1EC7383914B977AB00238410 /* Search.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736F114B977AB00238410 /* Search.cpp */; }; - 1EC7383A14B977AB00238410 /* Search.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736F214B977AB00238410 /* Search.h */; }; - 1EC7383B14B977AB00238410 /* SearchCubePruning.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736F314B977AB00238410 /* SearchCubePruning.cpp */; }; - 1EC7383C14B977AB00238410 /* SearchCubePruning.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736F414B977AB00238410 /* SearchCubePruning.h */; }; - 1EC7383D14B977AB00238410 /* SearchNormal.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736F514B977AB00238410 /* SearchNormal.cpp */; }; - 1EC7383E14B977AB00238410 /* SearchNormal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736F614B977AB00238410 /* SearchNormal.h */; }; - 1EC7383F14B977AB00238410 /* Sentence.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736F714B977AB00238410 /* Sentence.cpp */; }; - 1EC7384014B977AB00238410 /* Sentence.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736F814B977AB00238410 /* Sentence.h */; }; - 1EC7384114B977AB00238410 /* SentenceStats.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736F914B977AB00238410 /* SentenceStats.cpp */; }; - 1EC7384214B977AB00238410 /* SentenceStats.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736FA14B977AB00238410 /* SentenceStats.h */; }; - 1EC7384314B977AB00238410 /* SquareMatrix.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736FB14B977AB00238410 /* SquareMatrix.cpp */; }; - 1EC7384414B977AB00238410 /* SquareMatrix.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC736FC14B977AB00238410 /* SquareMatrix.h */; }; - 1EC7384614B977AB00238410 /* StaticData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC736FF14B977AB00238410 /* StaticData.cpp */; }; - 1EC7384714B977AB00238410 /* StaticData.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7370014B977AB00238410 /* StaticData.h */; }; - 1EC7384D14B977AB00238410 /* TargetPhrase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7370714B977AB00238410 /* TargetPhrase.cpp */; }; - 1EC7384E14B977AB00238410 /* TargetPhrase.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7370814B977AB00238410 /* TargetPhrase.h */; }; - 1EC7384F14B977AB00238410 /* TargetPhraseCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7370914B977AB00238410 /* TargetPhraseCollection.cpp */; }; - 1EC7385014B977AB00238410 /* TargetPhraseCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7370A14B977AB00238410 /* TargetPhraseCollection.h */; }; - 1EC7385114B977AB00238410 /* ThreadPool.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7370B14B977AB00238410 /* ThreadPool.cpp */; }; - 1EC7385214B977AB00238410 /* ThreadPool.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7370C14B977AB00238410 /* ThreadPool.h */; }; - 1EC7385314B977AB00238410 /* Timer.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7370D14B977AB00238410 /* Timer.cpp */; }; - 1EC7385414B977AB00238410 /* Timer.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7370E14B977AB00238410 /* Timer.h */; }; - 1EC7385514B977AB00238410 /* TranslationOption.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7370F14B977AB00238410 /* TranslationOption.cpp */; }; - 1EC7385614B977AB00238410 /* TranslationOption.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7371014B977AB00238410 /* TranslationOption.h */; }; - 1EC7385714B977AB00238410 /* TranslationOptionCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7371114B977AB00238410 /* TranslationOptionCollection.cpp */; }; - 1EC7385814B977AB00238410 /* TranslationOptionCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7371214B977AB00238410 /* TranslationOptionCollection.h */; }; - 1EC7385914B977AB00238410 /* TranslationOptionCollectionConfusionNet.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7371314B977AB00238410 /* TranslationOptionCollectionConfusionNet.cpp */; }; - 1EC7385A14B977AB00238410 /* TranslationOptionCollectionConfusionNet.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7371414B977AB00238410 /* TranslationOptionCollectionConfusionNet.h */; }; - 1EC7385B14B977AB00238410 /* TranslationOptionCollectionText.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7371514B977AB00238410 /* TranslationOptionCollectionText.cpp */; }; - 1EC7385C14B977AB00238410 /* TranslationOptionCollectionText.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7371614B977AB00238410 /* TranslationOptionCollectionText.h */; }; - 1EC7385D14B977AB00238410 /* TranslationOptionList.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7371714B977AB00238410 /* TranslationOptionList.cpp */; }; - 1EC7385E14B977AB00238410 /* TranslationOptionList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7371814B977AB00238410 /* TranslationOptionList.h */; }; - 1EC7385F14B977AB00238410 /* TranslationSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7371914B977AB00238410 /* TranslationSystem.cpp */; }; - 1EC7386014B977AB00238410 /* TranslationSystem.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7371A14B977AB00238410 /* TranslationSystem.h */; }; - 1EC7386114B977AB00238410 /* TreeInput.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7371B14B977AB00238410 /* TreeInput.cpp */; }; - 1EC7386214B977AB00238410 /* TreeInput.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7371C14B977AB00238410 /* TreeInput.h */; }; - 1EC7386414B977AB00238410 /* TrellisPath.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7371F14B977AB00238410 /* TrellisPath.cpp */; }; - 1EC7386514B977AB00238410 /* TrellisPath.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7372014B977AB00238410 /* TrellisPath.h */; }; - 1EC7386714B977AB00238410 /* TrellisPathCollection.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7372314B977AB00238410 /* TrellisPathCollection.cpp */; }; - 1EC7386814B977AB00238410 /* TrellisPathCollection.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7372414B977AB00238410 /* TrellisPathCollection.h */; }; - 1EC7386A14B977AB00238410 /* TrellisPathList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7372714B977AB00238410 /* TrellisPathList.h */; }; - 1EC7386B14B977AB00238410 /* TypeDef.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7372814B977AB00238410 /* TypeDef.h */; }; - 1EC7386C14B977AB00238410 /* UniqueObject.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7372914B977AB00238410 /* UniqueObject.h */; }; - 1EC7386D14B977AB00238410 /* UserMessage.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7372A14B977AB00238410 /* UserMessage.cpp */; }; - 1EC7386E14B977AB00238410 /* UserMessage.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7372B14B977AB00238410 /* UserMessage.h */; }; - 1EC7387014B977AB00238410 /* Util.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7372E14B977AB00238410 /* Util.cpp */; }; - 1EC7387114B977AB00238410 /* Util.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7372F14B977AB00238410 /* Util.h */; }; - 1EC7387314B977AB00238410 /* Word.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7373214B977AB00238410 /* Word.cpp */; }; - 1EC7387414B977AB00238410 /* Word.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7373314B977AB00238410 /* Word.h */; }; - 1EC7387614B977AB00238410 /* WordLattice.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7373614B977AB00238410 /* WordLattice.cpp */; }; - 1EC7387714B977AB00238410 /* WordLattice.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7373714B977AB00238410 /* WordLattice.h */; }; - 1EC7387914B977AB00238410 /* WordsBitmap.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7373A14B977AB00238410 /* WordsBitmap.cpp */; }; - 1EC7387A14B977AB00238410 /* WordsBitmap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7373B14B977AB00238410 /* WordsBitmap.h */; }; - 1EC7387C14B977AB00238410 /* WordsRange.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7373E14B977AB00238410 /* WordsRange.cpp */; }; - 1EC7387D14B977AB00238410 /* WordsRange.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7373F14B977AB00238410 /* WordsRange.h */; }; - 1EC7387F14B977AB00238410 /* XmlOption.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EC7374214B977AB00238410 /* XmlOption.cpp */; }; - 1EC7388014B977AB00238410 /* XmlOption.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC7374314B977AB00238410 /* XmlOption.h */; }; - 1EDA804F14D19EEF003D2191 /* ApplicableRuleTrie.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EDA803614D19EEF003D2191 /* ApplicableRuleTrie.cpp */; }; - 1EDA805014D19EEF003D2191 /* ApplicableRuleTrie.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA803714D19EEF003D2191 /* ApplicableRuleTrie.h */; }; - 1EDA805614D19EEF003D2191 /* IntermediateVarSpanNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA804314D19EEF003D2191 /* IntermediateVarSpanNode.h */; }; - 1EDA805814D19EEF003D2191 /* Parser.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EDA804514D19EEF003D2191 /* Parser.cpp */; }; - 1EDA805914D19EEF003D2191 /* Parser.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA804614D19EEF003D2191 /* Parser.h */; }; - 1EDA805A14D19EEF003D2191 /* SentenceMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA804714D19EEF003D2191 /* SentenceMap.h */; }; - 1EDA805B14D19EEF003D2191 /* StackLattice.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA804814D19EEF003D2191 /* StackLattice.h */; }; - 1EDA805C14D19EEF003D2191 /* StackLatticeBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EDA804914D19EEF003D2191 /* StackLatticeBuilder.cpp */; }; - 1EDA805D14D19EEF003D2191 /* StackLatticeBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA804A14D19EEF003D2191 /* StackLatticeBuilder.h */; }; - 1EDA805E14D19EEF003D2191 /* StackLatticeSearcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA804B14D19EEF003D2191 /* StackLatticeSearcher.h */; }; - 1EDA805F14D19EEF003D2191 /* VarSpanNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA804C14D19EEF003D2191 /* VarSpanNode.h */; }; - 1EDA806014D19EEF003D2191 /* VarSpanTrieBuilder.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EDA804D14D19EEF003D2191 /* VarSpanTrieBuilder.cpp */; }; - 1EDA806114D19EEF003D2191 /* VarSpanTrieBuilder.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA804E14D19EEF003D2191 /* VarSpanTrieBuilder.h */; }; - 1EDA806D14D19F12003D2191 /* ChartRuleLookupManagerCYKPlus.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EDA806214D19F12003D2191 /* ChartRuleLookupManagerCYKPlus.cpp */; }; - 1EDA806E14D19F12003D2191 /* ChartRuleLookupManagerCYKPlus.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA806314D19F12003D2191 /* ChartRuleLookupManagerCYKPlus.h */; }; - 1EDA806F14D19F12003D2191 /* ChartRuleLookupManagerMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EDA806414D19F12003D2191 /* ChartRuleLookupManagerMemory.cpp */; }; - 1EDA807014D19F12003D2191 /* ChartRuleLookupManagerMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA806514D19F12003D2191 /* ChartRuleLookupManagerMemory.h */; }; - 1EDA807114D19F12003D2191 /* ChartRuleLookupManagerOnDisk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EDA806614D19F12003D2191 /* ChartRuleLookupManagerOnDisk.cpp */; }; - 1EDA807214D19F12003D2191 /* ChartRuleLookupManagerOnDisk.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA806714D19F12003D2191 /* ChartRuleLookupManagerOnDisk.h */; }; - 1EDA807314D19F12003D2191 /* DotChart.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA806814D19F12003D2191 /* DotChart.h */; }; - 1EDA807414D19F12003D2191 /* DotChartInMemory.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EDA806914D19F12003D2191 /* DotChartInMemory.cpp */; }; - 1EDA807514D19F12003D2191 /* DotChartInMemory.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA806A14D19F12003D2191 /* DotChartInMemory.h */; }; - 1EDA807614D19F12003D2191 /* DotChartOnDisk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EDA806B14D19F12003D2191 /* DotChartOnDisk.cpp */; }; - 1EDA807714D19F12003D2191 /* DotChartOnDisk.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA806C14D19F12003D2191 /* DotChartOnDisk.h */; }; - 1EDA808614D19FBF003D2191 /* PhraseDictionaryALSuffixArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EDA807814D19FBF003D2191 /* PhraseDictionaryALSuffixArray.cpp */; }; - 1EDA808714D19FBF003D2191 /* PhraseDictionaryALSuffixArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA807914D19FBF003D2191 /* PhraseDictionaryALSuffixArray.h */; }; - 1EDA808814D19FBF003D2191 /* PhraseDictionaryNodeSCFG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EDA807A14D19FBF003D2191 /* PhraseDictionaryNodeSCFG.cpp */; }; - 1EDA808914D19FBF003D2191 /* PhraseDictionaryNodeSCFG.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA807B14D19FBF003D2191 /* PhraseDictionaryNodeSCFG.h */; }; - 1EDA808A14D19FBF003D2191 /* PhraseDictionaryOnDisk.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EDA807C14D19FBF003D2191 /* PhraseDictionaryOnDisk.cpp */; }; - 1EDA808B14D19FBF003D2191 /* PhraseDictionaryOnDisk.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA807D14D19FBF003D2191 /* PhraseDictionaryOnDisk.h */; }; - 1EDA808C14D19FBF003D2191 /* PhraseDictionarySCFG.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EDA807E14D19FBF003D2191 /* PhraseDictionarySCFG.cpp */; }; - 1EDA808D14D19FBF003D2191 /* PhraseDictionarySCFG.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA807F14D19FBF003D2191 /* PhraseDictionarySCFG.h */; }; - 1EDA808E14D19FBF003D2191 /* Trie.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EDA808014D19FBF003D2191 /* Trie.cpp */; }; - 1EDA808F14D19FBF003D2191 /* Trie.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA808114D19FBF003D2191 /* Trie.h */; }; - 1EDA809014D19FBF003D2191 /* UTrie.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EDA808214D19FBF003D2191 /* UTrie.cpp */; }; - 1EDA809114D19FBF003D2191 /* UTrie.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA808314D19FBF003D2191 /* UTrie.h */; }; - 1EDA809214D19FBF003D2191 /* UTrieNode.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EDA808414D19FBF003D2191 /* UTrieNode.cpp */; }; - 1EDA809314D19FBF003D2191 /* UTrieNode.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EDA808514D19FBF003D2191 /* UTrieNode.h */; }; - 1EE418ED15C7FDCB0028F9AB /* Match.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EE418E415C7FDCB0028F9AB /* Match.h */; }; - 1EE418EE15C7FDCB0028F9AB /* SentenceAlignment.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EE418E515C7FDCB0028F9AB /* SentenceAlignment.cpp */; }; - 1EE418EF15C7FDCB0028F9AB /* SentenceAlignment.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EE418E615C7FDCB0028F9AB /* SentenceAlignment.h */; }; - 1EE418F015C7FDCB0028F9AB /* SuffixArray.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EE418E715C7FDCB0028F9AB /* SuffixArray.cpp */; }; - 1EE418F115C7FDCB0028F9AB /* SuffixArray.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EE418E815C7FDCB0028F9AB /* SuffixArray.h */; }; - 1EE418F215C7FDCB0028F9AB /* FuzzyMatchWrapper.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EE418E915C7FDCB0028F9AB /* FuzzyMatchWrapper.cpp */; }; - 1EE418F315C7FDCB0028F9AB /* FuzzyMatchWrapper.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EE418EA15C7FDCB0028F9AB /* FuzzyMatchWrapper.h */; }; - 1EE418F415C7FDCB0028F9AB /* Vocabulary.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EE418EB15C7FDCB0028F9AB /* Vocabulary.cpp */; }; - 1EE418F515C7FDCB0028F9AB /* Vocabulary.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EE418EC15C7FDCB0028F9AB /* Vocabulary.h */; }; - 1EF0709314B9EFCC0052152A /* ParallelBackoff.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EF0709114B9EFCC0052152A /* ParallelBackoff.cpp */; }; - 1EF0709414B9EFCC0052152A /* ParallelBackoff.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EF0709214B9EFCC0052152A /* ParallelBackoff.h */; }; - 1EF8F2C4159A61970047B613 /* HypoList.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EF8F2C3159A61970047B613 /* HypoList.h */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 1E0BA41615B70E5F00AC70E1 /* PhraseDictionaryFuzzyMatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryFuzzyMatch.cpp; path = ../../moses/src/RuleTable/PhraseDictionaryFuzzyMatch.cpp; sourceTree = ""; }; - 1E0BA41715B70E5F00AC70E1 /* PhraseDictionaryFuzzyMatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryFuzzyMatch.h; path = ../../moses/src/RuleTable/PhraseDictionaryFuzzyMatch.h; sourceTree = ""; }; - 1E1D823E15AC29BB00FE42E9 /* FileHandler.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileHandler.cpp; sourceTree = ""; }; - 1E1D823F15AC29BB00FE42E9 /* FileHandler.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FileHandler.h; sourceTree = ""; }; - 1E316464163B0C5200F64999 /* BleuScoreFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BleuScoreFeature.h; path = ../../moses/src/BleuScoreFeature.h; sourceTree = ""; }; - 1E316465163B0C5200F64999 /* ChartParser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartParser.cpp; path = ../../moses/src/ChartParser.cpp; sourceTree = ""; }; - 1E316466163B0C5200F64999 /* ChartParser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartParser.h; path = ../../moses/src/ChartParser.h; sourceTree = ""; }; - 1E316467163B0C5200F64999 /* ChartParserCallback.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartParserCallback.h; path = ../../moses/src/ChartParserCallback.h; sourceTree = ""; }; - 1E31646C163B0C6D00F64999 /* BleuScoreFeature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BleuScoreFeature.cpp; path = ../../moses/src/BleuScoreFeature.cpp; sourceTree = ""; }; - 1E31646E163B0CB000F64999 /* FeatureVector.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FeatureVector.cpp; path = ../../moses/src/FeatureVector.cpp; sourceTree = ""; }; - 1E31646F163B0CB000F64999 /* FeatureVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FeatureVector.h; path = ../../moses/src/FeatureVector.h; sourceTree = ""; }; - 1E316470163B0CB000F64999 /* FeatureVectorTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FeatureVectorTest.cpp; path = ../../moses/src/FeatureVectorTest.cpp; sourceTree = ""; }; - 1E316478163B0CB000F64999 /* FuzzyMatchWrapper.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = FuzzyMatchWrapper.o; sourceTree = ""; }; - 1E316479163B0CB000F64999 /* libfuzzy-match.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libfuzzy-match.a"; sourceTree = ""; }; - 1E31647A163B0CB000F64999 /* SentenceAlignment.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = SentenceAlignment.o; sourceTree = ""; }; - 1E31647B163B0CB000F64999 /* SuffixArray.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = SuffixArray.o; sourceTree = ""; }; - 1E31647C163B0CB000F64999 /* Vocabulary.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Vocabulary.o; sourceTree = ""; }; - 1E316482163B0CB000F64999 /* FuzzyMatchWrapper.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = FuzzyMatchWrapper.o; sourceTree = ""; }; - 1E316483163B0CB000F64999 /* libfuzzy-match.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = "libfuzzy-match.a"; sourceTree = ""; }; - 1E316484163B0CB000F64999 /* SentenceAlignment.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = SentenceAlignment.o; sourceTree = ""; }; - 1E316485163B0CB000F64999 /* SuffixArray.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = SuffixArray.o; sourceTree = ""; }; - 1E316486163B0CB000F64999 /* TMMTWrapper.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = TMMTWrapper.o; sourceTree = ""; }; - 1E316487163B0CB000F64999 /* Vocabulary.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Vocabulary.o; sourceTree = ""; }; - 1E316488163B0CB000F64999 /* FuzzyMatchWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FuzzyMatchWrapper.cpp; sourceTree = ""; }; - 1E316489163B0CB000F64999 /* FuzzyMatchWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FuzzyMatchWrapper.h; sourceTree = ""; }; - 1E31648A163B0CB000F64999 /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; path = Jamfile; sourceTree = ""; }; - 1E31648B163B0CB000F64999 /* Match.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Match.h; sourceTree = ""; }; - 1E31648C163B0CB000F64999 /* SentenceAlignment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SentenceAlignment.cpp; sourceTree = ""; }; - 1E31648D163B0CB000F64999 /* SentenceAlignment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SentenceAlignment.h; sourceTree = ""; }; - 1E31648E163B0CB000F64999 /* SuffixArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SuffixArray.cpp; sourceTree = ""; }; - 1E31648F163B0CB000F64999 /* SuffixArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SuffixArray.h; sourceTree = ""; }; - 1E316490163B0CB000F64999 /* Vocabulary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Vocabulary.cpp; sourceTree = ""; }; - 1E316491163B0CB000F64999 /* Vocabulary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Vocabulary.h; sourceTree = ""; }; - 1E316492163B0CB000F64999 /* GlobalLexicalModelUnlimited.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GlobalLexicalModelUnlimited.cpp; path = ../../moses/src/GlobalLexicalModelUnlimited.cpp; sourceTree = ""; }; - 1E316493163B0CB000F64999 /* GlobalLexicalModelUnlimited.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GlobalLexicalModelUnlimited.h; path = ../../moses/src/GlobalLexicalModelUnlimited.h; sourceTree = ""; }; - 1E31649B163B0CB000F64999 /* Fill.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Fill.o; sourceTree = ""; }; - 1E31649C163B0CB000F64999 /* libIncremental.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libIncremental.a; sourceTree = ""; }; - 1E31649D163B0CB000F64999 /* Manager.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Manager.o; sourceTree = ""; }; - 1E31649E163B0CB000F64999 /* Fill.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Fill.cpp; sourceTree = ""; }; - 1E31649F163B0CB000F64999 /* Fill.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Fill.h; sourceTree = ""; }; - 1E3164A0163B0CB000F64999 /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; path = Jamfile; sourceTree = ""; }; - 1E3164A1163B0CB000F64999 /* Manager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Manager.cpp; sourceTree = ""; }; - 1E3164A2163B0CB000F64999 /* Manager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Manager.h; sourceTree = ""; }; - 1E3164A8163B0CB000F64999 /* Base.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Base.cpp; sourceTree = ""; }; - 1E3164A9163B0CB000F64999 /* Base.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Base.h; sourceTree = ""; }; - 1E3164B0163B0CB000F64999 /* Base.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Base.o; sourceTree = ""; }; - 1E3164B1163B0CB000F64999 /* Factory.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Factory.o; sourceTree = ""; }; - 1E3164B2163B0CB000F64999 /* Implementation.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Implementation.o; sourceTree = ""; }; - 1E3164B3163B0CB000F64999 /* IRST.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = IRST.o; sourceTree = ""; }; - 1E3164B4163B0CB000F64999 /* Joint.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Joint.o; sourceTree = ""; }; - 1E3164B5163B0CB000F64999 /* Ken.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Ken.o; sourceTree = ""; }; - 1E3164B6163B0CB000F64999 /* libLM.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libLM.a; sourceTree = ""; }; - 1E3164B7163B0CB000F64999 /* MultiFactor.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = MultiFactor.o; sourceTree = ""; }; - 1E3164B8163B0CB000F64999 /* ORLM.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = ORLM.o; sourceTree = ""; }; - 1E3164B9163B0CB000F64999 /* ParallelBackoff.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = ParallelBackoff.o; sourceTree = ""; }; - 1E3164BA163B0CB000F64999 /* Rand.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Rand.o; sourceTree = ""; }; - 1E3164BB163B0CB000F64999 /* Remote.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Remote.o; sourceTree = ""; }; - 1E3164BC163B0CB000F64999 /* SingleFactor.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = SingleFactor.o; sourceTree = ""; }; - 1E3164BD163B0CB000F64999 /* SRI.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = SRI.o; sourceTree = ""; }; - 1E3164C3163B0CB000F64999 /* Base.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Base.o; sourceTree = ""; }; - 1E3164C4163B0CB100F64999 /* Factory.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Factory.o; sourceTree = ""; }; - 1E3164C5163B0CB100F64999 /* Implementation.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Implementation.o; sourceTree = ""; }; - 1E3164C6163B0CB100F64999 /* IRST.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = IRST.o; sourceTree = ""; }; - 1E3164C7163B0CB100F64999 /* Joint.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Joint.o; sourceTree = ""; }; - 1E3164C8163B0CB100F64999 /* Ken.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Ken.o; sourceTree = ""; }; - 1E3164C9163B0CB100F64999 /* libLM.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libLM.a; sourceTree = ""; }; - 1E3164CA163B0CB100F64999 /* MultiFactor.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = MultiFactor.o; sourceTree = ""; }; - 1E3164CB163B0CB100F64999 /* ORLM.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = ORLM.o; sourceTree = ""; }; - 1E3164CC163B0CB100F64999 /* ParallelBackoff.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = ParallelBackoff.o; sourceTree = ""; }; - 1E3164CD163B0CB100F64999 /* Rand.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Rand.o; sourceTree = ""; }; - 1E3164CE163B0CB100F64999 /* Remote.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Remote.o; sourceTree = ""; }; - 1E3164CF163B0CB100F64999 /* SingleFactor.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = SingleFactor.o; sourceTree = ""; }; - 1E3164D0163B0CB100F64999 /* SRI.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = SRI.o; sourceTree = ""; }; - 1E3164D2163B0CB100F64999 /* Base.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Base.o; sourceTree = ""; }; - 1E3164D3163B0CB100F64999 /* Factory.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Factory.o; sourceTree = ""; }; - 1E3164D4163B0CB100F64999 /* Implementation.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Implementation.o; sourceTree = ""; }; - 1E3164D5163B0CB100F64999 /* IRST.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = IRST.o; sourceTree = ""; }; - 1E3164D6163B0CB100F64999 /* Joint.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Joint.o; sourceTree = ""; }; - 1E3164D7163B0CB100F64999 /* Ken.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Ken.o; sourceTree = ""; }; - 1E3164D8163B0CB100F64999 /* MultiFactor.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = MultiFactor.o; sourceTree = ""; }; - 1E3164D9163B0CB100F64999 /* ParallelBackoff.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = ParallelBackoff.o; sourceTree = ""; }; - 1E3164DA163B0CB100F64999 /* Remote.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Remote.o; sourceTree = ""; }; - 1E3164DB163B0CB100F64999 /* SingleFactor.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = SingleFactor.o; sourceTree = ""; }; - 1E3164DC163B0CB100F64999 /* SRI.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = SRI.o; sourceTree = ""; }; - 1E3164DF163B0CB100F64999 /* Base.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Base.o; sourceTree = ""; }; - 1E3164E0163B0CB100F64999 /* Factory.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Factory.o; sourceTree = ""; }; - 1E3164E1163B0CB100F64999 /* Implementation.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Implementation.o; sourceTree = ""; }; - 1E3164E2163B0CB100F64999 /* Joint.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Joint.o; sourceTree = ""; }; - 1E3164E3163B0CB100F64999 /* Ken.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Ken.o; sourceTree = ""; }; - 1E3164E4163B0CB100F64999 /* libLM.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libLM.a; sourceTree = ""; }; - 1E3164E5163B0CB100F64999 /* MultiFactor.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = MultiFactor.o; sourceTree = ""; }; - 1E3164E6163B0CB100F64999 /* Remote.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Remote.o; sourceTree = ""; }; - 1E3164E7163B0CB100F64999 /* SingleFactor.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = SingleFactor.o; sourceTree = ""; }; - 1E3164ED163B0CB100F64999 /* Base.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Base.o; sourceTree = ""; }; - 1E3164EE163B0CB100F64999 /* Factory.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Factory.o; sourceTree = ""; }; - 1E3164EF163B0CB100F64999 /* Implementation.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Implementation.o; sourceTree = ""; }; - 1E3164F0163B0CB100F64999 /* Joint.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Joint.o; sourceTree = ""; }; - 1E3164F1163B0CB100F64999 /* Ken.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Ken.o; sourceTree = ""; }; - 1E3164F2163B0CB100F64999 /* libLM.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libLM.a; sourceTree = ""; }; - 1E3164F3163B0CB100F64999 /* MultiFactor.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = MultiFactor.o; sourceTree = ""; }; - 1E3164F4163B0CB100F64999 /* Remote.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Remote.o; sourceTree = ""; }; - 1E3164F5163B0CB100F64999 /* SingleFactor.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = SingleFactor.o; sourceTree = ""; }; - 1E3164F6163B0CB100F64999 /* lm.log */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = lm.log; sourceTree = ""; }; - 1E3164F7163B0CB100F64999 /* Factory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Factory.cpp; sourceTree = ""; }; - 1E3164F8163B0CB100F64999 /* Factory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Factory.h; sourceTree = ""; }; - 1E3164F9163B0CB100F64999 /* Implementation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Implementation.cpp; sourceTree = ""; }; - 1E3164FA163B0CB100F64999 /* Implementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Implementation.h; sourceTree = ""; }; - 1E3164FB163B0CB100F64999 /* IRST.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IRST.cpp; sourceTree = ""; }; - 1E3164FC163B0CB100F64999 /* IRST.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IRST.h; sourceTree = ""; }; - 1E3164FD163B0CB100F64999 /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; path = Jamfile; sourceTree = ""; }; - 1E3164FE163B0CB100F64999 /* Joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Joint.cpp; sourceTree = ""; }; - 1E3164FF163B0CB100F64999 /* Joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Joint.h; sourceTree = ""; }; - 1E316500163B0CB100F64999 /* Ken.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Ken.cpp; sourceTree = ""; }; - 1E316501163B0CB100F64999 /* Ken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Ken.h; sourceTree = ""; }; - 1E316502163B0CB100F64999 /* LDHT.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LDHT.cpp; sourceTree = ""; }; - 1E316503163B0CB100F64999 /* LDHT.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LDHT.h; sourceTree = ""; }; - 1E316504163B0CB100F64999 /* MultiFactor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MultiFactor.cpp; sourceTree = ""; }; - 1E316505163B0CB100F64999 /* MultiFactor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MultiFactor.h; sourceTree = ""; }; - 1E316506163B0CB100F64999 /* ORLM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ORLM.cpp; sourceTree = ""; }; - 1E316507163B0CB100F64999 /* ORLM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORLM.h; sourceTree = ""; }; - 1E316508163B0CB100F64999 /* ParallelBackoff.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParallelBackoff.cpp; sourceTree = ""; }; - 1E316509163B0CB100F64999 /* ParallelBackoff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParallelBackoff.h; sourceTree = ""; }; - 1E31650C163B0CB100F64999 /* Remote.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Remote.cpp; sourceTree = ""; }; - 1E31650D163B0CB100F64999 /* Remote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Remote.h; sourceTree = ""; }; - 1E31650E163B0CB100F64999 /* SingleFactor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SingleFactor.cpp; sourceTree = ""; }; - 1E31650F163B0CB100F64999 /* SingleFactor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SingleFactor.h; sourceTree = ""; }; - 1E316510163B0CB100F64999 /* SRI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SRI.cpp; sourceTree = ""; }; - 1E316511163B0CB100F64999 /* SRI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SRI.h; sourceTree = ""; }; - 1E316513163B0CB100F64999 /* MockHypothesis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MockHypothesis.cpp; path = ../../moses/src/MockHypothesis.cpp; sourceTree = ""; }; - 1E316514163B0CB100F64999 /* MockHypothesis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MockHypothesis.h; path = ../../moses/src/MockHypothesis.h; sourceTree = ""; }; - 1E316518163B0CB100F64999 /* PhraseBoundaryFeature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseBoundaryFeature.cpp; path = ../../moses/src/PhraseBoundaryFeature.cpp; sourceTree = ""; }; - 1E316519163B0CB100F64999 /* PhraseBoundaryFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseBoundaryFeature.h; path = ../../moses/src/PhraseBoundaryFeature.h; sourceTree = ""; }; - 1E31651A163B0CB100F64999 /* PhraseLengthFeature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseLengthFeature.cpp; path = ../../moses/src/PhraseLengthFeature.cpp; sourceTree = ""; }; - 1E31651B163B0CB100F64999 /* PhraseLengthFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseLengthFeature.h; path = ../../moses/src/PhraseLengthFeature.h; sourceTree = ""; }; - 1E31651C163B0CB100F64999 /* PhrasePairFeature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhrasePairFeature.cpp; path = ../../moses/src/PhrasePairFeature.cpp; sourceTree = ""; }; - 1E31651D163B0CB100F64999 /* PhrasePairFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhrasePairFeature.h; path = ../../moses/src/PhrasePairFeature.h; sourceTree = ""; }; - 1E316525163B0CB100F64999 /* libRuleTable.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libRuleTable.a; sourceTree = ""; }; - 1E316526163B0CB100F64999 /* LoaderCompact.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = LoaderCompact.o; sourceTree = ""; }; - 1E316527163B0CB100F64999 /* LoaderFactory.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = LoaderFactory.o; sourceTree = ""; }; - 1E316528163B0CB100F64999 /* LoaderHiero.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = LoaderHiero.o; sourceTree = ""; }; - 1E316529163B0CB100F64999 /* LoaderStandard.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = LoaderStandard.o; sourceTree = ""; }; - 1E31652A163B0CB100F64999 /* PhraseDictionaryALSuffixArray.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = PhraseDictionaryALSuffixArray.o; sourceTree = ""; }; - 1E31652B163B0CB100F64999 /* PhraseDictionaryFuzzyMatch.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = PhraseDictionaryFuzzyMatch.o; sourceTree = ""; }; - 1E31652C163B0CB100F64999 /* PhraseDictionaryNodeSCFG.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = PhraseDictionaryNodeSCFG.o; sourceTree = ""; }; - 1E31652D163B0CB100F64999 /* PhraseDictionaryOnDisk.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = PhraseDictionaryOnDisk.o; sourceTree = ""; }; - 1E31652E163B0CB100F64999 /* PhraseDictionarySCFG.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = PhraseDictionarySCFG.o; sourceTree = ""; }; - 1E31652F163B0CB100F64999 /* Trie.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Trie.o; sourceTree = ""; }; - 1E316530163B0CB100F64999 /* UTrie.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = UTrie.o; sourceTree = ""; }; - 1E316531163B0CB100F64999 /* UTrieNode.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = UTrieNode.o; sourceTree = ""; }; - 1E316537163B0CB100F64999 /* libRuleTable.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libRuleTable.a; sourceTree = ""; }; - 1E316538163B0CB100F64999 /* LoaderCompact.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = LoaderCompact.o; sourceTree = ""; }; - 1E316539163B0CB100F64999 /* LoaderFactory.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = LoaderFactory.o; sourceTree = ""; }; - 1E31653A163B0CB100F64999 /* LoaderHiero.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = LoaderHiero.o; sourceTree = ""; }; - 1E31653B163B0CB100F64999 /* LoaderStandard.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = LoaderStandard.o; sourceTree = ""; }; - 1E31653C163B0CB100F64999 /* PhraseDictionaryALSuffixArray.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = PhraseDictionaryALSuffixArray.o; sourceTree = ""; }; - 1E31653D163B0CB100F64999 /* PhraseDictionaryFuzzyMatch.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = PhraseDictionaryFuzzyMatch.o; sourceTree = ""; }; - 1E31653E163B0CB100F64999 /* PhraseDictionaryNodeSCFG.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = PhraseDictionaryNodeSCFG.o; sourceTree = ""; }; - 1E31653F163B0CB100F64999 /* PhraseDictionaryOnDisk.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = PhraseDictionaryOnDisk.o; sourceTree = ""; }; - 1E316540163B0CB100F64999 /* PhraseDictionarySCFG.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = PhraseDictionarySCFG.o; sourceTree = ""; }; - 1E316541163B0CB100F64999 /* PhraseDictionaryTMExtract.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = PhraseDictionaryTMExtract.o; sourceTree = ""; }; - 1E316542163B0CB100F64999 /* Trie.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Trie.o; sourceTree = ""; }; - 1E316543163B0CB100F64999 /* UTrie.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = UTrie.o; sourceTree = ""; }; - 1E316544163B0CB100F64999 /* UTrieNode.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = UTrieNode.o; sourceTree = ""; }; - 1E316546163B0CB100F64999 /* LoaderCompact.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = LoaderCompact.o; sourceTree = ""; }; - 1E316547163B0CB100F64999 /* LoaderFactory.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = LoaderFactory.o; sourceTree = ""; }; - 1E316548163B0CB100F64999 /* LoaderHiero.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = LoaderHiero.o; sourceTree = ""; }; - 1E316549163B0CB100F64999 /* LoaderStandard.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = LoaderStandard.o; sourceTree = ""; }; - 1E31654A163B0CB100F64999 /* PhraseDictionaryALSuffixArray.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = PhraseDictionaryALSuffixArray.o; sourceTree = ""; }; - 1E31654B163B0CB100F64999 /* PhraseDictionaryNodeSCFG.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = PhraseDictionaryNodeSCFG.o; sourceTree = ""; }; - 1E31654C163B0CB100F64999 /* PhraseDictionaryOnDisk.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = PhraseDictionaryOnDisk.o; sourceTree = ""; }; - 1E31654D163B0CB100F64999 /* PhraseDictionarySCFG.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = PhraseDictionarySCFG.o; sourceTree = ""; }; - 1E31654E163B0CB100F64999 /* Trie.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Trie.o; sourceTree = ""; }; - 1E31654F163B0CB100F64999 /* UTrie.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = UTrie.o; sourceTree = ""; }; - 1E316550163B0CB100F64999 /* UTrieNode.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = UTrieNode.o; sourceTree = ""; }; - 1E316551163B0CB100F64999 /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; path = Jamfile; sourceTree = ""; }; - 1E316552163B0CB100F64999 /* Loader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Loader.h; sourceTree = ""; }; - 1E316553163B0CB100F64999 /* LoaderCompact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoaderCompact.cpp; sourceTree = ""; }; - 1E316554163B0CB100F64999 /* LoaderCompact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoaderCompact.h; sourceTree = ""; }; - 1E316555163B0CB100F64999 /* LoaderFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoaderFactory.cpp; sourceTree = ""; }; - 1E316556163B0CB100F64999 /* LoaderFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoaderFactory.h; sourceTree = ""; }; - 1E316557163B0CB100F64999 /* LoaderHiero.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoaderHiero.cpp; sourceTree = ""; }; - 1E316558163B0CB100F64999 /* LoaderHiero.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoaderHiero.h; sourceTree = ""; }; - 1E316559163B0CB100F64999 /* LoaderStandard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = LoaderStandard.cpp; sourceTree = ""; }; - 1E31655A163B0CB100F64999 /* LoaderStandard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LoaderStandard.h; sourceTree = ""; }; - 1E31655B163B0CB100F64999 /* PhraseDictionaryALSuffixArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PhraseDictionaryALSuffixArray.cpp; sourceTree = ""; }; - 1E31655C163B0CB100F64999 /* PhraseDictionaryALSuffixArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhraseDictionaryALSuffixArray.h; sourceTree = ""; }; - 1E31655D163B0CB100F64999 /* PhraseDictionaryFuzzyMatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PhraseDictionaryFuzzyMatch.cpp; sourceTree = ""; }; - 1E31655E163B0CB100F64999 /* PhraseDictionaryFuzzyMatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhraseDictionaryFuzzyMatch.h; sourceTree = ""; }; - 1E31655F163B0CB100F64999 /* PhraseDictionaryNodeSCFG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PhraseDictionaryNodeSCFG.cpp; sourceTree = ""; }; - 1E316560163B0CB100F64999 /* PhraseDictionaryNodeSCFG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhraseDictionaryNodeSCFG.h; sourceTree = ""; }; - 1E316561163B0CB100F64999 /* PhraseDictionaryOnDisk.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PhraseDictionaryOnDisk.cpp; sourceTree = ""; }; - 1E316562163B0CB100F64999 /* PhraseDictionaryOnDisk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhraseDictionaryOnDisk.h; sourceTree = ""; }; - 1E316563163B0CB100F64999 /* PhraseDictionarySCFG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = PhraseDictionarySCFG.cpp; sourceTree = ""; }; - 1E316564163B0CB100F64999 /* PhraseDictionarySCFG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PhraseDictionarySCFG.h; sourceTree = ""; }; - 1E316565163B0CB100F64999 /* Trie.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Trie.cpp; sourceTree = ""; }; - 1E316566163B0CB100F64999 /* Trie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Trie.h; sourceTree = ""; }; - 1E316567163B0CB100F64999 /* UTrie.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UTrie.cpp; sourceTree = ""; }; - 1E316568163B0CB100F64999 /* UTrie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UTrie.h; sourceTree = ""; }; - 1E316569163B0CB100F64999 /* UTrieNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UTrieNode.cpp; sourceTree = ""; }; - 1E31656A163B0CB100F64999 /* UTrieNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UTrieNode.h; sourceTree = ""; }; - 1E31656C163B0CB100F64999 /* ApplicableRuleTrie.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ApplicableRuleTrie.cpp; sourceTree = ""; }; - 1E31656D163B0CB100F64999 /* ApplicableRuleTrie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ApplicableRuleTrie.h; sourceTree = ""; }; - 1E316574163B0CB200F64999 /* ApplicableRuleTrie.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = ApplicableRuleTrie.o; sourceTree = ""; }; - 1E316575163B0CB200F64999 /* libScope3Parser.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libScope3Parser.a; sourceTree = ""; }; - 1E316576163B0CB200F64999 /* Parser.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Parser.o; sourceTree = ""; }; - 1E316577163B0CB200F64999 /* StackLatticeBuilder.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = StackLatticeBuilder.o; sourceTree = ""; }; - 1E316578163B0CB200F64999 /* VarSpanTrieBuilder.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = VarSpanTrieBuilder.o; sourceTree = ""; }; - 1E31657E163B0CB200F64999 /* ApplicableRuleTrie.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = ApplicableRuleTrie.o; sourceTree = ""; }; - 1E31657F163B0CB200F64999 /* libScope3Parser.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; path = libScope3Parser.a; sourceTree = ""; }; - 1E316580163B0CB200F64999 /* Parser.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Parser.o; sourceTree = ""; }; - 1E316581163B0CB200F64999 /* StackLatticeBuilder.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = StackLatticeBuilder.o; sourceTree = ""; }; - 1E316582163B0CB200F64999 /* VarSpanTrieBuilder.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = VarSpanTrieBuilder.o; sourceTree = ""; }; - 1E316584163B0CB200F64999 /* ApplicableRuleTrie.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = ApplicableRuleTrie.o; sourceTree = ""; }; - 1E316585163B0CB200F64999 /* Parser.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = Parser.o; sourceTree = ""; }; - 1E316586163B0CB200F64999 /* StackLatticeBuilder.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = StackLatticeBuilder.o; sourceTree = ""; }; - 1E316587163B0CB200F64999 /* VarSpanTrieBuilder.o */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.objfile"; path = VarSpanTrieBuilder.o; sourceTree = ""; }; - 1E316588163B0CB200F64999 /* IntermediateVarSpanNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IntermediateVarSpanNode.h; sourceTree = ""; }; - 1E316589163B0CB200F64999 /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; path = Jamfile; sourceTree = ""; }; - 1E31658A163B0CB200F64999 /* Parser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Parser.cpp; sourceTree = ""; }; - 1E31658B163B0CB200F64999 /* Parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Parser.h; sourceTree = ""; }; - 1E31658C163B0CB200F64999 /* SentenceMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SentenceMap.h; sourceTree = ""; }; - 1E31658D163B0CB200F64999 /* StackLattice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StackLattice.h; sourceTree = ""; }; - 1E31658E163B0CB200F64999 /* StackLatticeBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StackLatticeBuilder.cpp; sourceTree = ""; }; - 1E31658F163B0CB200F64999 /* StackLatticeBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StackLatticeBuilder.h; sourceTree = ""; }; - 1E316590163B0CB200F64999 /* StackLatticeSearcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StackLatticeSearcher.h; sourceTree = ""; }; - 1E316591163B0CB200F64999 /* VarSpanNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VarSpanNode.h; sourceTree = ""; }; - 1E316592163B0CB200F64999 /* VarSpanTrieBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = VarSpanTrieBuilder.cpp; sourceTree = ""; }; - 1E316593163B0CB200F64999 /* VarSpanTrieBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VarSpanTrieBuilder.h; sourceTree = ""; }; - 1E316594163B0CB200F64999 /* ScoreComponentCollectionTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScoreComponentCollectionTest.cpp; path = ../../moses/src/ScoreComponentCollectionTest.cpp; sourceTree = ""; }; - 1E316595163B0CB200F64999 /* SourceWordDeletionFeature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SourceWordDeletionFeature.cpp; path = ../../moses/src/SourceWordDeletionFeature.cpp; sourceTree = ""; }; - 1E316596163B0CB200F64999 /* SourceWordDeletionFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SourceWordDeletionFeature.h; path = ../../moses/src/SourceWordDeletionFeature.h; sourceTree = ""; }; - 1E316597163B0CB200F64999 /* SparsePhraseDictionaryFeature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SparsePhraseDictionaryFeature.cpp; path = ../../moses/src/SparsePhraseDictionaryFeature.cpp; sourceTree = ""; }; - 1E316598163B0CB200F64999 /* SparsePhraseDictionaryFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparsePhraseDictionaryFeature.h; path = ../../moses/src/SparsePhraseDictionaryFeature.h; sourceTree = ""; }; - 1E31659B163B0CB200F64999 /* StackVec.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StackVec.h; path = ../../moses/src/StackVec.h; sourceTree = ""; }; - 1E3165A2163B0CB200F64999 /* TargetBigramFeature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TargetBigramFeature.cpp; path = ../../moses/src/TargetBigramFeature.cpp; sourceTree = ""; }; - 1E3165A3163B0CB200F64999 /* TargetBigramFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TargetBigramFeature.h; path = ../../moses/src/TargetBigramFeature.h; sourceTree = ""; }; - 1E3165A4163B0CB200F64999 /* TargetBigramFeatureTest.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TargetBigramFeatureTest.cpp; path = ../../moses/src/TargetBigramFeatureTest.cpp; sourceTree = ""; }; - 1E3165A5163B0CB200F64999 /* TargetNgramFeature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TargetNgramFeature.cpp; path = ../../moses/src/TargetNgramFeature.cpp; sourceTree = ""; }; - 1E3165A6163B0CB200F64999 /* TargetNgramFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TargetNgramFeature.h; path = ../../moses/src/TargetNgramFeature.h; sourceTree = ""; }; - 1E3165A7163B0CB200F64999 /* TargetWordInsertionFeature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TargetWordInsertionFeature.cpp; path = ../../moses/src/TargetWordInsertionFeature.cpp; sourceTree = ""; }; - 1E3165A8163B0CB200F64999 /* TargetWordInsertionFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TargetWordInsertionFeature.h; path = ../../moses/src/TargetWordInsertionFeature.h; sourceTree = ""; }; - 1E3165A9163B0CB200F64999 /* Terminal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Terminal.h; path = ../../moses/src/Terminal.h; sourceTree = ""; }; - 1E365EE816120F4600BA335B /* ChartTranslationOptions.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartTranslationOptions.cpp; path = ../../moses/src/ChartTranslationOptions.cpp; sourceTree = ""; }; - 1E365EE916120F4600BA335B /* ChartTranslationOptions.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartTranslationOptions.h; path = ../../moses/src/ChartTranslationOptions.h; sourceTree = ""; }; - 1E619E9F15B8713600C2D7A7 /* ChartRuleLookupManagerMemoryPerSentence.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartRuleLookupManagerMemoryPerSentence.cpp; path = ../../moses/src/CYKPlusParser/ChartRuleLookupManagerMemoryPerSentence.cpp; sourceTree = ""; }; - 1E619EA015B8713700C2D7A7 /* ChartRuleLookupManagerMemoryPerSentence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartRuleLookupManagerMemoryPerSentence.h; path = ../../moses/src/CYKPlusParser/ChartRuleLookupManagerMemoryPerSentence.h; sourceTree = ""; }; - 1E6D9FBD15D027560064D436 /* BlockHashIndex.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BlockHashIndex.cpp; path = ../../moses/src/CompactPT/BlockHashIndex.cpp; sourceTree = ""; }; - 1E6D9FBE15D027560064D436 /* BlockHashIndex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BlockHashIndex.h; path = ../../moses/src/CompactPT/BlockHashIndex.h; sourceTree = ""; }; - 1E6D9FBF15D027560064D436 /* CanonicalHuffman.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CanonicalHuffman.h; path = ../../moses/src/CompactPT/CanonicalHuffman.h; sourceTree = ""; }; - 1E6D9FC015D027560064D436 /* CmphStringVectorAdapter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CmphStringVectorAdapter.cpp; path = ../../moses/src/CompactPT/CmphStringVectorAdapter.cpp; sourceTree = ""; }; - 1E6D9FC115D027560064D436 /* CmphStringVectorAdapter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CmphStringVectorAdapter.h; path = ../../moses/src/CompactPT/CmphStringVectorAdapter.h; sourceTree = ""; }; - 1E6D9FC215D027560064D436 /* ConsistantPhrases.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ConsistantPhrases.h; path = ../../moses/src/CompactPT/ConsistantPhrases.h; sourceTree = ""; }; - 1E6D9FC415D027560064D436 /* LexicalReorderingTableCompact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexicalReorderingTableCompact.cpp; path = ../../moses/src/CompactPT/LexicalReorderingTableCompact.cpp; sourceTree = ""; }; - 1E6D9FC515D027560064D436 /* LexicalReorderingTableCompact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexicalReorderingTableCompact.h; path = ../../moses/src/CompactPT/LexicalReorderingTableCompact.h; sourceTree = ""; }; - 1E6D9FC615D027560064D436 /* LexicalReorderingTableCreator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexicalReorderingTableCreator.cpp; path = ../../moses/src/CompactPT/LexicalReorderingTableCreator.cpp; sourceTree = ""; }; - 1E6D9FC715D027560064D436 /* LexicalReorderingTableCreator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexicalReorderingTableCreator.h; path = ../../moses/src/CompactPT/LexicalReorderingTableCreator.h; sourceTree = ""; }; - 1E6D9FC815D027560064D436 /* ListCoders.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ListCoders.h; path = ../../moses/src/CompactPT/ListCoders.h; sourceTree = ""; }; - 1E6D9FC915D027560064D436 /* MmapAllocator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MmapAllocator.h; path = ../../moses/src/CompactPT/MmapAllocator.h; sourceTree = ""; }; - 1E6D9FCA15D027560064D436 /* MonotonicVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MonotonicVector.h; path = ../../moses/src/CompactPT/MonotonicVector.h; sourceTree = ""; }; - 1E6D9FCB15D027560064D436 /* MurmurHash3.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MurmurHash3.cpp; path = ../../moses/src/CompactPT/MurmurHash3.cpp; sourceTree = ""; }; - 1E6D9FCC15D027560064D436 /* MurmurHash3.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MurmurHash3.h; path = ../../moses/src/CompactPT/MurmurHash3.h; sourceTree = ""; }; - 1E6D9FCD15D027560064D436 /* PackedArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PackedArray.h; path = ../../moses/src/CompactPT/PackedArray.h; sourceTree = ""; }; - 1E6D9FCE15D027560064D436 /* PhraseDecoder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDecoder.cpp; path = ../../moses/src/CompactPT/PhraseDecoder.cpp; sourceTree = ""; }; - 1E6D9FCF15D027560064D436 /* PhraseDecoder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDecoder.h; path = ../../moses/src/CompactPT/PhraseDecoder.h; sourceTree = ""; }; - 1E6D9FD015D027560064D436 /* PhraseDictionaryCompact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryCompact.cpp; path = ../../moses/src/CompactPT/PhraseDictionaryCompact.cpp; sourceTree = ""; }; - 1E6D9FD115D027560064D436 /* PhraseDictionaryCompact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryCompact.h; path = ../../moses/src/CompactPT/PhraseDictionaryCompact.h; sourceTree = ""; }; - 1E6D9FD215D027560064D436 /* PhraseTableCreator.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseTableCreator.cpp; path = ../../moses/src/CompactPT/PhraseTableCreator.cpp; sourceTree = ""; }; - 1E6D9FD315D027560064D436 /* PhraseTableCreator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseTableCreator.h; path = ../../moses/src/CompactPT/PhraseTableCreator.h; sourceTree = ""; }; - 1E6D9FD415D027560064D436 /* StringVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StringVector.h; path = ../../moses/src/CompactPT/StringVector.h; sourceTree = ""; }; - 1E6D9FD515D027560064D436 /* TargetPhraseCollectionCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TargetPhraseCollectionCache.h; path = ../../moses/src/CompactPT/TargetPhraseCollectionCache.h; sourceTree = ""; }; - 1E879EA515A346F90051F346 /* SearchNormalBatch.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SearchNormalBatch.cpp; path = ../../moses/src/SearchNormalBatch.cpp; sourceTree = ""; }; - 1E879EA615A346F90051F346 /* SearchNormalBatch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SearchNormalBatch.h; path = ../../moses/src/SearchNormalBatch.h; sourceTree = ""; }; - 1EAC362C14CDC79300DF97C3 /* Loader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Loader.h; path = ../../moses/src/RuleTable/Loader.h; sourceTree = ""; }; - 1EAC362D14CDC79300DF97C3 /* LoaderCompact.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LoaderCompact.cpp; path = ../../moses/src/RuleTable/LoaderCompact.cpp; sourceTree = ""; }; - 1EAC362E14CDC79300DF97C3 /* LoaderCompact.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LoaderCompact.h; path = ../../moses/src/RuleTable/LoaderCompact.h; sourceTree = ""; }; - 1EAC362F14CDC79300DF97C3 /* LoaderFactory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LoaderFactory.cpp; path = ../../moses/src/RuleTable/LoaderFactory.cpp; sourceTree = ""; }; - 1EAC363014CDC79300DF97C3 /* LoaderFactory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LoaderFactory.h; path = ../../moses/src/RuleTable/LoaderFactory.h; sourceTree = ""; }; - 1EAC363114CDC79300DF97C3 /* LoaderHiero.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LoaderHiero.cpp; path = ../../moses/src/RuleTable/LoaderHiero.cpp; sourceTree = ""; }; - 1EAC363214CDC79300DF97C3 /* LoaderHiero.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LoaderHiero.h; path = ../../moses/src/RuleTable/LoaderHiero.h; sourceTree = ""; }; - 1EAC363314CDC79300DF97C3 /* LoaderStandard.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LoaderStandard.cpp; path = ../../moses/src/RuleTable/LoaderStandard.cpp; sourceTree = ""; }; - 1EAC363414CDC79300DF97C3 /* LoaderStandard.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LoaderStandard.h; path = ../../moses/src/RuleTable/LoaderStandard.h; sourceTree = ""; }; - 1EBC539E164C44FC00ADFA2C /* WordTranslationFeature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WordTranslationFeature.cpp; path = ../../moses/src/WordTranslationFeature.cpp; sourceTree = ""; }; - 1EBC539F164C44FC00ADFA2C /* WordTranslationFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordTranslationFeature.h; path = ../../moses/src/WordTranslationFeature.h; sourceTree = ""; }; - 1EC32DB615D2D90700A313B1 /* ThrowingFwrite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThrowingFwrite.cpp; path = ../../moses/src/CompactPT/ThrowingFwrite.cpp; sourceTree = ""; }; - 1EC32DB715D2D90700A313B1 /* ThrowingFwrite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThrowingFwrite.h; path = ../../moses/src/CompactPT/ThrowingFwrite.h; sourceTree = ""; }; - 1EC735D314B977AA00238410 /* AlignmentInfo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AlignmentInfo.cpp; path = ../../moses/src/AlignmentInfo.cpp; sourceTree = ""; }; - 1EC735D414B977AA00238410 /* AlignmentInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AlignmentInfo.h; path = ../../moses/src/AlignmentInfo.h; sourceTree = ""; }; - 1EC735D514B977AA00238410 /* AlignmentInfoCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AlignmentInfoCollection.cpp; path = ../../moses/src/AlignmentInfoCollection.cpp; sourceTree = ""; }; - 1EC735D614B977AA00238410 /* AlignmentInfoCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AlignmentInfoCollection.h; path = ../../moses/src/AlignmentInfoCollection.h; sourceTree = ""; }; - 1EC735D714B977AA00238410 /* BilingualDynSuffixArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BilingualDynSuffixArray.cpp; path = ../../moses/src/BilingualDynSuffixArray.cpp; sourceTree = ""; }; - 1EC735D814B977AA00238410 /* BilingualDynSuffixArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BilingualDynSuffixArray.h; path = ../../moses/src/BilingualDynSuffixArray.h; sourceTree = ""; }; - 1EC735D914B977AA00238410 /* BitmapContainer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = BitmapContainer.cpp; path = ../../moses/src/BitmapContainer.cpp; sourceTree = ""; }; - 1EC735DA14B977AA00238410 /* BitmapContainer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = BitmapContainer.h; path = ../../moses/src/BitmapContainer.h; sourceTree = ""; }; - 1EC735DC14B977AA00238410 /* ChartCell.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartCell.cpp; path = ../../moses/src/ChartCell.cpp; sourceTree = ""; }; - 1EC735DD14B977AA00238410 /* ChartCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartCell.h; path = ../../moses/src/ChartCell.h; sourceTree = ""; }; - 1EC735DE14B977AA00238410 /* ChartCellCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartCellCollection.cpp; path = ../../moses/src/ChartCellCollection.cpp; sourceTree = ""; }; - 1EC735DF14B977AA00238410 /* ChartCellCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartCellCollection.h; path = ../../moses/src/ChartCellCollection.h; sourceTree = ""; }; - 1EC735E014B977AA00238410 /* ChartCellLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartCellLabel.h; path = ../../moses/src/ChartCellLabel.h; sourceTree = ""; }; - 1EC735E114B977AA00238410 /* ChartCellLabelSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartCellLabelSet.h; path = ../../moses/src/ChartCellLabelSet.h; sourceTree = ""; }; - 1EC735E214B977AA00238410 /* ChartHypothesis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartHypothesis.cpp; path = ../../moses/src/ChartHypothesis.cpp; sourceTree = ""; }; - 1EC735E314B977AA00238410 /* ChartHypothesis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartHypothesis.h; path = ../../moses/src/ChartHypothesis.h; sourceTree = ""; }; - 1EC735E414B977AA00238410 /* ChartHypothesisCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartHypothesisCollection.cpp; path = ../../moses/src/ChartHypothesisCollection.cpp; sourceTree = ""; }; - 1EC735E514B977AA00238410 /* ChartHypothesisCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartHypothesisCollection.h; path = ../../moses/src/ChartHypothesisCollection.h; sourceTree = ""; }; - 1EC735E614B977AA00238410 /* ChartManager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartManager.cpp; path = ../../moses/src/ChartManager.cpp; sourceTree = ""; }; - 1EC735E714B977AA00238410 /* ChartManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartManager.h; path = ../../moses/src/ChartManager.h; sourceTree = ""; }; - 1EC735E914B977AA00238410 /* ChartRuleLookupManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartRuleLookupManager.h; path = ../../moses/src/ChartRuleLookupManager.h; sourceTree = ""; }; - 1EC735F214B977AA00238410 /* ChartTranslationOptionList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartTranslationOptionList.cpp; path = ../../moses/src/ChartTranslationOptionList.cpp; sourceTree = ""; }; - 1EC735F314B977AA00238410 /* ChartTranslationOptionList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartTranslationOptionList.h; path = ../../moses/src/ChartTranslationOptionList.h; sourceTree = ""; }; - 1EC735F414B977AA00238410 /* ChartTrellisDetour.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartTrellisDetour.cpp; path = ../../moses/src/ChartTrellisDetour.cpp; sourceTree = ""; }; - 1EC735F514B977AA00238410 /* ChartTrellisDetour.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartTrellisDetour.h; path = ../../moses/src/ChartTrellisDetour.h; sourceTree = ""; }; - 1EC735F614B977AA00238410 /* ChartTrellisDetourQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartTrellisDetourQueue.cpp; path = ../../moses/src/ChartTrellisDetourQueue.cpp; sourceTree = ""; }; - 1EC735F714B977AA00238410 /* ChartTrellisDetourQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartTrellisDetourQueue.h; path = ../../moses/src/ChartTrellisDetourQueue.h; sourceTree = ""; }; - 1EC735F814B977AA00238410 /* ChartTrellisNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartTrellisNode.cpp; path = ../../moses/src/ChartTrellisNode.cpp; sourceTree = ""; }; - 1EC735F914B977AA00238410 /* ChartTrellisNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartTrellisNode.h; path = ../../moses/src/ChartTrellisNode.h; sourceTree = ""; }; - 1EC735FA14B977AA00238410 /* ChartTrellisPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartTrellisPath.cpp; path = ../../moses/src/ChartTrellisPath.cpp; sourceTree = ""; }; - 1EC735FB14B977AA00238410 /* ChartTrellisPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartTrellisPath.h; path = ../../moses/src/ChartTrellisPath.h; sourceTree = ""; }; - 1EC735FC14B977AA00238410 /* ChartTrellisPathList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartTrellisPathList.h; path = ../../moses/src/ChartTrellisPathList.h; sourceTree = ""; }; - 1EC735FD14B977AA00238410 /* ConfusionNet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ConfusionNet.cpp; path = ../../moses/src/ConfusionNet.cpp; sourceTree = ""; }; - 1EC735FE14B977AA00238410 /* ConfusionNet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ConfusionNet.h; path = ../../moses/src/ConfusionNet.h; sourceTree = ""; }; - 1EC735FF14B977AA00238410 /* DecodeFeature.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DecodeFeature.cpp; path = ../../moses/src/DecodeFeature.cpp; sourceTree = ""; }; - 1EC7360014B977AA00238410 /* DecodeFeature.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DecodeFeature.h; path = ../../moses/src/DecodeFeature.h; sourceTree = ""; }; - 1EC7360114B977AA00238410 /* DecodeGraph.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DecodeGraph.cpp; path = ../../moses/src/DecodeGraph.cpp; sourceTree = ""; }; - 1EC7360214B977AA00238410 /* DecodeGraph.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DecodeGraph.h; path = ../../moses/src/DecodeGraph.h; sourceTree = ""; }; - 1EC7360314B977AA00238410 /* DecodeStep.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DecodeStep.cpp; path = ../../moses/src/DecodeStep.cpp; sourceTree = ""; }; - 1EC7360414B977AA00238410 /* DecodeStep.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DecodeStep.h; path = ../../moses/src/DecodeStep.h; sourceTree = ""; }; - 1EC7360514B977AA00238410 /* DecodeStepGeneration.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DecodeStepGeneration.cpp; path = ../../moses/src/DecodeStepGeneration.cpp; sourceTree = ""; }; - 1EC7360614B977AA00238410 /* DecodeStepGeneration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DecodeStepGeneration.h; path = ../../moses/src/DecodeStepGeneration.h; sourceTree = ""; }; - 1EC7360714B977AA00238410 /* DecodeStepTranslation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DecodeStepTranslation.cpp; path = ../../moses/src/DecodeStepTranslation.cpp; sourceTree = ""; }; - 1EC7360814B977AA00238410 /* DecodeStepTranslation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DecodeStepTranslation.h; path = ../../moses/src/DecodeStepTranslation.h; sourceTree = ""; }; - 1EC7360914B977AA00238410 /* Dictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Dictionary.cpp; path = ../../moses/src/Dictionary.cpp; sourceTree = ""; }; - 1EC7360A14B977AA00238410 /* Dictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Dictionary.h; path = ../../moses/src/Dictionary.h; sourceTree = ""; }; - 1EC7361114B977AA00238410 /* DummyScoreProducers.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DummyScoreProducers.cpp; path = ../../moses/src/DummyScoreProducers.cpp; sourceTree = ""; }; - 1EC7361214B977AA00238410 /* DummyScoreProducers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DummyScoreProducers.h; path = ../../moses/src/DummyScoreProducers.h; sourceTree = ""; }; - 1EC7361414B977AA00238410 /* fdstream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fdstream.h; sourceTree = ""; }; - 1EC7361714B977AA00238410 /* hash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hash.h; sourceTree = ""; }; - 1EC7361914B977AA00238410 /* onlineRLM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = onlineRLM.h; sourceTree = ""; }; - 1EC7361B14B977AA00238410 /* params.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = params.cpp; sourceTree = ""; }; - 1EC7361D14B977AA00238410 /* params.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = params.h; sourceTree = ""; }; - 1EC7361F14B977AA00238410 /* perfectHash.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = perfectHash.h; sourceTree = ""; }; - 1EC7362114B977AA00238410 /* quantizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = quantizer.h; sourceTree = ""; }; - 1EC7362314B977AA00238410 /* RandLMCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RandLMCache.h; sourceTree = ""; }; - 1EC7362514B977AA00238410 /* RandLMFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RandLMFilter.h; sourceTree = ""; }; - 1EC7362714B977AA00238410 /* types.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = types.h; sourceTree = ""; }; - 1EC7362814B977AA00238410 /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utils.h; sourceTree = ""; }; - 1EC7362914B977AA00238410 /* vocab.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = vocab.cpp; sourceTree = ""; }; - 1EC7362B14B977AA00238410 /* vocab.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = vocab.h; sourceTree = ""; }; - 1EC7362C14B977AA00238410 /* DynSuffixArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DynSuffixArray.cpp; path = ../../moses/src/DynSuffixArray.cpp; sourceTree = ""; }; - 1EC7362D14B977AA00238410 /* DynSuffixArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DynSuffixArray.h; path = ../../moses/src/DynSuffixArray.h; sourceTree = ""; }; - 1EC7362E14B977AA00238410 /* Factor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Factor.cpp; path = ../../moses/src/Factor.cpp; sourceTree = ""; }; - 1EC7362F14B977AA00238410 /* Factor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Factor.h; path = ../../moses/src/Factor.h; sourceTree = ""; }; - 1EC7363014B977AA00238410 /* FactorCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FactorCollection.cpp; path = ../../moses/src/FactorCollection.cpp; sourceTree = ""; }; - 1EC7363114B977AA00238410 /* FactorCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FactorCollection.h; path = ../../moses/src/FactorCollection.h; sourceTree = ""; }; - 1EC7363214B977AA00238410 /* FactorTypeSet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FactorTypeSet.cpp; path = ../../moses/src/FactorTypeSet.cpp; sourceTree = ""; }; - 1EC7363314B977AA00238410 /* FactorTypeSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FactorTypeSet.h; path = ../../moses/src/FactorTypeSet.h; sourceTree = ""; }; - 1EC7363414B977AA00238410 /* FeatureFunction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FeatureFunction.cpp; path = ../../moses/src/FeatureFunction.cpp; sourceTree = ""; }; - 1EC7363514B977AA00238410 /* FeatureFunction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FeatureFunction.h; path = ../../moses/src/FeatureFunction.h; sourceTree = ""; }; - 1EC7363614B977AA00238410 /* FFState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FFState.cpp; path = ../../moses/src/FFState.cpp; sourceTree = ""; }; - 1EC7363714B977AA00238410 /* FFState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FFState.h; path = ../../moses/src/FFState.h; sourceTree = ""; }; - 1EC7363814B977AA00238410 /* File.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = File.cpp; path = ../../moses/src/File.cpp; sourceTree = ""; }; - 1EC7363914B977AA00238410 /* File.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = File.h; path = ../../moses/src/File.h; sourceTree = ""; }; - 1EC7363A14B977AA00238410 /* FilePtr.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FilePtr.h; path = ../../moses/src/FilePtr.h; sourceTree = ""; }; - 1EC7363B14B977AA00238410 /* FloydWarshall.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FloydWarshall.cpp; path = ../../moses/src/FloydWarshall.cpp; sourceTree = ""; }; - 1EC7363C14B977AA00238410 /* FloydWarshall.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FloydWarshall.h; path = ../../moses/src/FloydWarshall.h; sourceTree = ""; }; - 1EC7363D14B977AA00238410 /* GenerationDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GenerationDictionary.cpp; path = ../../moses/src/GenerationDictionary.cpp; sourceTree = ""; }; - 1EC7363E14B977AA00238410 /* GenerationDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GenerationDictionary.h; path = ../../moses/src/GenerationDictionary.h; sourceTree = ""; }; - 1EC7363F14B977AA00238410 /* GlobalLexicalModel.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GlobalLexicalModel.cpp; path = ../../moses/src/GlobalLexicalModel.cpp; sourceTree = ""; }; - 1EC7364014B977AA00238410 /* GlobalLexicalModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GlobalLexicalModel.h; path = ../../moses/src/GlobalLexicalModel.h; sourceTree = ""; }; - 1EC7364114B977AA00238410 /* gzfilebuf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = gzfilebuf.h; path = ../../moses/src/gzfilebuf.h; sourceTree = ""; }; - 1EC7364414B977AA00238410 /* hypergraph.proto */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = hypergraph.proto; path = ../../moses/src/hypergraph.proto; sourceTree = ""; }; - 1EC7364514B977AA00238410 /* Hypothesis.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Hypothesis.cpp; path = ../../moses/src/Hypothesis.cpp; sourceTree = ""; }; - 1EC7364614B977AA00238410 /* Hypothesis.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Hypothesis.h; path = ../../moses/src/Hypothesis.h; sourceTree = ""; }; - 1EC7364714B977AA00238410 /* HypothesisStack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HypothesisStack.cpp; path = ../../moses/src/HypothesisStack.cpp; sourceTree = ""; }; - 1EC7364814B977AA00238410 /* HypothesisStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HypothesisStack.h; path = ../../moses/src/HypothesisStack.h; sourceTree = ""; }; - 1EC7364914B977AA00238410 /* HypothesisStackCubePruning.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HypothesisStackCubePruning.cpp; path = ../../moses/src/HypothesisStackCubePruning.cpp; sourceTree = ""; }; - 1EC7364A14B977AA00238410 /* HypothesisStackCubePruning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HypothesisStackCubePruning.h; path = ../../moses/src/HypothesisStackCubePruning.h; sourceTree = ""; }; - 1EC7364B14B977AA00238410 /* HypothesisStackNormal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = HypothesisStackNormal.cpp; path = ../../moses/src/HypothesisStackNormal.cpp; sourceTree = ""; }; - 1EC7364C14B977AA00238410 /* HypothesisStackNormal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HypothesisStackNormal.h; path = ../../moses/src/HypothesisStackNormal.h; sourceTree = ""; }; - 1EC7364D14B977AA00238410 /* InputFileStream.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InputFileStream.cpp; path = ../../moses/src/InputFileStream.cpp; sourceTree = ""; }; - 1EC7364E14B977AA00238410 /* InputFileStream.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InputFileStream.h; path = ../../moses/src/InputFileStream.h; sourceTree = ""; }; - 1EC7364F14B977AA00238410 /* InputType.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = InputType.cpp; path = ../../moses/src/InputType.cpp; sourceTree = ""; }; - 1EC7365014B977AA00238410 /* InputType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InputType.h; path = ../../moses/src/InputType.h; sourceTree = ""; }; - 1EC7365414B977AA00238410 /* LexicalReordering.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexicalReordering.cpp; path = ../../moses/src/LexicalReordering.cpp; sourceTree = ""; }; - 1EC7365514B977AA00238410 /* LexicalReordering.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexicalReordering.h; path = ../../moses/src/LexicalReordering.h; sourceTree = ""; }; - 1EC7365614B977AA00238410 /* LexicalReorderingState.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexicalReorderingState.cpp; path = ../../moses/src/LexicalReorderingState.cpp; sourceTree = ""; }; - 1EC7365714B977AA00238410 /* LexicalReorderingState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexicalReorderingState.h; path = ../../moses/src/LexicalReorderingState.h; sourceTree = ""; }; - 1EC7365814B977AA00238410 /* LexicalReorderingTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexicalReorderingTable.cpp; path = ../../moses/src/LexicalReorderingTable.cpp; sourceTree = ""; }; - 1EC7365914B977AA00238410 /* LexicalReorderingTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LexicalReorderingTable.h; path = ../../moses/src/LexicalReorderingTable.h; sourceTree = ""; }; - 1EC7365C14B977AA00238410 /* Base.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Base.cpp; sourceTree = ""; }; - 1EC7365E14B977AA00238410 /* Base.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Base.h; sourceTree = ""; }; - 1EC7368714B977AA00238410 /* Factory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Factory.cpp; sourceTree = ""; }; - 1EC7368814B977AA00238410 /* Factory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Factory.h; sourceTree = ""; }; - 1EC7368914B977AA00238410 /* Implementation.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Implementation.cpp; sourceTree = ""; }; - 1EC7368B14B977AA00238410 /* Implementation.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Implementation.h; sourceTree = ""; }; - 1EC7368D14B977AA00238410 /* IRST.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = IRST.cpp; sourceTree = ""; }; - 1EC7368F14B977AA00238410 /* IRST.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IRST.h; sourceTree = ""; }; - 1EC7369114B977AA00238410 /* Joint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Joint.cpp; sourceTree = ""; }; - 1EC7369214B977AA00238410 /* Joint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Joint.h; sourceTree = ""; }; - 1EC7369314B977AA00238410 /* Ken.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Ken.cpp; sourceTree = ""; }; - 1EC7369514B977AA00238410 /* Ken.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Ken.h; sourceTree = ""; }; - 1EC7369714B977AA00238410 /* MultiFactor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MultiFactor.cpp; sourceTree = ""; }; - 1EC7369814B977AA00238410 /* MultiFactor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MultiFactor.h; sourceTree = ""; }; - 1EC7369914B977AA00238410 /* ORLM.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ORLM.cpp; sourceTree = ""; }; - 1EC7369B14B977AA00238410 /* ORLM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ORLM.h; sourceTree = ""; }; - 1EC736A314B977AA00238410 /* Remote.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Remote.cpp; sourceTree = ""; }; - 1EC736A414B977AA00238410 /* Remote.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Remote.h; sourceTree = ""; }; - 1EC736A514B977AA00238410 /* SingleFactor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SingleFactor.cpp; sourceTree = ""; }; - 1EC736A614B977AA00238410 /* SingleFactor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SingleFactor.h; sourceTree = ""; }; - 1EC736A714B977AA00238410 /* SRI.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = SRI.cpp; sourceTree = ""; }; - 1EC736A814B977AA00238410 /* SRI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SRI.h; sourceTree = ""; }; - 1EC736A914B977AA00238410 /* LMList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LMList.cpp; path = ../../moses/src/LMList.cpp; sourceTree = ""; }; - 1EC736AA14B977AA00238410 /* LMList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LMList.h; path = ../../moses/src/LMList.h; sourceTree = ""; }; - 1EC736AB14B977AA00238410 /* LVoc.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LVoc.cpp; path = ../../moses/src/LVoc.cpp; sourceTree = ""; }; - 1EC736AC14B977AA00238410 /* LVoc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LVoc.h; path = ../../moses/src/LVoc.h; sourceTree = ""; }; - 1EC736AD14B977AA00238410 /* Manager.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Manager.cpp; path = ../../moses/src/Manager.cpp; sourceTree = ""; }; - 1EC736AE14B977AA00238410 /* Manager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Manager.h; path = ../../moses/src/Manager.h; sourceTree = ""; }; - 1EC736AF14B977AA00238410 /* NonTerminal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = NonTerminal.cpp; path = ../../moses/src/NonTerminal.cpp; sourceTree = ""; }; - 1EC736B014B977AA00238410 /* NonTerminal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NonTerminal.h; path = ../../moses/src/NonTerminal.h; sourceTree = ""; }; - 1EC736B114B977AA00238410 /* ObjectPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ObjectPool.h; path = ../../moses/src/ObjectPool.h; sourceTree = ""; }; - 1EC736B214B977AA00238410 /* OutputCollector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OutputCollector.h; path = ../../moses/src/OutputCollector.h; sourceTree = ""; }; - 1EC736B514B977AA00238410 /* Parameter.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Parameter.cpp; path = ../../moses/src/Parameter.cpp; sourceTree = ""; }; - 1EC736B614B977AA00238410 /* Parameter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Parameter.h; path = ../../moses/src/Parameter.h; sourceTree = ""; }; - 1EC736B714B977AA00238410 /* PartialTranslOptColl.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PartialTranslOptColl.cpp; path = ../../moses/src/PartialTranslOptColl.cpp; sourceTree = ""; }; - 1EC736B814B977AA00238410 /* PartialTranslOptColl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PartialTranslOptColl.h; path = ../../moses/src/PartialTranslOptColl.h; sourceTree = ""; }; - 1EC736B914B977AA00238410 /* PCNTools.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PCNTools.cpp; path = ../../moses/src/PCNTools.cpp; sourceTree = ""; }; - 1EC736BA14B977AA00238410 /* PCNTools.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PCNTools.h; path = ../../moses/src/PCNTools.h; sourceTree = ""; }; - 1EC736BB14B977AA00238410 /* PDTAimp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PDTAimp.h; path = ../../moses/src/PDTAimp.h; sourceTree = ""; }; - 1EC736BC14B977AA00238410 /* Phrase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Phrase.cpp; path = ../../moses/src/Phrase.cpp; sourceTree = ""; }; - 1EC736BD14B977AA00238410 /* Phrase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Phrase.h; path = ../../moses/src/Phrase.h; sourceTree = ""; }; - 1EC736BE14B977AA00238410 /* PhraseDictionary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionary.cpp; path = ../../moses/src/PhraseDictionary.cpp; sourceTree = ""; }; - 1EC736BF14B977AA00238410 /* PhraseDictionary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionary.h; path = ../../moses/src/PhraseDictionary.h; sourceTree = ""; }; - 1EC736C214B977AA00238410 /* PhraseDictionaryDynSuffixArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryDynSuffixArray.cpp; path = ../../moses/src/PhraseDictionaryDynSuffixArray.cpp; sourceTree = ""; }; - 1EC736C314B977AA00238410 /* PhraseDictionaryDynSuffixArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryDynSuffixArray.h; path = ../../moses/src/PhraseDictionaryDynSuffixArray.h; sourceTree = ""; }; - 1EC736C614B977AA00238410 /* PhraseDictionaryMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryMemory.cpp; path = ../../moses/src/PhraseDictionaryMemory.cpp; sourceTree = ""; }; - 1EC736C714B977AA00238410 /* PhraseDictionaryMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryMemory.h; path = ../../moses/src/PhraseDictionaryMemory.h; sourceTree = ""; }; - 1EC736C814B977AA00238410 /* PhraseDictionaryNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryNode.cpp; path = ../../moses/src/PhraseDictionaryNode.cpp; sourceTree = ""; }; - 1EC736C914B977AA00238410 /* PhraseDictionaryNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryNode.h; path = ../../moses/src/PhraseDictionaryNode.h; sourceTree = ""; }; - 1EC736D014B977AA00238410 /* PhraseDictionaryTree.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryTree.cpp; path = ../../moses/src/PhraseDictionaryTree.cpp; sourceTree = ""; }; - 1EC736D114B977AA00238410 /* PhraseDictionaryTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryTree.h; path = ../../moses/src/PhraseDictionaryTree.h; sourceTree = ""; }; - 1EC736D214B977AA00238410 /* PhraseDictionaryTreeAdaptor.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryTreeAdaptor.cpp; path = ../../moses/src/PhraseDictionaryTreeAdaptor.cpp; sourceTree = ""; }; - 1EC736D314B977AA00238410 /* PhraseDictionaryTreeAdaptor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryTreeAdaptor.h; path = ../../moses/src/PhraseDictionaryTreeAdaptor.h; sourceTree = ""; }; - 1EC736D414B977AA00238410 /* PrefixTree.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PrefixTree.h; path = ../../moses/src/PrefixTree.h; sourceTree = ""; }; - 1EC736D514B977AA00238410 /* PrefixTreeMap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PrefixTreeMap.cpp; path = ../../moses/src/PrefixTreeMap.cpp; sourceTree = ""; }; - 1EC736D614B977AA00238410 /* PrefixTreeMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PrefixTreeMap.h; path = ../../moses/src/PrefixTreeMap.h; sourceTree = ""; }; - 1EC736D714B977AA00238410 /* ReorderingConstraint.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ReorderingConstraint.cpp; path = ../../moses/src/ReorderingConstraint.cpp; sourceTree = ""; }; - 1EC736D814B977AA00238410 /* ReorderingConstraint.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ReorderingConstraint.h; path = ../../moses/src/ReorderingConstraint.h; sourceTree = ""; }; - 1EC736D914B977AA00238410 /* ReorderingStack.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ReorderingStack.cpp; path = ../../moses/src/ReorderingStack.cpp; sourceTree = ""; }; - 1EC736DA14B977AA00238410 /* ReorderingStack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ReorderingStack.h; path = ../../moses/src/ReorderingStack.h; sourceTree = ""; }; - 1EC736DB14B977AA00238410 /* rule.proto */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = rule.proto; path = ../../moses/src/rule.proto; sourceTree = ""; }; - 1EC736DC14B977AA00238410 /* RuleCube.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RuleCube.cpp; path = ../../moses/src/RuleCube.cpp; sourceTree = ""; }; - 1EC736DD14B977AB00238410 /* RuleCube.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RuleCube.h; path = ../../moses/src/RuleCube.h; sourceTree = ""; }; - 1EC736DE14B977AB00238410 /* RuleCubeItem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RuleCubeItem.cpp; path = ../../moses/src/RuleCubeItem.cpp; sourceTree = ""; }; - 1EC736DF14B977AB00238410 /* RuleCubeItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RuleCubeItem.h; path = ../../moses/src/RuleCubeItem.h; sourceTree = ""; }; - 1EC736E014B977AB00238410 /* RuleCubeQueue.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RuleCubeQueue.cpp; path = ../../moses/src/RuleCubeQueue.cpp; sourceTree = ""; }; - 1EC736E114B977AB00238410 /* RuleCubeQueue.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RuleCubeQueue.h; path = ../../moses/src/RuleCubeQueue.h; sourceTree = ""; }; - 1EC736EB14B977AB00238410 /* ScoreComponentCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScoreComponentCollection.cpp; path = ../../moses/src/ScoreComponentCollection.cpp; sourceTree = ""; }; - 1EC736EC14B977AB00238410 /* ScoreComponentCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScoreComponentCollection.h; path = ../../moses/src/ScoreComponentCollection.h; sourceTree = ""; }; - 1EC736EF14B977AB00238410 /* ScoreProducer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScoreProducer.cpp; path = ../../moses/src/ScoreProducer.cpp; sourceTree = ""; }; - 1EC736F014B977AB00238410 /* ScoreProducer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScoreProducer.h; path = ../../moses/src/ScoreProducer.h; sourceTree = ""; }; - 1EC736F114B977AB00238410 /* Search.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Search.cpp; path = ../../moses/src/Search.cpp; sourceTree = ""; }; - 1EC736F214B977AB00238410 /* Search.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Search.h; path = ../../moses/src/Search.h; sourceTree = ""; }; - 1EC736F314B977AB00238410 /* SearchCubePruning.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SearchCubePruning.cpp; path = ../../moses/src/SearchCubePruning.cpp; sourceTree = ""; }; - 1EC736F414B977AB00238410 /* SearchCubePruning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SearchCubePruning.h; path = ../../moses/src/SearchCubePruning.h; sourceTree = ""; }; - 1EC736F514B977AB00238410 /* SearchNormal.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SearchNormal.cpp; path = ../../moses/src/SearchNormal.cpp; sourceTree = ""; }; - 1EC736F614B977AB00238410 /* SearchNormal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SearchNormal.h; path = ../../moses/src/SearchNormal.h; sourceTree = ""; }; - 1EC736F714B977AB00238410 /* Sentence.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Sentence.cpp; path = ../../moses/src/Sentence.cpp; sourceTree = ""; }; - 1EC736F814B977AB00238410 /* Sentence.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sentence.h; path = ../../moses/src/Sentence.h; sourceTree = ""; }; - 1EC736F914B977AB00238410 /* SentenceStats.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SentenceStats.cpp; path = ../../moses/src/SentenceStats.cpp; sourceTree = ""; }; - 1EC736FA14B977AB00238410 /* SentenceStats.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentenceStats.h; path = ../../moses/src/SentenceStats.h; sourceTree = ""; }; - 1EC736FB14B977AB00238410 /* SquareMatrix.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SquareMatrix.cpp; path = ../../moses/src/SquareMatrix.cpp; sourceTree = ""; }; - 1EC736FC14B977AB00238410 /* SquareMatrix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SquareMatrix.h; path = ../../moses/src/SquareMatrix.h; sourceTree = ""; }; - 1EC736FF14B977AB00238410 /* StaticData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StaticData.cpp; path = ../../moses/src/StaticData.cpp; sourceTree = ""; }; - 1EC7370014B977AB00238410 /* StaticData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StaticData.h; path = ../../moses/src/StaticData.h; sourceTree = ""; }; - 1EC7370714B977AB00238410 /* TargetPhrase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TargetPhrase.cpp; path = ../../moses/src/TargetPhrase.cpp; sourceTree = ""; }; - 1EC7370814B977AB00238410 /* TargetPhrase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TargetPhrase.h; path = ../../moses/src/TargetPhrase.h; sourceTree = ""; }; - 1EC7370914B977AB00238410 /* TargetPhraseCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TargetPhraseCollection.cpp; path = ../../moses/src/TargetPhraseCollection.cpp; sourceTree = ""; }; - 1EC7370A14B977AB00238410 /* TargetPhraseCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TargetPhraseCollection.h; path = ../../moses/src/TargetPhraseCollection.h; sourceTree = ""; }; - 1EC7370B14B977AB00238410 /* ThreadPool.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ThreadPool.cpp; path = ../../moses/src/ThreadPool.cpp; sourceTree = ""; }; - 1EC7370C14B977AB00238410 /* ThreadPool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ThreadPool.h; path = ../../moses/src/ThreadPool.h; sourceTree = ""; }; - 1EC7370D14B977AB00238410 /* Timer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Timer.cpp; path = ../../moses/src/Timer.cpp; sourceTree = ""; }; - 1EC7370E14B977AB00238410 /* Timer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Timer.h; path = ../../moses/src/Timer.h; sourceTree = ""; }; - 1EC7370F14B977AB00238410 /* TranslationOption.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TranslationOption.cpp; path = ../../moses/src/TranslationOption.cpp; sourceTree = ""; }; - 1EC7371014B977AB00238410 /* TranslationOption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TranslationOption.h; path = ../../moses/src/TranslationOption.h; sourceTree = ""; }; - 1EC7371114B977AB00238410 /* TranslationOptionCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TranslationOptionCollection.cpp; path = ../../moses/src/TranslationOptionCollection.cpp; sourceTree = ""; }; - 1EC7371214B977AB00238410 /* TranslationOptionCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TranslationOptionCollection.h; path = ../../moses/src/TranslationOptionCollection.h; sourceTree = ""; }; - 1EC7371314B977AB00238410 /* TranslationOptionCollectionConfusionNet.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TranslationOptionCollectionConfusionNet.cpp; path = ../../moses/src/TranslationOptionCollectionConfusionNet.cpp; sourceTree = ""; }; - 1EC7371414B977AB00238410 /* TranslationOptionCollectionConfusionNet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TranslationOptionCollectionConfusionNet.h; path = ../../moses/src/TranslationOptionCollectionConfusionNet.h; sourceTree = ""; }; - 1EC7371514B977AB00238410 /* TranslationOptionCollectionText.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TranslationOptionCollectionText.cpp; path = ../../moses/src/TranslationOptionCollectionText.cpp; sourceTree = ""; }; - 1EC7371614B977AB00238410 /* TranslationOptionCollectionText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TranslationOptionCollectionText.h; path = ../../moses/src/TranslationOptionCollectionText.h; sourceTree = ""; }; - 1EC7371714B977AB00238410 /* TranslationOptionList.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TranslationOptionList.cpp; path = ../../moses/src/TranslationOptionList.cpp; sourceTree = ""; }; - 1EC7371814B977AB00238410 /* TranslationOptionList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TranslationOptionList.h; path = ../../moses/src/TranslationOptionList.h; sourceTree = ""; }; - 1EC7371914B977AB00238410 /* TranslationSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TranslationSystem.cpp; path = ../../moses/src/TranslationSystem.cpp; sourceTree = ""; }; - 1EC7371A14B977AB00238410 /* TranslationSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TranslationSystem.h; path = ../../moses/src/TranslationSystem.h; sourceTree = ""; }; - 1EC7371B14B977AB00238410 /* TreeInput.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TreeInput.cpp; path = ../../moses/src/TreeInput.cpp; sourceTree = ""; }; - 1EC7371C14B977AB00238410 /* TreeInput.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TreeInput.h; path = ../../moses/src/TreeInput.h; sourceTree = ""; }; - 1EC7371F14B977AB00238410 /* TrellisPath.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TrellisPath.cpp; path = ../../moses/src/TrellisPath.cpp; sourceTree = ""; }; - 1EC7372014B977AB00238410 /* TrellisPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TrellisPath.h; path = ../../moses/src/TrellisPath.h; sourceTree = ""; }; - 1EC7372314B977AB00238410 /* TrellisPathCollection.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = TrellisPathCollection.cpp; path = ../../moses/src/TrellisPathCollection.cpp; sourceTree = ""; }; - 1EC7372414B977AB00238410 /* TrellisPathCollection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TrellisPathCollection.h; path = ../../moses/src/TrellisPathCollection.h; sourceTree = ""; }; - 1EC7372714B977AB00238410 /* TrellisPathList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TrellisPathList.h; path = ../../moses/src/TrellisPathList.h; sourceTree = ""; }; - 1EC7372814B977AB00238410 /* TypeDef.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TypeDef.h; path = ../../moses/src/TypeDef.h; sourceTree = ""; }; - 1EC7372914B977AB00238410 /* UniqueObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniqueObject.h; path = ../../moses/src/UniqueObject.h; sourceTree = ""; }; - 1EC7372A14B977AB00238410 /* UserMessage.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UserMessage.cpp; path = ../../moses/src/UserMessage.cpp; sourceTree = ""; }; - 1EC7372B14B977AB00238410 /* UserMessage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UserMessage.h; path = ../../moses/src/UserMessage.h; sourceTree = ""; }; - 1EC7372E14B977AB00238410 /* Util.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Util.cpp; path = ../../moses/src/Util.cpp; sourceTree = ""; }; - 1EC7372F14B977AB00238410 /* Util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Util.h; path = ../../moses/src/Util.h; sourceTree = ""; }; - 1EC7373214B977AB00238410 /* Word.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Word.cpp; path = ../../moses/src/Word.cpp; sourceTree = ""; }; - 1EC7373314B977AB00238410 /* Word.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Word.h; path = ../../moses/src/Word.h; sourceTree = ""; }; - 1EC7373614B977AB00238410 /* WordLattice.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WordLattice.cpp; path = ../../moses/src/WordLattice.cpp; sourceTree = ""; }; - 1EC7373714B977AB00238410 /* WordLattice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordLattice.h; path = ../../moses/src/WordLattice.h; sourceTree = ""; }; - 1EC7373A14B977AB00238410 /* WordsBitmap.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WordsBitmap.cpp; path = ../../moses/src/WordsBitmap.cpp; sourceTree = ""; }; - 1EC7373B14B977AB00238410 /* WordsBitmap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordsBitmap.h; path = ../../moses/src/WordsBitmap.h; sourceTree = ""; }; - 1EC7373E14B977AB00238410 /* WordsRange.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WordsRange.cpp; path = ../../moses/src/WordsRange.cpp; sourceTree = ""; }; - 1EC7373F14B977AB00238410 /* WordsRange.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WordsRange.h; path = ../../moses/src/WordsRange.h; sourceTree = ""; }; - 1EC7374214B977AB00238410 /* XmlOption.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = XmlOption.cpp; path = ../../moses/src/XmlOption.cpp; sourceTree = ""; }; - 1EC7374314B977AB00238410 /* XmlOption.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XmlOption.h; path = ../../moses/src/XmlOption.h; sourceTree = ""; }; - 1EDA803614D19EEF003D2191 /* ApplicableRuleTrie.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ApplicableRuleTrie.cpp; path = ../../moses/src/Scope3Parser/ApplicableRuleTrie.cpp; sourceTree = ""; }; - 1EDA803714D19EEF003D2191 /* ApplicableRuleTrie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ApplicableRuleTrie.h; path = ../../moses/src/Scope3Parser/ApplicableRuleTrie.h; sourceTree = ""; }; - 1EDA804314D19EEF003D2191 /* IntermediateVarSpanNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = IntermediateVarSpanNode.h; path = ../../moses/src/Scope3Parser/IntermediateVarSpanNode.h; sourceTree = ""; }; - 1EDA804514D19EEF003D2191 /* Parser.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Parser.cpp; path = ../../moses/src/Scope3Parser/Parser.cpp; sourceTree = ""; }; - 1EDA804614D19EEF003D2191 /* Parser.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Parser.h; path = ../../moses/src/Scope3Parser/Parser.h; sourceTree = ""; }; - 1EDA804714D19EEF003D2191 /* SentenceMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentenceMap.h; path = ../../moses/src/Scope3Parser/SentenceMap.h; sourceTree = ""; }; - 1EDA804814D19EEF003D2191 /* StackLattice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StackLattice.h; path = ../../moses/src/Scope3Parser/StackLattice.h; sourceTree = ""; }; - 1EDA804914D19EEF003D2191 /* StackLatticeBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StackLatticeBuilder.cpp; path = ../../moses/src/Scope3Parser/StackLatticeBuilder.cpp; sourceTree = ""; }; - 1EDA804A14D19EEF003D2191 /* StackLatticeBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StackLatticeBuilder.h; path = ../../moses/src/Scope3Parser/StackLatticeBuilder.h; sourceTree = ""; }; - 1EDA804B14D19EEF003D2191 /* StackLatticeSearcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StackLatticeSearcher.h; path = ../../moses/src/Scope3Parser/StackLatticeSearcher.h; sourceTree = ""; }; - 1EDA804C14D19EEF003D2191 /* VarSpanNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VarSpanNode.h; path = ../../moses/src/Scope3Parser/VarSpanNode.h; sourceTree = ""; }; - 1EDA804D14D19EEF003D2191 /* VarSpanTrieBuilder.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = VarSpanTrieBuilder.cpp; path = ../../moses/src/Scope3Parser/VarSpanTrieBuilder.cpp; sourceTree = ""; }; - 1EDA804E14D19EEF003D2191 /* VarSpanTrieBuilder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VarSpanTrieBuilder.h; path = ../../moses/src/Scope3Parser/VarSpanTrieBuilder.h; sourceTree = ""; }; - 1EDA806214D19F12003D2191 /* ChartRuleLookupManagerCYKPlus.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartRuleLookupManagerCYKPlus.cpp; path = ../../moses/src/CYKPlusParser/ChartRuleLookupManagerCYKPlus.cpp; sourceTree = ""; }; - 1EDA806314D19F12003D2191 /* ChartRuleLookupManagerCYKPlus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartRuleLookupManagerCYKPlus.h; path = ../../moses/src/CYKPlusParser/ChartRuleLookupManagerCYKPlus.h; sourceTree = ""; }; - 1EDA806414D19F12003D2191 /* ChartRuleLookupManagerMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartRuleLookupManagerMemory.cpp; path = ../../moses/src/CYKPlusParser/ChartRuleLookupManagerMemory.cpp; sourceTree = ""; }; - 1EDA806514D19F12003D2191 /* ChartRuleLookupManagerMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartRuleLookupManagerMemory.h; path = ../../moses/src/CYKPlusParser/ChartRuleLookupManagerMemory.h; sourceTree = ""; }; - 1EDA806614D19F12003D2191 /* ChartRuleLookupManagerOnDisk.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChartRuleLookupManagerOnDisk.cpp; path = ../../moses/src/CYKPlusParser/ChartRuleLookupManagerOnDisk.cpp; sourceTree = ""; }; - 1EDA806714D19F12003D2191 /* ChartRuleLookupManagerOnDisk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChartRuleLookupManagerOnDisk.h; path = ../../moses/src/CYKPlusParser/ChartRuleLookupManagerOnDisk.h; sourceTree = ""; }; - 1EDA806814D19F12003D2191 /* DotChart.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DotChart.h; path = ../../moses/src/CYKPlusParser/DotChart.h; sourceTree = ""; }; - 1EDA806914D19F12003D2191 /* DotChartInMemory.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DotChartInMemory.cpp; path = ../../moses/src/CYKPlusParser/DotChartInMemory.cpp; sourceTree = ""; }; - 1EDA806A14D19F12003D2191 /* DotChartInMemory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DotChartInMemory.h; path = ../../moses/src/CYKPlusParser/DotChartInMemory.h; sourceTree = ""; }; - 1EDA806B14D19F12003D2191 /* DotChartOnDisk.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DotChartOnDisk.cpp; path = ../../moses/src/CYKPlusParser/DotChartOnDisk.cpp; sourceTree = ""; }; - 1EDA806C14D19F12003D2191 /* DotChartOnDisk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DotChartOnDisk.h; path = ../../moses/src/CYKPlusParser/DotChartOnDisk.h; sourceTree = ""; }; - 1EDA807814D19FBF003D2191 /* PhraseDictionaryALSuffixArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryALSuffixArray.cpp; path = ../../moses/src/RuleTable/PhraseDictionaryALSuffixArray.cpp; sourceTree = ""; }; - 1EDA807914D19FBF003D2191 /* PhraseDictionaryALSuffixArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryALSuffixArray.h; path = ../../moses/src/RuleTable/PhraseDictionaryALSuffixArray.h; sourceTree = ""; }; - 1EDA807A14D19FBF003D2191 /* PhraseDictionaryNodeSCFG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryNodeSCFG.cpp; path = ../../moses/src/RuleTable/PhraseDictionaryNodeSCFG.cpp; sourceTree = ""; }; - 1EDA807B14D19FBF003D2191 /* PhraseDictionaryNodeSCFG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryNodeSCFG.h; path = ../../moses/src/RuleTable/PhraseDictionaryNodeSCFG.h; sourceTree = ""; }; - 1EDA807C14D19FBF003D2191 /* PhraseDictionaryOnDisk.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionaryOnDisk.cpp; path = ../../moses/src/RuleTable/PhraseDictionaryOnDisk.cpp; sourceTree = ""; }; - 1EDA807D14D19FBF003D2191 /* PhraseDictionaryOnDisk.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionaryOnDisk.h; path = ../../moses/src/RuleTable/PhraseDictionaryOnDisk.h; sourceTree = ""; }; - 1EDA807E14D19FBF003D2191 /* PhraseDictionarySCFG.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PhraseDictionarySCFG.cpp; path = ../../moses/src/RuleTable/PhraseDictionarySCFG.cpp; sourceTree = ""; }; - 1EDA807F14D19FBF003D2191 /* PhraseDictionarySCFG.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PhraseDictionarySCFG.h; path = ../../moses/src/RuleTable/PhraseDictionarySCFG.h; sourceTree = ""; }; - 1EDA808014D19FBF003D2191 /* Trie.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Trie.cpp; path = ../../moses/src/RuleTable/Trie.cpp; sourceTree = ""; }; - 1EDA808114D19FBF003D2191 /* Trie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Trie.h; path = ../../moses/src/RuleTable/Trie.h; sourceTree = ""; }; - 1EDA808214D19FBF003D2191 /* UTrie.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UTrie.cpp; path = ../../moses/src/RuleTable/UTrie.cpp; sourceTree = ""; }; - 1EDA808314D19FBF003D2191 /* UTrie.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UTrie.h; path = ../../moses/src/RuleTable/UTrie.h; sourceTree = ""; }; - 1EDA808414D19FBF003D2191 /* UTrieNode.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UTrieNode.cpp; path = ../../moses/src/RuleTable/UTrieNode.cpp; sourceTree = ""; }; - 1EDA808514D19FBF003D2191 /* UTrieNode.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UTrieNode.h; path = ../../moses/src/RuleTable/UTrieNode.h; sourceTree = ""; }; - 1EE418E415C7FDCB0028F9AB /* Match.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Match.h; path = "../../moses/src/fuzzy-match/Match.h"; sourceTree = ""; }; - 1EE418E515C7FDCB0028F9AB /* SentenceAlignment.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SentenceAlignment.cpp; path = "../../moses/src/fuzzy-match/SentenceAlignment.cpp"; sourceTree = ""; }; - 1EE418E615C7FDCB0028F9AB /* SentenceAlignment.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SentenceAlignment.h; path = "../../moses/src/fuzzy-match/SentenceAlignment.h"; sourceTree = ""; }; - 1EE418E715C7FDCB0028F9AB /* SuffixArray.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = SuffixArray.cpp; path = "../../moses/src/fuzzy-match/SuffixArray.cpp"; sourceTree = ""; }; - 1EE418E815C7FDCB0028F9AB /* SuffixArray.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SuffixArray.h; path = "../../moses/src/fuzzy-match/SuffixArray.h"; sourceTree = ""; }; - 1EE418E915C7FDCB0028F9AB /* FuzzyMatchWrapper.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = FuzzyMatchWrapper.cpp; path = "../../moses/src/fuzzy-match/FuzzyMatchWrapper.cpp"; sourceTree = ""; }; - 1EE418EA15C7FDCB0028F9AB /* FuzzyMatchWrapper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FuzzyMatchWrapper.h; path = "../../moses/src/fuzzy-match/FuzzyMatchWrapper.h"; sourceTree = ""; }; - 1EE418EB15C7FDCB0028F9AB /* Vocabulary.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Vocabulary.cpp; path = "../../moses/src/fuzzy-match/Vocabulary.cpp"; sourceTree = ""; }; - 1EE418EC15C7FDCB0028F9AB /* Vocabulary.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Vocabulary.h; path = "../../moses/src/fuzzy-match/Vocabulary.h"; sourceTree = ""; }; - 1EF0709114B9EFCC0052152A /* ParallelBackoff.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParallelBackoff.cpp; sourceTree = ""; }; - 1EF0709214B9EFCC0052152A /* ParallelBackoff.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ParallelBackoff.h; sourceTree = ""; }; - 1EF8F2C3159A61970047B613 /* HypoList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HypoList.h; path = ../../moses/src/HypoList.h; sourceTree = ""; }; - D2AAC046055464E500DB518D /* libmoses.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libmoses.a; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - D289987405E68DCB004EDB86 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E3165AD163B0CB200F64999 /* FuzzyMatchWrapper.o in Frameworks */, - 1E3165AE163B0CB200F64999 /* libfuzzy-match.a in Frameworks */, - 1E3165AF163B0CB200F64999 /* SentenceAlignment.o in Frameworks */, - 1E3165B0163B0CB200F64999 /* SuffixArray.o in Frameworks */, - 1E3165B1163B0CB200F64999 /* Vocabulary.o in Frameworks */, - 1E3165B2163B0CB200F64999 /* FuzzyMatchWrapper.o in Frameworks */, - 1E3165B3163B0CB200F64999 /* libfuzzy-match.a in Frameworks */, - 1E3165B4163B0CB200F64999 /* SentenceAlignment.o in Frameworks */, - 1E3165B5163B0CB200F64999 /* SuffixArray.o in Frameworks */, - 1E3165B6163B0CB200F64999 /* TMMTWrapper.o in Frameworks */, - 1E3165B7163B0CB200F64999 /* Vocabulary.o in Frameworks */, - 1E3165C4163B0CB200F64999 /* Fill.o in Frameworks */, - 1E3165C5163B0CB200F64999 /* libIncremental.a in Frameworks */, - 1E3165C6163B0CB200F64999 /* Manager.o in Frameworks */, - 1E3165D0163B0CB200F64999 /* Base.o in Frameworks */, - 1E3165D1163B0CB200F64999 /* Factory.o in Frameworks */, - 1E3165D2163B0CB200F64999 /* Implementation.o in Frameworks */, - 1E3165D3163B0CB200F64999 /* IRST.o in Frameworks */, - 1E3165D4163B0CB200F64999 /* Joint.o in Frameworks */, - 1E3165D5163B0CB200F64999 /* Ken.o in Frameworks */, - 1E3165D6163B0CB200F64999 /* libLM.a in Frameworks */, - 1E3165D7163B0CB200F64999 /* MultiFactor.o in Frameworks */, - 1E3165D8163B0CB200F64999 /* ORLM.o in Frameworks */, - 1E3165D9163B0CB200F64999 /* ParallelBackoff.o in Frameworks */, - 1E3165DA163B0CB200F64999 /* Rand.o in Frameworks */, - 1E3165DB163B0CB200F64999 /* Remote.o in Frameworks */, - 1E3165DC163B0CB200F64999 /* SingleFactor.o in Frameworks */, - 1E3165DD163B0CB200F64999 /* SRI.o in Frameworks */, - 1E3165DE163B0CB200F64999 /* Base.o in Frameworks */, - 1E3165DF163B0CB200F64999 /* Factory.o in Frameworks */, - 1E3165E0163B0CB200F64999 /* Implementation.o in Frameworks */, - 1E3165E1163B0CB200F64999 /* IRST.o in Frameworks */, - 1E3165E2163B0CB200F64999 /* Joint.o in Frameworks */, - 1E3165E3163B0CB200F64999 /* Ken.o in Frameworks */, - 1E3165E4163B0CB200F64999 /* libLM.a in Frameworks */, - 1E3165E5163B0CB200F64999 /* MultiFactor.o in Frameworks */, - 1E3165E6163B0CB200F64999 /* ORLM.o in Frameworks */, - 1E3165E7163B0CB200F64999 /* ParallelBackoff.o in Frameworks */, - 1E3165E8163B0CB200F64999 /* Rand.o in Frameworks */, - 1E3165E9163B0CB200F64999 /* Remote.o in Frameworks */, - 1E3165EA163B0CB200F64999 /* SingleFactor.o in Frameworks */, - 1E3165EB163B0CB200F64999 /* SRI.o in Frameworks */, - 1E3165EC163B0CB200F64999 /* Base.o in Frameworks */, - 1E3165ED163B0CB200F64999 /* Factory.o in Frameworks */, - 1E3165EE163B0CB200F64999 /* Implementation.o in Frameworks */, - 1E3165EF163B0CB200F64999 /* IRST.o in Frameworks */, - 1E3165F0163B0CB200F64999 /* Joint.o in Frameworks */, - 1E3165F1163B0CB200F64999 /* Ken.o in Frameworks */, - 1E3165F2163B0CB200F64999 /* MultiFactor.o in Frameworks */, - 1E3165F3163B0CB200F64999 /* ParallelBackoff.o in Frameworks */, - 1E3165F4163B0CB200F64999 /* Remote.o in Frameworks */, - 1E3165F5163B0CB200F64999 /* SingleFactor.o in Frameworks */, - 1E3165F6163B0CB200F64999 /* SRI.o in Frameworks */, - 1E3165F7163B0CB200F64999 /* Base.o in Frameworks */, - 1E3165F8163B0CB200F64999 /* Factory.o in Frameworks */, - 1E3165F9163B0CB200F64999 /* Implementation.o in Frameworks */, - 1E3165FA163B0CB200F64999 /* Joint.o in Frameworks */, - 1E3165FB163B0CB200F64999 /* Ken.o in Frameworks */, - 1E3165FC163B0CB200F64999 /* libLM.a in Frameworks */, - 1E3165FD163B0CB200F64999 /* MultiFactor.o in Frameworks */, - 1E3165FE163B0CB200F64999 /* Remote.o in Frameworks */, - 1E3165FF163B0CB200F64999 /* SingleFactor.o in Frameworks */, - 1E316600163B0CB200F64999 /* Base.o in Frameworks */, - 1E316601163B0CB200F64999 /* Factory.o in Frameworks */, - 1E316602163B0CB200F64999 /* Implementation.o in Frameworks */, - 1E316603163B0CB200F64999 /* Joint.o in Frameworks */, - 1E316604163B0CB200F64999 /* Ken.o in Frameworks */, - 1E316605163B0CB200F64999 /* libLM.a in Frameworks */, - 1E316606163B0CB200F64999 /* MultiFactor.o in Frameworks */, - 1E316607163B0CB200F64999 /* Remote.o in Frameworks */, - 1E316608163B0CB200F64999 /* SingleFactor.o in Frameworks */, - 1E31662E163B0CB200F64999 /* libRuleTable.a in Frameworks */, - 1E31662F163B0CB200F64999 /* LoaderCompact.o in Frameworks */, - 1E316630163B0CB200F64999 /* LoaderFactory.o in Frameworks */, - 1E316631163B0CB200F64999 /* LoaderHiero.o in Frameworks */, - 1E316632163B0CB200F64999 /* LoaderStandard.o in Frameworks */, - 1E316633163B0CB200F64999 /* PhraseDictionaryALSuffixArray.o in Frameworks */, - 1E316634163B0CB200F64999 /* PhraseDictionaryFuzzyMatch.o in Frameworks */, - 1E316635163B0CB200F64999 /* PhraseDictionaryNodeSCFG.o in Frameworks */, - 1E316636163B0CB200F64999 /* PhraseDictionaryOnDisk.o in Frameworks */, - 1E316637163B0CB200F64999 /* PhraseDictionarySCFG.o in Frameworks */, - 1E316638163B0CB200F64999 /* Trie.o in Frameworks */, - 1E316639163B0CB200F64999 /* UTrie.o in Frameworks */, - 1E31663A163B0CB200F64999 /* UTrieNode.o in Frameworks */, - 1E31663B163B0CB200F64999 /* libRuleTable.a in Frameworks */, - 1E31663C163B0CB200F64999 /* LoaderCompact.o in Frameworks */, - 1E31663D163B0CB200F64999 /* LoaderFactory.o in Frameworks */, - 1E31663E163B0CB200F64999 /* LoaderHiero.o in Frameworks */, - 1E31663F163B0CB200F64999 /* LoaderStandard.o in Frameworks */, - 1E316640163B0CB200F64999 /* PhraseDictionaryALSuffixArray.o in Frameworks */, - 1E316641163B0CB200F64999 /* PhraseDictionaryFuzzyMatch.o in Frameworks */, - 1E316642163B0CB200F64999 /* PhraseDictionaryNodeSCFG.o in Frameworks */, - 1E316643163B0CB200F64999 /* PhraseDictionaryOnDisk.o in Frameworks */, - 1E316644163B0CB200F64999 /* PhraseDictionarySCFG.o in Frameworks */, - 1E316645163B0CB200F64999 /* PhraseDictionaryTMExtract.o in Frameworks */, - 1E316646163B0CB200F64999 /* Trie.o in Frameworks */, - 1E316647163B0CB200F64999 /* UTrie.o in Frameworks */, - 1E316648163B0CB200F64999 /* UTrieNode.o in Frameworks */, - 1E316649163B0CB200F64999 /* LoaderCompact.o in Frameworks */, - 1E31664A163B0CB200F64999 /* LoaderFactory.o in Frameworks */, - 1E31664B163B0CB200F64999 /* LoaderHiero.o in Frameworks */, - 1E31664C163B0CB200F64999 /* LoaderStandard.o in Frameworks */, - 1E31664D163B0CB200F64999 /* PhraseDictionaryALSuffixArray.o in Frameworks */, - 1E31664E163B0CB200F64999 /* PhraseDictionaryNodeSCFG.o in Frameworks */, - 1E31664F163B0CB200F64999 /* PhraseDictionaryOnDisk.o in Frameworks */, - 1E316650163B0CB200F64999 /* PhraseDictionarySCFG.o in Frameworks */, - 1E316651163B0CB200F64999 /* Trie.o in Frameworks */, - 1E316652163B0CB200F64999 /* UTrie.o in Frameworks */, - 1E316653163B0CB200F64999 /* UTrieNode.o in Frameworks */, - 1E316670163B0CB200F64999 /* ApplicableRuleTrie.o in Frameworks */, - 1E316671163B0CB200F64999 /* libScope3Parser.a in Frameworks */, - 1E316672163B0CB200F64999 /* Parser.o in Frameworks */, - 1E316673163B0CB200F64999 /* StackLatticeBuilder.o in Frameworks */, - 1E316674163B0CB200F64999 /* VarSpanTrieBuilder.o in Frameworks */, - 1E316675163B0CB200F64999 /* ApplicableRuleTrie.o in Frameworks */, - 1E316676163B0CB200F64999 /* libScope3Parser.a in Frameworks */, - 1E316677163B0CB200F64999 /* Parser.o in Frameworks */, - 1E316678163B0CB200F64999 /* StackLatticeBuilder.o in Frameworks */, - 1E316679163B0CB200F64999 /* VarSpanTrieBuilder.o in Frameworks */, - 1E31667A163B0CB200F64999 /* ApplicableRuleTrie.o in Frameworks */, - 1E31667B163B0CB200F64999 /* Parser.o in Frameworks */, - 1E31667C163B0CB200F64999 /* StackLatticeBuilder.o in Frameworks */, - 1E31667D163B0CB200F64999 /* VarSpanTrieBuilder.o in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 08FB7794FE84155DC02AAC07 /* moses */ = { - isa = PBXGroup; - children = ( - 08FB7795FE84155DC02AAC07 /* Source */, - C6A0FF2B0290797F04C91782 /* Documentation */, - 1AB674ADFE9D54B511CA2CBB /* Products */, - ); - name = moses; - sourceTree = ""; - }; - 08FB7795FE84155DC02AAC07 /* Source */ = { - isa = PBXGroup; - children = ( - 1EBC539E164C44FC00ADFA2C /* WordTranslationFeature.cpp */, - 1EBC539F164C44FC00ADFA2C /* WordTranslationFeature.h */, - 1E31646E163B0CB000F64999 /* FeatureVector.cpp */, - 1E31646F163B0CB000F64999 /* FeatureVector.h */, - 1E316470163B0CB000F64999 /* FeatureVectorTest.cpp */, - 1E316471163B0CB000F64999 /* fuzzy-match */, - 1E316492163B0CB000F64999 /* GlobalLexicalModelUnlimited.cpp */, - 1E316493163B0CB000F64999 /* GlobalLexicalModelUnlimited.h */, - 1E316494163B0CB000F64999 /* Incremental */, - 1E3164A7163B0CB000F64999 /* LM */, - 1E316513163B0CB100F64999 /* MockHypothesis.cpp */, - 1E316514163B0CB100F64999 /* MockHypothesis.h */, - 1E316518163B0CB100F64999 /* PhraseBoundaryFeature.cpp */, - 1E316519163B0CB100F64999 /* PhraseBoundaryFeature.h */, - 1E31651A163B0CB100F64999 /* PhraseLengthFeature.cpp */, - 1E31651B163B0CB100F64999 /* PhraseLengthFeature.h */, - 1E31651C163B0CB100F64999 /* PhrasePairFeature.cpp */, - 1E31651D163B0CB100F64999 /* PhrasePairFeature.h */, - 1E31651E163B0CB100F64999 /* RuleTable */, - 1E31656B163B0CB100F64999 /* Scope3Parser */, - 1E316594163B0CB200F64999 /* ScoreComponentCollectionTest.cpp */, - 1E316595163B0CB200F64999 /* SourceWordDeletionFeature.cpp */, - 1E316596163B0CB200F64999 /* SourceWordDeletionFeature.h */, - 1E316597163B0CB200F64999 /* SparsePhraseDictionaryFeature.cpp */, - 1E316598163B0CB200F64999 /* SparsePhraseDictionaryFeature.h */, - 1E31659B163B0CB200F64999 /* StackVec.h */, - 1E3165A2163B0CB200F64999 /* TargetBigramFeature.cpp */, - 1E3165A3163B0CB200F64999 /* TargetBigramFeature.h */, - 1E3165A4163B0CB200F64999 /* TargetBigramFeatureTest.cpp */, - 1E3165A5163B0CB200F64999 /* TargetNgramFeature.cpp */, - 1E3165A6163B0CB200F64999 /* TargetNgramFeature.h */, - 1E3165A7163B0CB200F64999 /* TargetWordInsertionFeature.cpp */, - 1E3165A8163B0CB200F64999 /* TargetWordInsertionFeature.h */, - 1E3165A9163B0CB200F64999 /* Terminal.h */, - 1E316464163B0C5200F64999 /* BleuScoreFeature.h */, - 1E31646C163B0C6D00F64999 /* BleuScoreFeature.cpp */, - 1E316465163B0C5200F64999 /* ChartParser.cpp */, - 1E316466163B0C5200F64999 /* ChartParser.h */, - 1E316467163B0C5200F64999 /* ChartParserCallback.h */, - 1E6D9FF015D027680064D436 /* CompactPT */, - 1ECF13DE15C1A82400EA1DCE /* fuzzy-match */, - 1EDA803514D19ECD003D2191 /* Scope3Parser */, - 1EDA803414D19EB8003D2191 /* CYKPlusParser */, - 1EC7365B14B977AA00238410 /* LM */, - 1EC7361314B977AA00238410 /* DynSAInclude */, - 1EAC362B14CDC76200DF97C3 /* RuleTable */, - 1EC735D314B977AA00238410 /* AlignmentInfo.cpp */, - 1EC735D414B977AA00238410 /* AlignmentInfo.h */, - 1EC735D514B977AA00238410 /* AlignmentInfoCollection.cpp */, - 1EC735D614B977AA00238410 /* AlignmentInfoCollection.h */, - 1EC735D714B977AA00238410 /* BilingualDynSuffixArray.cpp */, - 1EC735D814B977AA00238410 /* BilingualDynSuffixArray.h */, - 1EC735D914B977AA00238410 /* BitmapContainer.cpp */, - 1EC735DA14B977AA00238410 /* BitmapContainer.h */, - 1EC735DC14B977AA00238410 /* ChartCell.cpp */, - 1EC735DD14B977AA00238410 /* ChartCell.h */, - 1EC735DE14B977AA00238410 /* ChartCellCollection.cpp */, - 1EC735DF14B977AA00238410 /* ChartCellCollection.h */, - 1EC735E014B977AA00238410 /* ChartCellLabel.h */, - 1EC735E114B977AA00238410 /* ChartCellLabelSet.h */, - 1EC735E214B977AA00238410 /* ChartHypothesis.cpp */, - 1EC735E314B977AA00238410 /* ChartHypothesis.h */, - 1EC735E414B977AA00238410 /* ChartHypothesisCollection.cpp */, - 1EC735E514B977AA00238410 /* ChartHypothesisCollection.h */, - 1EC735E614B977AA00238410 /* ChartManager.cpp */, - 1EC735E714B977AA00238410 /* ChartManager.h */, - 1EC735E914B977AA00238410 /* ChartRuleLookupManager.h */, - 1E365EE816120F4600BA335B /* ChartTranslationOptions.cpp */, - 1E365EE916120F4600BA335B /* ChartTranslationOptions.h */, - 1EC735F214B977AA00238410 /* ChartTranslationOptionList.cpp */, - 1EC735F314B977AA00238410 /* ChartTranslationOptionList.h */, - 1EC735F414B977AA00238410 /* ChartTrellisDetour.cpp */, - 1EC735F514B977AA00238410 /* ChartTrellisDetour.h */, - 1EC735F614B977AA00238410 /* ChartTrellisDetourQueue.cpp */, - 1EC735F714B977AA00238410 /* ChartTrellisDetourQueue.h */, - 1EC735F814B977AA00238410 /* ChartTrellisNode.cpp */, - 1EC735F914B977AA00238410 /* ChartTrellisNode.h */, - 1EC735FA14B977AA00238410 /* ChartTrellisPath.cpp */, - 1EC735FB14B977AA00238410 /* ChartTrellisPath.h */, - 1EC735FC14B977AA00238410 /* ChartTrellisPathList.h */, - 1EC735FD14B977AA00238410 /* ConfusionNet.cpp */, - 1EC735FE14B977AA00238410 /* ConfusionNet.h */, - 1EC735FF14B977AA00238410 /* DecodeFeature.cpp */, - 1EC7360014B977AA00238410 /* DecodeFeature.h */, - 1EC7360114B977AA00238410 /* DecodeGraph.cpp */, - 1EC7360214B977AA00238410 /* DecodeGraph.h */, - 1EC7360314B977AA00238410 /* DecodeStep.cpp */, - 1EC7360414B977AA00238410 /* DecodeStep.h */, - 1EC7360514B977AA00238410 /* DecodeStepGeneration.cpp */, - 1EC7360614B977AA00238410 /* DecodeStepGeneration.h */, - 1EC7360714B977AA00238410 /* DecodeStepTranslation.cpp */, - 1EC7360814B977AA00238410 /* DecodeStepTranslation.h */, - 1EC7360914B977AA00238410 /* Dictionary.cpp */, - 1EC7360A14B977AA00238410 /* Dictionary.h */, - 1EC7361114B977AA00238410 /* DummyScoreProducers.cpp */, - 1EC7361214B977AA00238410 /* DummyScoreProducers.h */, - 1EC7362C14B977AA00238410 /* DynSuffixArray.cpp */, - 1EC7362D14B977AA00238410 /* DynSuffixArray.h */, - 1EC7362E14B977AA00238410 /* Factor.cpp */, - 1EC7362F14B977AA00238410 /* Factor.h */, - 1EC7363014B977AA00238410 /* FactorCollection.cpp */, - 1EC7363114B977AA00238410 /* FactorCollection.h */, - 1EC7363214B977AA00238410 /* FactorTypeSet.cpp */, - 1EC7363314B977AA00238410 /* FactorTypeSet.h */, - 1EC7363414B977AA00238410 /* FeatureFunction.cpp */, - 1EC7363514B977AA00238410 /* FeatureFunction.h */, - 1EC7363614B977AA00238410 /* FFState.cpp */, - 1EC7363714B977AA00238410 /* FFState.h */, - 1EC7363814B977AA00238410 /* File.cpp */, - 1EC7363914B977AA00238410 /* File.h */, - 1EC7363A14B977AA00238410 /* FilePtr.h */, - 1EC7363B14B977AA00238410 /* FloydWarshall.cpp */, - 1EC7363C14B977AA00238410 /* FloydWarshall.h */, - 1EC7363D14B977AA00238410 /* GenerationDictionary.cpp */, - 1EC7363E14B977AA00238410 /* GenerationDictionary.h */, - 1EC7363F14B977AA00238410 /* GlobalLexicalModel.cpp */, - 1EC7364014B977AA00238410 /* GlobalLexicalModel.h */, - 1EC7364114B977AA00238410 /* gzfilebuf.h */, - 1EC7364414B977AA00238410 /* hypergraph.proto */, - 1EF8F2C3159A61970047B613 /* HypoList.h */, - 1EC7364514B977AA00238410 /* Hypothesis.cpp */, - 1EC7364614B977AA00238410 /* Hypothesis.h */, - 1EC7364714B977AA00238410 /* HypothesisStack.cpp */, - 1EC7364814B977AA00238410 /* HypothesisStack.h */, - 1EC7364914B977AA00238410 /* HypothesisStackCubePruning.cpp */, - 1EC7364A14B977AA00238410 /* HypothesisStackCubePruning.h */, - 1EC7364B14B977AA00238410 /* HypothesisStackNormal.cpp */, - 1EC7364C14B977AA00238410 /* HypothesisStackNormal.h */, - 1EC7364D14B977AA00238410 /* InputFileStream.cpp */, - 1EC7364E14B977AA00238410 /* InputFileStream.h */, - 1EC7364F14B977AA00238410 /* InputType.cpp */, - 1EC7365014B977AA00238410 /* InputType.h */, - 1EC7365414B977AA00238410 /* LexicalReordering.cpp */, - 1EC7365514B977AA00238410 /* LexicalReordering.h */, - 1EC7365614B977AA00238410 /* LexicalReorderingState.cpp */, - 1EC7365714B977AA00238410 /* LexicalReorderingState.h */, - 1EC7365814B977AA00238410 /* LexicalReorderingTable.cpp */, - 1EC7365914B977AA00238410 /* LexicalReorderingTable.h */, - 1EC736A914B977AA00238410 /* LMList.cpp */, - 1EC736AA14B977AA00238410 /* LMList.h */, - 1EC736AB14B977AA00238410 /* LVoc.cpp */, - 1EC736AC14B977AA00238410 /* LVoc.h */, - 1EC736AD14B977AA00238410 /* Manager.cpp */, - 1EC736AE14B977AA00238410 /* Manager.h */, - 1EC736AF14B977AA00238410 /* NonTerminal.cpp */, - 1EC736B014B977AA00238410 /* NonTerminal.h */, - 1EC736B114B977AA00238410 /* ObjectPool.h */, - 1EC736B214B977AA00238410 /* OutputCollector.h */, - 1EC736B514B977AA00238410 /* Parameter.cpp */, - 1EC736B614B977AA00238410 /* Parameter.h */, - 1EC736B714B977AA00238410 /* PartialTranslOptColl.cpp */, - 1EC736B814B977AA00238410 /* PartialTranslOptColl.h */, - 1EC736B914B977AA00238410 /* PCNTools.cpp */, - 1EC736BA14B977AA00238410 /* PCNTools.h */, - 1EC736BB14B977AA00238410 /* PDTAimp.h */, - 1EC736BC14B977AA00238410 /* Phrase.cpp */, - 1EC736BD14B977AA00238410 /* Phrase.h */, - 1EC736BE14B977AA00238410 /* PhraseDictionary.cpp */, - 1EC736BF14B977AA00238410 /* PhraseDictionary.h */, - 1EC736C214B977AA00238410 /* PhraseDictionaryDynSuffixArray.cpp */, - 1EC736C314B977AA00238410 /* PhraseDictionaryDynSuffixArray.h */, - 1EC736C614B977AA00238410 /* PhraseDictionaryMemory.cpp */, - 1EC736C714B977AA00238410 /* PhraseDictionaryMemory.h */, - 1EC736C814B977AA00238410 /* PhraseDictionaryNode.cpp */, - 1EC736C914B977AA00238410 /* PhraseDictionaryNode.h */, - 1EC736D014B977AA00238410 /* PhraseDictionaryTree.cpp */, - 1EC736D114B977AA00238410 /* PhraseDictionaryTree.h */, - 1EC736D214B977AA00238410 /* PhraseDictionaryTreeAdaptor.cpp */, - 1EC736D314B977AA00238410 /* PhraseDictionaryTreeAdaptor.h */, - 1EC736D414B977AA00238410 /* PrefixTree.h */, - 1EC736D514B977AA00238410 /* PrefixTreeMap.cpp */, - 1EC736D614B977AA00238410 /* PrefixTreeMap.h */, - 1EC736D714B977AA00238410 /* ReorderingConstraint.cpp */, - 1EC736D814B977AA00238410 /* ReorderingConstraint.h */, - 1EC736D914B977AA00238410 /* ReorderingStack.cpp */, - 1EC736DA14B977AA00238410 /* ReorderingStack.h */, - 1EC736DB14B977AA00238410 /* rule.proto */, - 1EC736DC14B977AA00238410 /* RuleCube.cpp */, - 1EC736DD14B977AB00238410 /* RuleCube.h */, - 1EC736DE14B977AB00238410 /* RuleCubeItem.cpp */, - 1EC736DF14B977AB00238410 /* RuleCubeItem.h */, - 1EC736E014B977AB00238410 /* RuleCubeQueue.cpp */, - 1EC736E114B977AB00238410 /* RuleCubeQueue.h */, - 1EC736EB14B977AB00238410 /* ScoreComponentCollection.cpp */, - 1EC736EC14B977AB00238410 /* ScoreComponentCollection.h */, - 1EC736EF14B977AB00238410 /* ScoreProducer.cpp */, - 1EC736F014B977AB00238410 /* ScoreProducer.h */, - 1EC736F114B977AB00238410 /* Search.cpp */, - 1EC736F214B977AB00238410 /* Search.h */, - 1EC736F314B977AB00238410 /* SearchCubePruning.cpp */, - 1EC736F414B977AB00238410 /* SearchCubePruning.h */, - 1EC736F514B977AB00238410 /* SearchNormal.cpp */, - 1EC736F614B977AB00238410 /* SearchNormal.h */, - 1E879EA515A346F90051F346 /* SearchNormalBatch.cpp */, - 1E879EA615A346F90051F346 /* SearchNormalBatch.h */, - 1EC736F714B977AB00238410 /* Sentence.cpp */, - 1EC736F814B977AB00238410 /* Sentence.h */, - 1EC736F914B977AB00238410 /* SentenceStats.cpp */, - 1EC736FA14B977AB00238410 /* SentenceStats.h */, - 1EC736FB14B977AB00238410 /* SquareMatrix.cpp */, - 1EC736FC14B977AB00238410 /* SquareMatrix.h */, - 1EC736FF14B977AB00238410 /* StaticData.cpp */, - 1EC7370014B977AB00238410 /* StaticData.h */, - 1EC7370714B977AB00238410 /* TargetPhrase.cpp */, - 1EC7370814B977AB00238410 /* TargetPhrase.h */, - 1EC7370914B977AB00238410 /* TargetPhraseCollection.cpp */, - 1EC7370A14B977AB00238410 /* TargetPhraseCollection.h */, - 1EC7370B14B977AB00238410 /* ThreadPool.cpp */, - 1EC7370C14B977AB00238410 /* ThreadPool.h */, - 1EC7370D14B977AB00238410 /* Timer.cpp */, - 1EC7370E14B977AB00238410 /* Timer.h */, - 1EC7370F14B977AB00238410 /* TranslationOption.cpp */, - 1EC7371014B977AB00238410 /* TranslationOption.h */, - 1EC7371114B977AB00238410 /* TranslationOptionCollection.cpp */, - 1EC7371214B977AB00238410 /* TranslationOptionCollection.h */, - 1EC7371314B977AB00238410 /* TranslationOptionCollectionConfusionNet.cpp */, - 1EC7371414B977AB00238410 /* TranslationOptionCollectionConfusionNet.h */, - 1EC7371514B977AB00238410 /* TranslationOptionCollectionText.cpp */, - 1EC7371614B977AB00238410 /* TranslationOptionCollectionText.h */, - 1EC7371714B977AB00238410 /* TranslationOptionList.cpp */, - 1EC7371814B977AB00238410 /* TranslationOptionList.h */, - 1EC7371914B977AB00238410 /* TranslationSystem.cpp */, - 1EC7371A14B977AB00238410 /* TranslationSystem.h */, - 1EC7371B14B977AB00238410 /* TreeInput.cpp */, - 1EC7371C14B977AB00238410 /* TreeInput.h */, - 1EC7371F14B977AB00238410 /* TrellisPath.cpp */, - 1EC7372014B977AB00238410 /* TrellisPath.h */, - 1EC7372314B977AB00238410 /* TrellisPathCollection.cpp */, - 1EC7372414B977AB00238410 /* TrellisPathCollection.h */, - 1EC7372714B977AB00238410 /* TrellisPathList.h */, - 1EC7372814B977AB00238410 /* TypeDef.h */, - 1EC7372914B977AB00238410 /* UniqueObject.h */, - 1EC7372A14B977AB00238410 /* UserMessage.cpp */, - 1EC7372B14B977AB00238410 /* UserMessage.h */, - 1EC7372E14B977AB00238410 /* Util.cpp */, - 1EC7372F14B977AB00238410 /* Util.h */, - 1EC7373214B977AB00238410 /* Word.cpp */, - 1EC7373314B977AB00238410 /* Word.h */, - 1EC7373614B977AB00238410 /* WordLattice.cpp */, - 1EC7373714B977AB00238410 /* WordLattice.h */, - 1EC7373A14B977AB00238410 /* WordsBitmap.cpp */, - 1EC7373B14B977AB00238410 /* WordsBitmap.h */, - 1EC7373E14B977AB00238410 /* WordsRange.cpp */, - 1EC7373F14B977AB00238410 /* WordsRange.h */, - 1EC7374214B977AB00238410 /* XmlOption.cpp */, - 1EC7374314B977AB00238410 /* XmlOption.h */, - ); - name = Source; - sourceTree = ""; - }; - 1AB674ADFE9D54B511CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - D2AAC046055464E500DB518D /* libmoses.a */, - ); - name = Products; - sourceTree = ""; - }; - 1E316471163B0CB000F64999 /* fuzzy-match */ = { - isa = PBXGroup; - children = ( - 1E316472163B0CB000F64999 /* bin */, - 1E316488163B0CB000F64999 /* FuzzyMatchWrapper.cpp */, - 1E316489163B0CB000F64999 /* FuzzyMatchWrapper.h */, - 1E31648A163B0CB000F64999 /* Jamfile */, - 1E31648B163B0CB000F64999 /* Match.h */, - 1E31648C163B0CB000F64999 /* SentenceAlignment.cpp */, - 1E31648D163B0CB000F64999 /* SentenceAlignment.h */, - 1E31648E163B0CB000F64999 /* SuffixArray.cpp */, - 1E31648F163B0CB000F64999 /* SuffixArray.h */, - 1E316490163B0CB000F64999 /* Vocabulary.cpp */, - 1E316491163B0CB000F64999 /* Vocabulary.h */, - ); - name = "fuzzy-match"; - path = "../../moses/src/fuzzy-match"; - sourceTree = ""; - }; - 1E316472163B0CB000F64999 /* bin */ = { - isa = PBXGroup; - children = ( - 1E316473163B0CB000F64999 /* clang-darwin-4.2.1 */, - 1E31647D163B0CB000F64999 /* darwin-4.2.1 */, - ); - path = bin; - sourceTree = ""; - }; - 1E316473163B0CB000F64999 /* clang-darwin-4.2.1 */ = { - isa = PBXGroup; - children = ( - 1E316474163B0CB000F64999 /* release */, - ); - path = "clang-darwin-4.2.1"; - sourceTree = ""; - }; - 1E316474163B0CB000F64999 /* release */ = { - isa = PBXGroup; - children = ( - 1E316475163B0CB000F64999 /* debug-symbols-on */, - ); - path = release; - sourceTree = ""; - }; - 1E316475163B0CB000F64999 /* debug-symbols-on */ = { - isa = PBXGroup; - children = ( - 1E316476163B0CB000F64999 /* link-static */, - ); - path = "debug-symbols-on"; - sourceTree = ""; - }; - 1E316476163B0CB000F64999 /* link-static */ = { - isa = PBXGroup; - children = ( - 1E316477163B0CB000F64999 /* threading-multi */, - ); - path = "link-static"; - sourceTree = ""; - }; - 1E316477163B0CB000F64999 /* threading-multi */ = { - isa = PBXGroup; - children = ( - 1E316478163B0CB000F64999 /* FuzzyMatchWrapper.o */, - 1E316479163B0CB000F64999 /* libfuzzy-match.a */, - 1E31647A163B0CB000F64999 /* SentenceAlignment.o */, - 1E31647B163B0CB000F64999 /* SuffixArray.o */, - 1E31647C163B0CB000F64999 /* Vocabulary.o */, - ); - path = "threading-multi"; - sourceTree = ""; - }; - 1E31647D163B0CB000F64999 /* darwin-4.2.1 */ = { - isa = PBXGroup; - children = ( - 1E31647E163B0CB000F64999 /* release */, - ); - path = "darwin-4.2.1"; - sourceTree = ""; - }; - 1E31647E163B0CB000F64999 /* release */ = { - isa = PBXGroup; - children = ( - 1E31647F163B0CB000F64999 /* debug-symbols-on */, - ); - path = release; - sourceTree = ""; - }; - 1E31647F163B0CB000F64999 /* debug-symbols-on */ = { - isa = PBXGroup; - children = ( - 1E316480163B0CB000F64999 /* link-static */, - ); - path = "debug-symbols-on"; - sourceTree = ""; - }; - 1E316480163B0CB000F64999 /* link-static */ = { - isa = PBXGroup; - children = ( - 1E316481163B0CB000F64999 /* threading-multi */, - ); - path = "link-static"; - sourceTree = ""; - }; - 1E316481163B0CB000F64999 /* threading-multi */ = { - isa = PBXGroup; - children = ( - 1E316482163B0CB000F64999 /* FuzzyMatchWrapper.o */, - 1E316483163B0CB000F64999 /* libfuzzy-match.a */, - 1E316484163B0CB000F64999 /* SentenceAlignment.o */, - 1E316485163B0CB000F64999 /* SuffixArray.o */, - 1E316486163B0CB000F64999 /* TMMTWrapper.o */, - 1E316487163B0CB000F64999 /* Vocabulary.o */, - ); - path = "threading-multi"; - sourceTree = ""; - }; - 1E316494163B0CB000F64999 /* Incremental */ = { - isa = PBXGroup; - children = ( - 1E316495163B0CB000F64999 /* bin */, - 1E31649E163B0CB000F64999 /* Fill.cpp */, - 1E31649F163B0CB000F64999 /* Fill.h */, - 1E3164A0163B0CB000F64999 /* Jamfile */, - 1E3164A1163B0CB000F64999 /* Manager.cpp */, - 1E3164A2163B0CB000F64999 /* Manager.h */, - ); - name = Incremental; - path = ../../moses/src/Incremental; - sourceTree = ""; - }; - 1E316495163B0CB000F64999 /* bin */ = { - isa = PBXGroup; - children = ( - 1E316496163B0CB000F64999 /* darwin-4.2.1 */, - ); - path = bin; - sourceTree = ""; - }; - 1E316496163B0CB000F64999 /* darwin-4.2.1 */ = { - isa = PBXGroup; - children = ( - 1E316497163B0CB000F64999 /* release */, - ); - path = "darwin-4.2.1"; - sourceTree = ""; - }; - 1E316497163B0CB000F64999 /* release */ = { - isa = PBXGroup; - children = ( - 1E316498163B0CB000F64999 /* debug-symbols-on */, - ); - path = release; - sourceTree = ""; - }; - 1E316498163B0CB000F64999 /* debug-symbols-on */ = { - isa = PBXGroup; - children = ( - 1E316499163B0CB000F64999 /* link-static */, - ); - path = "debug-symbols-on"; - sourceTree = ""; - }; - 1E316499163B0CB000F64999 /* link-static */ = { - isa = PBXGroup; - children = ( - 1E31649A163B0CB000F64999 /* threading-multi */, - ); - path = "link-static"; - sourceTree = ""; - }; - 1E31649A163B0CB000F64999 /* threading-multi */ = { - isa = PBXGroup; - children = ( - 1E31649B163B0CB000F64999 /* Fill.o */, - 1E31649C163B0CB000F64999 /* libIncremental.a */, - 1E31649D163B0CB000F64999 /* Manager.o */, - ); - path = "threading-multi"; - sourceTree = ""; - }; - 1E3164A7163B0CB000F64999 /* LM */ = { - isa = PBXGroup; - children = ( - 1E3164A8163B0CB000F64999 /* Base.cpp */, - 1E3164A9163B0CB000F64999 /* Base.h */, - 1E3164AA163B0CB000F64999 /* bin */, - 1E3164F7163B0CB100F64999 /* Factory.cpp */, - 1E3164F8163B0CB100F64999 /* Factory.h */, - 1E3164F9163B0CB100F64999 /* Implementation.cpp */, - 1E3164FA163B0CB100F64999 /* Implementation.h */, - 1E3164FB163B0CB100F64999 /* IRST.cpp */, - 1E3164FC163B0CB100F64999 /* IRST.h */, - 1E3164FD163B0CB100F64999 /* Jamfile */, - 1E3164FE163B0CB100F64999 /* Joint.cpp */, - 1E3164FF163B0CB100F64999 /* Joint.h */, - 1E316500163B0CB100F64999 /* Ken.cpp */, - 1E316501163B0CB100F64999 /* Ken.h */, - 1E316502163B0CB100F64999 /* LDHT.cpp */, - 1E316503163B0CB100F64999 /* LDHT.h */, - 1E316504163B0CB100F64999 /* MultiFactor.cpp */, - 1E316505163B0CB100F64999 /* MultiFactor.h */, - 1E316506163B0CB100F64999 /* ORLM.cpp */, - 1E316507163B0CB100F64999 /* ORLM.h */, - 1E316508163B0CB100F64999 /* ParallelBackoff.cpp */, - 1E316509163B0CB100F64999 /* ParallelBackoff.h */, - 1E31650C163B0CB100F64999 /* Remote.cpp */, - 1E31650D163B0CB100F64999 /* Remote.h */, - 1E31650E163B0CB100F64999 /* SingleFactor.cpp */, - 1E31650F163B0CB100F64999 /* SingleFactor.h */, - 1E316510163B0CB100F64999 /* SRI.cpp */, - 1E316511163B0CB100F64999 /* SRI.h */, - ); - name = LM; - path = ../../moses/src/LM; - sourceTree = ""; - }; - 1E3164AA163B0CB000F64999 /* bin */ = { - isa = PBXGroup; - children = ( - 1E3164AB163B0CB000F64999 /* clang-darwin-4.2.1 */, - 1E3164BE163B0CB000F64999 /* darwin-4.2.1 */, - 1E3164E8163B0CB100F64999 /* gcc-4.2.1 */, - 1E3164F6163B0CB100F64999 /* lm.log */, - ); - path = bin; - sourceTree = ""; - }; - 1E3164AB163B0CB000F64999 /* clang-darwin-4.2.1 */ = { - isa = PBXGroup; - children = ( - 1E3164AC163B0CB000F64999 /* release */, - ); - path = "clang-darwin-4.2.1"; - sourceTree = ""; - }; - 1E3164AC163B0CB000F64999 /* release */ = { - isa = PBXGroup; - children = ( - 1E3164AD163B0CB000F64999 /* debug-symbols-on */, - ); - path = release; - sourceTree = ""; - }; - 1E3164AD163B0CB000F64999 /* debug-symbols-on */ = { - isa = PBXGroup; - children = ( - 1E3164AE163B0CB000F64999 /* link-static */, - ); - path = "debug-symbols-on"; - sourceTree = ""; - }; - 1E3164AE163B0CB000F64999 /* link-static */ = { - isa = PBXGroup; - children = ( - 1E3164AF163B0CB000F64999 /* threading-multi */, - ); - path = "link-static"; - sourceTree = ""; - }; - 1E3164AF163B0CB000F64999 /* threading-multi */ = { - isa = PBXGroup; - children = ( - 1E3164B0163B0CB000F64999 /* Base.o */, - 1E3164B1163B0CB000F64999 /* Factory.o */, - 1E3164B2163B0CB000F64999 /* Implementation.o */, - 1E3164B3163B0CB000F64999 /* IRST.o */, - 1E3164B4163B0CB000F64999 /* Joint.o */, - 1E3164B5163B0CB000F64999 /* Ken.o */, - 1E3164B6163B0CB000F64999 /* libLM.a */, - 1E3164B7163B0CB000F64999 /* MultiFactor.o */, - 1E3164B8163B0CB000F64999 /* ORLM.o */, - 1E3164B9163B0CB000F64999 /* ParallelBackoff.o */, - 1E3164BA163B0CB000F64999 /* Rand.o */, - 1E3164BB163B0CB000F64999 /* Remote.o */, - 1E3164BC163B0CB000F64999 /* SingleFactor.o */, - 1E3164BD163B0CB000F64999 /* SRI.o */, - ); - path = "threading-multi"; - sourceTree = ""; - }; - 1E3164BE163B0CB000F64999 /* darwin-4.2.1 */ = { - isa = PBXGroup; - children = ( - 1E3164BF163B0CB000F64999 /* release */, - ); - path = "darwin-4.2.1"; - sourceTree = ""; - }; - 1E3164BF163B0CB000F64999 /* release */ = { - isa = PBXGroup; - children = ( - 1E3164C0163B0CB000F64999 /* debug-symbols-on */, - 1E3164DD163B0CB100F64999 /* link-static */, - ); - path = release; - sourceTree = ""; - }; - 1E3164C0163B0CB000F64999 /* debug-symbols-on */ = { - isa = PBXGroup; - children = ( - 1E3164C1163B0CB000F64999 /* link-static */, - 1E3164D1163B0CB100F64999 /* threading-multi */, - ); - path = "debug-symbols-on"; - sourceTree = ""; - }; - 1E3164C1163B0CB000F64999 /* link-static */ = { - isa = PBXGroup; - children = ( - 1E3164C2163B0CB000F64999 /* threading-multi */, - ); - path = "link-static"; - sourceTree = ""; - }; - 1E3164C2163B0CB000F64999 /* threading-multi */ = { - isa = PBXGroup; - children = ( - 1E3164C3163B0CB000F64999 /* Base.o */, - 1E3164C4163B0CB100F64999 /* Factory.o */, - 1E3164C5163B0CB100F64999 /* Implementation.o */, - 1E3164C6163B0CB100F64999 /* IRST.o */, - 1E3164C7163B0CB100F64999 /* Joint.o */, - 1E3164C8163B0CB100F64999 /* Ken.o */, - 1E3164C9163B0CB100F64999 /* libLM.a */, - 1E3164CA163B0CB100F64999 /* MultiFactor.o */, - 1E3164CB163B0CB100F64999 /* ORLM.o */, - 1E3164CC163B0CB100F64999 /* ParallelBackoff.o */, - 1E3164CD163B0CB100F64999 /* Rand.o */, - 1E3164CE163B0CB100F64999 /* Remote.o */, - 1E3164CF163B0CB100F64999 /* SingleFactor.o */, - 1E3164D0163B0CB100F64999 /* SRI.o */, - ); - path = "threading-multi"; - sourceTree = ""; - }; - 1E3164D1163B0CB100F64999 /* threading-multi */ = { - isa = PBXGroup; - children = ( - 1E3164D2163B0CB100F64999 /* Base.o */, - 1E3164D3163B0CB100F64999 /* Factory.o */, - 1E3164D4163B0CB100F64999 /* Implementation.o */, - 1E3164D5163B0CB100F64999 /* IRST.o */, - 1E3164D6163B0CB100F64999 /* Joint.o */, - 1E3164D7163B0CB100F64999 /* Ken.o */, - 1E3164D8163B0CB100F64999 /* MultiFactor.o */, - 1E3164D9163B0CB100F64999 /* ParallelBackoff.o */, - 1E3164DA163B0CB100F64999 /* Remote.o */, - 1E3164DB163B0CB100F64999 /* SingleFactor.o */, - 1E3164DC163B0CB100F64999 /* SRI.o */, - ); - path = "threading-multi"; - sourceTree = ""; - }; - 1E3164DD163B0CB100F64999 /* link-static */ = { - isa = PBXGroup; - children = ( - 1E3164DE163B0CB100F64999 /* threading-multi */, - ); - path = "link-static"; - sourceTree = ""; - }; - 1E3164DE163B0CB100F64999 /* threading-multi */ = { - isa = PBXGroup; - children = ( - 1E3164DF163B0CB100F64999 /* Base.o */, - 1E3164E0163B0CB100F64999 /* Factory.o */, - 1E3164E1163B0CB100F64999 /* Implementation.o */, - 1E3164E2163B0CB100F64999 /* Joint.o */, - 1E3164E3163B0CB100F64999 /* Ken.o */, - 1E3164E4163B0CB100F64999 /* libLM.a */, - 1E3164E5163B0CB100F64999 /* MultiFactor.o */, - 1E3164E6163B0CB100F64999 /* Remote.o */, - 1E3164E7163B0CB100F64999 /* SingleFactor.o */, - ); - path = "threading-multi"; - sourceTree = ""; - }; - 1E3164E8163B0CB100F64999 /* gcc-4.2.1 */ = { - isa = PBXGroup; - children = ( - 1E3164E9163B0CB100F64999 /* release */, - ); - path = "gcc-4.2.1"; - sourceTree = ""; - }; - 1E3164E9163B0CB100F64999 /* release */ = { - isa = PBXGroup; - children = ( - 1E3164EA163B0CB100F64999 /* debug-symbols-on */, - ); - path = release; - sourceTree = ""; - }; - 1E3164EA163B0CB100F64999 /* debug-symbols-on */ = { - isa = PBXGroup; - children = ( - 1E3164EB163B0CB100F64999 /* link-static */, - ); - path = "debug-symbols-on"; - sourceTree = ""; - }; - 1E3164EB163B0CB100F64999 /* link-static */ = { - isa = PBXGroup; - children = ( - 1E3164EC163B0CB100F64999 /* threading-multi */, - ); - path = "link-static"; - sourceTree = ""; - }; - 1E3164EC163B0CB100F64999 /* threading-multi */ = { - isa = PBXGroup; - children = ( - 1E3164ED163B0CB100F64999 /* Base.o */, - 1E3164EE163B0CB100F64999 /* Factory.o */, - 1E3164EF163B0CB100F64999 /* Implementation.o */, - 1E3164F0163B0CB100F64999 /* Joint.o */, - 1E3164F1163B0CB100F64999 /* Ken.o */, - 1E3164F2163B0CB100F64999 /* libLM.a */, - 1E3164F3163B0CB100F64999 /* MultiFactor.o */, - 1E3164F4163B0CB100F64999 /* Remote.o */, - 1E3164F5163B0CB100F64999 /* SingleFactor.o */, - ); - path = "threading-multi"; - sourceTree = ""; - }; - 1E31651E163B0CB100F64999 /* RuleTable */ = { - isa = PBXGroup; - children = ( - 1E31651F163B0CB100F64999 /* bin */, - 1E316551163B0CB100F64999 /* Jamfile */, - 1E316552163B0CB100F64999 /* Loader.h */, - 1E316553163B0CB100F64999 /* LoaderCompact.cpp */, - 1E316554163B0CB100F64999 /* LoaderCompact.h */, - 1E316555163B0CB100F64999 /* LoaderFactory.cpp */, - 1E316556163B0CB100F64999 /* LoaderFactory.h */, - 1E316557163B0CB100F64999 /* LoaderHiero.cpp */, - 1E316558163B0CB100F64999 /* LoaderHiero.h */, - 1E316559163B0CB100F64999 /* LoaderStandard.cpp */, - 1E31655A163B0CB100F64999 /* LoaderStandard.h */, - 1E31655B163B0CB100F64999 /* PhraseDictionaryALSuffixArray.cpp */, - 1E31655C163B0CB100F64999 /* PhraseDictionaryALSuffixArray.h */, - 1E31655D163B0CB100F64999 /* PhraseDictionaryFuzzyMatch.cpp */, - 1E31655E163B0CB100F64999 /* PhraseDictionaryFuzzyMatch.h */, - 1E31655F163B0CB100F64999 /* PhraseDictionaryNodeSCFG.cpp */, - 1E316560163B0CB100F64999 /* PhraseDictionaryNodeSCFG.h */, - 1E316561163B0CB100F64999 /* PhraseDictionaryOnDisk.cpp */, - 1E316562163B0CB100F64999 /* PhraseDictionaryOnDisk.h */, - 1E316563163B0CB100F64999 /* PhraseDictionarySCFG.cpp */, - 1E316564163B0CB100F64999 /* PhraseDictionarySCFG.h */, - 1E316565163B0CB100F64999 /* Trie.cpp */, - 1E316566163B0CB100F64999 /* Trie.h */, - 1E316567163B0CB100F64999 /* UTrie.cpp */, - 1E316568163B0CB100F64999 /* UTrie.h */, - 1E316569163B0CB100F64999 /* UTrieNode.cpp */, - 1E31656A163B0CB100F64999 /* UTrieNode.h */, - ); - name = RuleTable; - path = ../../moses/src/RuleTable; - sourceTree = ""; - }; - 1E31651F163B0CB100F64999 /* bin */ = { - isa = PBXGroup; - children = ( - 1E316520163B0CB100F64999 /* clang-darwin-4.2.1 */, - 1E316532163B0CB100F64999 /* darwin-4.2.1 */, - ); - path = bin; - sourceTree = ""; - }; - 1E316520163B0CB100F64999 /* clang-darwin-4.2.1 */ = { - isa = PBXGroup; - children = ( - 1E316521163B0CB100F64999 /* release */, - ); - path = "clang-darwin-4.2.1"; - sourceTree = ""; - }; - 1E316521163B0CB100F64999 /* release */ = { - isa = PBXGroup; - children = ( - 1E316522163B0CB100F64999 /* debug-symbols-on */, - ); - path = release; - sourceTree = ""; - }; - 1E316522163B0CB100F64999 /* debug-symbols-on */ = { - isa = PBXGroup; - children = ( - 1E316523163B0CB100F64999 /* link-static */, - ); - path = "debug-symbols-on"; - sourceTree = ""; - }; - 1E316523163B0CB100F64999 /* link-static */ = { - isa = PBXGroup; - children = ( - 1E316524163B0CB100F64999 /* threading-multi */, - ); - path = "link-static"; - sourceTree = ""; - }; - 1E316524163B0CB100F64999 /* threading-multi */ = { - isa = PBXGroup; - children = ( - 1E316525163B0CB100F64999 /* libRuleTable.a */, - 1E316526163B0CB100F64999 /* LoaderCompact.o */, - 1E316527163B0CB100F64999 /* LoaderFactory.o */, - 1E316528163B0CB100F64999 /* LoaderHiero.o */, - 1E316529163B0CB100F64999 /* LoaderStandard.o */, - 1E31652A163B0CB100F64999 /* PhraseDictionaryALSuffixArray.o */, - 1E31652B163B0CB100F64999 /* PhraseDictionaryFuzzyMatch.o */, - 1E31652C163B0CB100F64999 /* PhraseDictionaryNodeSCFG.o */, - 1E31652D163B0CB100F64999 /* PhraseDictionaryOnDisk.o */, - 1E31652E163B0CB100F64999 /* PhraseDictionarySCFG.o */, - 1E31652F163B0CB100F64999 /* Trie.o */, - 1E316530163B0CB100F64999 /* UTrie.o */, - 1E316531163B0CB100F64999 /* UTrieNode.o */, - ); - path = "threading-multi"; - sourceTree = ""; - }; - 1E316532163B0CB100F64999 /* darwin-4.2.1 */ = { - isa = PBXGroup; - children = ( - 1E316533163B0CB100F64999 /* release */, - ); - path = "darwin-4.2.1"; - sourceTree = ""; - }; - 1E316533163B0CB100F64999 /* release */ = { - isa = PBXGroup; - children = ( - 1E316534163B0CB100F64999 /* debug-symbols-on */, - ); - path = release; - sourceTree = ""; - }; - 1E316534163B0CB100F64999 /* debug-symbols-on */ = { - isa = PBXGroup; - children = ( - 1E316535163B0CB100F64999 /* link-static */, - 1E316545163B0CB100F64999 /* threading-multi */, - ); - path = "debug-symbols-on"; - sourceTree = ""; - }; - 1E316535163B0CB100F64999 /* link-static */ = { - isa = PBXGroup; - children = ( - 1E316536163B0CB100F64999 /* threading-multi */, - ); - path = "link-static"; - sourceTree = ""; - }; - 1E316536163B0CB100F64999 /* threading-multi */ = { - isa = PBXGroup; - children = ( - 1E316537163B0CB100F64999 /* libRuleTable.a */, - 1E316538163B0CB100F64999 /* LoaderCompact.o */, - 1E316539163B0CB100F64999 /* LoaderFactory.o */, - 1E31653A163B0CB100F64999 /* LoaderHiero.o */, - 1E31653B163B0CB100F64999 /* LoaderStandard.o */, - 1E31653C163B0CB100F64999 /* PhraseDictionaryALSuffixArray.o */, - 1E31653D163B0CB100F64999 /* PhraseDictionaryFuzzyMatch.o */, - 1E31653E163B0CB100F64999 /* PhraseDictionaryNodeSCFG.o */, - 1E31653F163B0CB100F64999 /* PhraseDictionaryOnDisk.o */, - 1E316540163B0CB100F64999 /* PhraseDictionarySCFG.o */, - 1E316541163B0CB100F64999 /* PhraseDictionaryTMExtract.o */, - 1E316542163B0CB100F64999 /* Trie.o */, - 1E316543163B0CB100F64999 /* UTrie.o */, - 1E316544163B0CB100F64999 /* UTrieNode.o */, - ); - path = "threading-multi"; - sourceTree = ""; - }; - 1E316545163B0CB100F64999 /* threading-multi */ = { - isa = PBXGroup; - children = ( - 1E316546163B0CB100F64999 /* LoaderCompact.o */, - 1E316547163B0CB100F64999 /* LoaderFactory.o */, - 1E316548163B0CB100F64999 /* LoaderHiero.o */, - 1E316549163B0CB100F64999 /* LoaderStandard.o */, - 1E31654A163B0CB100F64999 /* PhraseDictionaryALSuffixArray.o */, - 1E31654B163B0CB100F64999 /* PhraseDictionaryNodeSCFG.o */, - 1E31654C163B0CB100F64999 /* PhraseDictionaryOnDisk.o */, - 1E31654D163B0CB100F64999 /* PhraseDictionarySCFG.o */, - 1E31654E163B0CB100F64999 /* Trie.o */, - 1E31654F163B0CB100F64999 /* UTrie.o */, - 1E316550163B0CB100F64999 /* UTrieNode.o */, - ); - path = "threading-multi"; - sourceTree = ""; - }; - 1E31656B163B0CB100F64999 /* Scope3Parser */ = { - isa = PBXGroup; - children = ( - 1E31656C163B0CB100F64999 /* ApplicableRuleTrie.cpp */, - 1E31656D163B0CB100F64999 /* ApplicableRuleTrie.h */, - 1E31656E163B0CB100F64999 /* bin */, - 1E316588163B0CB200F64999 /* IntermediateVarSpanNode.h */, - 1E316589163B0CB200F64999 /* Jamfile */, - 1E31658A163B0CB200F64999 /* Parser.cpp */, - 1E31658B163B0CB200F64999 /* Parser.h */, - 1E31658C163B0CB200F64999 /* SentenceMap.h */, - 1E31658D163B0CB200F64999 /* StackLattice.h */, - 1E31658E163B0CB200F64999 /* StackLatticeBuilder.cpp */, - 1E31658F163B0CB200F64999 /* StackLatticeBuilder.h */, - 1E316590163B0CB200F64999 /* StackLatticeSearcher.h */, - 1E316591163B0CB200F64999 /* VarSpanNode.h */, - 1E316592163B0CB200F64999 /* VarSpanTrieBuilder.cpp */, - 1E316593163B0CB200F64999 /* VarSpanTrieBuilder.h */, - ); - name = Scope3Parser; - path = ../../moses/src/Scope3Parser; - sourceTree = ""; - }; - 1E31656E163B0CB100F64999 /* bin */ = { - isa = PBXGroup; - children = ( - 1E31656F163B0CB100F64999 /* clang-darwin-4.2.1 */, - 1E316579163B0CB200F64999 /* darwin-4.2.1 */, - ); - path = bin; - sourceTree = ""; - }; - 1E31656F163B0CB100F64999 /* clang-darwin-4.2.1 */ = { - isa = PBXGroup; - children = ( - 1E316570163B0CB100F64999 /* release */, - ); - path = "clang-darwin-4.2.1"; - sourceTree = ""; - }; - 1E316570163B0CB100F64999 /* release */ = { - isa = PBXGroup; - children = ( - 1E316571163B0CB100F64999 /* debug-symbols-on */, - ); - path = release; - sourceTree = ""; - }; - 1E316571163B0CB100F64999 /* debug-symbols-on */ = { - isa = PBXGroup; - children = ( - 1E316572163B0CB100F64999 /* link-static */, - ); - path = "debug-symbols-on"; - sourceTree = ""; - }; - 1E316572163B0CB100F64999 /* link-static */ = { - isa = PBXGroup; - children = ( - 1E316573163B0CB100F64999 /* threading-multi */, - ); - path = "link-static"; - sourceTree = ""; - }; - 1E316573163B0CB100F64999 /* threading-multi */ = { - isa = PBXGroup; - children = ( - 1E316574163B0CB200F64999 /* ApplicableRuleTrie.o */, - 1E316575163B0CB200F64999 /* libScope3Parser.a */, - 1E316576163B0CB200F64999 /* Parser.o */, - 1E316577163B0CB200F64999 /* StackLatticeBuilder.o */, - 1E316578163B0CB200F64999 /* VarSpanTrieBuilder.o */, - ); - path = "threading-multi"; - sourceTree = ""; - }; - 1E316579163B0CB200F64999 /* darwin-4.2.1 */ = { - isa = PBXGroup; - children = ( - 1E31657A163B0CB200F64999 /* release */, - ); - path = "darwin-4.2.1"; - sourceTree = ""; - }; - 1E31657A163B0CB200F64999 /* release */ = { - isa = PBXGroup; - children = ( - 1E31657B163B0CB200F64999 /* debug-symbols-on */, - ); - path = release; - sourceTree = ""; - }; - 1E31657B163B0CB200F64999 /* debug-symbols-on */ = { - isa = PBXGroup; - children = ( - 1E31657C163B0CB200F64999 /* link-static */, - 1E316583163B0CB200F64999 /* threading-multi */, - ); - path = "debug-symbols-on"; - sourceTree = ""; - }; - 1E31657C163B0CB200F64999 /* link-static */ = { - isa = PBXGroup; - children = ( - 1E31657D163B0CB200F64999 /* threading-multi */, - ); - path = "link-static"; - sourceTree = ""; - }; - 1E31657D163B0CB200F64999 /* threading-multi */ = { - isa = PBXGroup; - children = ( - 1E31657E163B0CB200F64999 /* ApplicableRuleTrie.o */, - 1E31657F163B0CB200F64999 /* libScope3Parser.a */, - 1E316580163B0CB200F64999 /* Parser.o */, - 1E316581163B0CB200F64999 /* StackLatticeBuilder.o */, - 1E316582163B0CB200F64999 /* VarSpanTrieBuilder.o */, - ); - path = "threading-multi"; - sourceTree = ""; - }; - 1E316583163B0CB200F64999 /* threading-multi */ = { - isa = PBXGroup; - children = ( - 1E316584163B0CB200F64999 /* ApplicableRuleTrie.o */, - 1E316585163B0CB200F64999 /* Parser.o */, - 1E316586163B0CB200F64999 /* StackLatticeBuilder.o */, - 1E316587163B0CB200F64999 /* VarSpanTrieBuilder.o */, - ); - path = "threading-multi"; - sourceTree = ""; - }; - 1E6D9FF015D027680064D436 /* CompactPT */ = { - isa = PBXGroup; - children = ( - 1EC32DB615D2D90700A313B1 /* ThrowingFwrite.cpp */, - 1EC32DB715D2D90700A313B1 /* ThrowingFwrite.h */, - 1E6D9FBD15D027560064D436 /* BlockHashIndex.cpp */, - 1E6D9FBE15D027560064D436 /* BlockHashIndex.h */, - 1E6D9FBF15D027560064D436 /* CanonicalHuffman.h */, - 1E6D9FC015D027560064D436 /* CmphStringVectorAdapter.cpp */, - 1E6D9FC115D027560064D436 /* CmphStringVectorAdapter.h */, - 1E6D9FC215D027560064D436 /* ConsistantPhrases.h */, - 1E6D9FC415D027560064D436 /* LexicalReorderingTableCompact.cpp */, - 1E6D9FC515D027560064D436 /* LexicalReorderingTableCompact.h */, - 1E6D9FC615D027560064D436 /* LexicalReorderingTableCreator.cpp */, - 1E6D9FC715D027560064D436 /* LexicalReorderingTableCreator.h */, - 1E6D9FC815D027560064D436 /* ListCoders.h */, - 1E6D9FC915D027560064D436 /* MmapAllocator.h */, - 1E6D9FCA15D027560064D436 /* MonotonicVector.h */, - 1E6D9FCB15D027560064D436 /* MurmurHash3.cpp */, - 1E6D9FCC15D027560064D436 /* MurmurHash3.h */, - 1E6D9FCD15D027560064D436 /* PackedArray.h */, - 1E6D9FCE15D027560064D436 /* PhraseDecoder.cpp */, - 1E6D9FCF15D027560064D436 /* PhraseDecoder.h */, - 1E6D9FD015D027560064D436 /* PhraseDictionaryCompact.cpp */, - 1E6D9FD115D027560064D436 /* PhraseDictionaryCompact.h */, - 1E6D9FD215D027560064D436 /* PhraseTableCreator.cpp */, - 1E6D9FD315D027560064D436 /* PhraseTableCreator.h */, - 1E6D9FD415D027560064D436 /* StringVector.h */, - 1E6D9FD515D027560064D436 /* TargetPhraseCollectionCache.h */, - ); - name = CompactPT; - sourceTree = ""; - }; - 1EAC362B14CDC76200DF97C3 /* RuleTable */ = { - isa = PBXGroup; - children = ( - 1EDA807814D19FBF003D2191 /* PhraseDictionaryALSuffixArray.cpp */, - 1EDA807914D19FBF003D2191 /* PhraseDictionaryALSuffixArray.h */, - 1EDA807A14D19FBF003D2191 /* PhraseDictionaryNodeSCFG.cpp */, - 1EDA807B14D19FBF003D2191 /* PhraseDictionaryNodeSCFG.h */, - 1EDA807C14D19FBF003D2191 /* PhraseDictionaryOnDisk.cpp */, - 1EDA807D14D19FBF003D2191 /* PhraseDictionaryOnDisk.h */, - 1EDA807E14D19FBF003D2191 /* PhraseDictionarySCFG.cpp */, - 1EDA807F14D19FBF003D2191 /* PhraseDictionarySCFG.h */, - 1E0BA41615B70E5F00AC70E1 /* PhraseDictionaryFuzzyMatch.cpp */, - 1E0BA41715B70E5F00AC70E1 /* PhraseDictionaryFuzzyMatch.h */, - 1EDA808014D19FBF003D2191 /* Trie.cpp */, - 1EDA808114D19FBF003D2191 /* Trie.h */, - 1EDA808214D19FBF003D2191 /* UTrie.cpp */, - 1EDA808314D19FBF003D2191 /* UTrie.h */, - 1EDA808414D19FBF003D2191 /* UTrieNode.cpp */, - 1EDA808514D19FBF003D2191 /* UTrieNode.h */, - 1EAC362C14CDC79300DF97C3 /* Loader.h */, - 1EAC362D14CDC79300DF97C3 /* LoaderCompact.cpp */, - 1EAC362E14CDC79300DF97C3 /* LoaderCompact.h */, - 1EAC362F14CDC79300DF97C3 /* LoaderFactory.cpp */, - 1EAC363014CDC79300DF97C3 /* LoaderFactory.h */, - 1EAC363114CDC79300DF97C3 /* LoaderHiero.cpp */, - 1EAC363214CDC79300DF97C3 /* LoaderHiero.h */, - 1EAC363314CDC79300DF97C3 /* LoaderStandard.cpp */, - 1EAC363414CDC79300DF97C3 /* LoaderStandard.h */, - ); - name = RuleTable; - sourceTree = ""; - }; - 1EC7361314B977AA00238410 /* DynSAInclude */ = { - isa = PBXGroup; - children = ( - 1E1D823E15AC29BB00FE42E9 /* FileHandler.cpp */, - 1E1D823F15AC29BB00FE42E9 /* FileHandler.h */, - 1EC7361414B977AA00238410 /* fdstream.h */, - 1EC7361714B977AA00238410 /* hash.h */, - 1EC7361914B977AA00238410 /* onlineRLM.h */, - 1EC7361B14B977AA00238410 /* params.cpp */, - 1EC7361D14B977AA00238410 /* params.h */, - 1EC7361F14B977AA00238410 /* perfectHash.h */, - 1EC7362114B977AA00238410 /* quantizer.h */, - 1EC7362314B977AA00238410 /* RandLMCache.h */, - 1EC7362514B977AA00238410 /* RandLMFilter.h */, - 1EC7362714B977AA00238410 /* types.h */, - 1EC7362814B977AA00238410 /* utils.h */, - 1EC7362914B977AA00238410 /* vocab.cpp */, - 1EC7362B14B977AA00238410 /* vocab.h */, - ); - name = DynSAInclude; - path = ../../moses/src/DynSAInclude; - sourceTree = ""; - }; - 1EC7365B14B977AA00238410 /* LM */ = { - isa = PBXGroup; - children = ( - 1EF0709114B9EFCC0052152A /* ParallelBackoff.cpp */, - 1EF0709214B9EFCC0052152A /* ParallelBackoff.h */, - 1EC7365C14B977AA00238410 /* Base.cpp */, - 1EC7365E14B977AA00238410 /* Base.h */, - 1EC7368714B977AA00238410 /* Factory.cpp */, - 1EC7368814B977AA00238410 /* Factory.h */, - 1EC7368914B977AA00238410 /* Implementation.cpp */, - 1EC7368B14B977AA00238410 /* Implementation.h */, - 1EC7368D14B977AA00238410 /* IRST.cpp */, - 1EC7368F14B977AA00238410 /* IRST.h */, - 1EC7369114B977AA00238410 /* Joint.cpp */, - 1EC7369214B977AA00238410 /* Joint.h */, - 1EC7369314B977AA00238410 /* Ken.cpp */, - 1EC7369514B977AA00238410 /* Ken.h */, - 1EC7369714B977AA00238410 /* MultiFactor.cpp */, - 1EC7369814B977AA00238410 /* MultiFactor.h */, - 1EC7369914B977AA00238410 /* ORLM.cpp */, - 1EC7369B14B977AA00238410 /* ORLM.h */, - 1EC736A314B977AA00238410 /* Remote.cpp */, - 1EC736A414B977AA00238410 /* Remote.h */, - 1EC736A514B977AA00238410 /* SingleFactor.cpp */, - 1EC736A614B977AA00238410 /* SingleFactor.h */, - 1EC736A714B977AA00238410 /* SRI.cpp */, - 1EC736A814B977AA00238410 /* SRI.h */, - ); - name = LM; - path = ../../moses/src/LM; - sourceTree = ""; - }; - 1ECF13DE15C1A82400EA1DCE /* fuzzy-match */ = { - isa = PBXGroup; - children = ( - 1EE418E415C7FDCB0028F9AB /* Match.h */, - 1EE418E515C7FDCB0028F9AB /* SentenceAlignment.cpp */, - 1EE418E615C7FDCB0028F9AB /* SentenceAlignment.h */, - 1EE418E715C7FDCB0028F9AB /* SuffixArray.cpp */, - 1EE418E815C7FDCB0028F9AB /* SuffixArray.h */, - 1EE418E915C7FDCB0028F9AB /* FuzzyMatchWrapper.cpp */, - 1EE418EA15C7FDCB0028F9AB /* FuzzyMatchWrapper.h */, - 1EE418EB15C7FDCB0028F9AB /* Vocabulary.cpp */, - 1EE418EC15C7FDCB0028F9AB /* Vocabulary.h */, - ); - name = "fuzzy-match"; - sourceTree = ""; - }; - 1EDA803414D19EB8003D2191 /* CYKPlusParser */ = { - isa = PBXGroup; - children = ( - 1E619E9F15B8713600C2D7A7 /* ChartRuleLookupManagerMemoryPerSentence.cpp */, - 1E619EA015B8713700C2D7A7 /* ChartRuleLookupManagerMemoryPerSentence.h */, - 1EDA806214D19F12003D2191 /* ChartRuleLookupManagerCYKPlus.cpp */, - 1EDA806314D19F12003D2191 /* ChartRuleLookupManagerCYKPlus.h */, - 1EDA806414D19F12003D2191 /* ChartRuleLookupManagerMemory.cpp */, - 1EDA806514D19F12003D2191 /* ChartRuleLookupManagerMemory.h */, - 1EDA806614D19F12003D2191 /* ChartRuleLookupManagerOnDisk.cpp */, - 1EDA806714D19F12003D2191 /* ChartRuleLookupManagerOnDisk.h */, - 1EDA806814D19F12003D2191 /* DotChart.h */, - 1EDA806914D19F12003D2191 /* DotChartInMemory.cpp */, - 1EDA806A14D19F12003D2191 /* DotChartInMemory.h */, - 1EDA806B14D19F12003D2191 /* DotChartOnDisk.cpp */, - 1EDA806C14D19F12003D2191 /* DotChartOnDisk.h */, - ); - name = CYKPlusParser; - sourceTree = ""; - }; - 1EDA803514D19ECD003D2191 /* Scope3Parser */ = { - isa = PBXGroup; - children = ( - 1EDA803614D19EEF003D2191 /* ApplicableRuleTrie.cpp */, - 1EDA803714D19EEF003D2191 /* ApplicableRuleTrie.h */, - 1EDA804314D19EEF003D2191 /* IntermediateVarSpanNode.h */, - 1EDA804514D19EEF003D2191 /* Parser.cpp */, - 1EDA804614D19EEF003D2191 /* Parser.h */, - 1EDA804714D19EEF003D2191 /* SentenceMap.h */, - 1EDA804814D19EEF003D2191 /* StackLattice.h */, - 1EDA804914D19EEF003D2191 /* StackLatticeBuilder.cpp */, - 1EDA804A14D19EEF003D2191 /* StackLatticeBuilder.h */, - 1EDA804B14D19EEF003D2191 /* StackLatticeSearcher.h */, - 1EDA804C14D19EEF003D2191 /* VarSpanNode.h */, - 1EDA804D14D19EEF003D2191 /* VarSpanTrieBuilder.cpp */, - 1EDA804E14D19EEF003D2191 /* VarSpanTrieBuilder.h */, - ); - name = Scope3Parser; - sourceTree = ""; - }; - C6A0FF2B0290797F04C91782 /* Documentation */ = { - isa = PBXGroup; - children = ( - ); - name = Documentation; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - D2AAC043055464E500DB518D /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EC7374714B977AB00238410 /* AlignmentInfo.h in Headers */, - 1EC7374914B977AB00238410 /* AlignmentInfoCollection.h in Headers */, - 1EC7374B14B977AB00238410 /* BilingualDynSuffixArray.h in Headers */, - 1EC7374D14B977AB00238410 /* BitmapContainer.h in Headers */, - 1EC7375014B977AB00238410 /* ChartCell.h in Headers */, - 1EC7375214B977AB00238410 /* ChartCellCollection.h in Headers */, - 1EC7375314B977AB00238410 /* ChartCellLabel.h in Headers */, - 1EC7375414B977AB00238410 /* ChartCellLabelSet.h in Headers */, - 1EC7375614B977AB00238410 /* ChartHypothesis.h in Headers */, - 1EC7375814B977AB00238410 /* ChartHypothesisCollection.h in Headers */, - 1EC7375A14B977AB00238410 /* ChartManager.h in Headers */, - 1EC7375C14B977AB00238410 /* ChartRuleLookupManager.h in Headers */, - 1EC7376614B977AB00238410 /* ChartTranslationOptionList.h in Headers */, - 1EC7376814B977AB00238410 /* ChartTrellisDetour.h in Headers */, - 1EC7376A14B977AB00238410 /* ChartTrellisDetourQueue.h in Headers */, - 1EC7376C14B977AB00238410 /* ChartTrellisNode.h in Headers */, - 1EC7376E14B977AB00238410 /* ChartTrellisPath.h in Headers */, - 1EC7376F14B977AB00238410 /* ChartTrellisPathList.h in Headers */, - 1EC7377114B977AB00238410 /* ConfusionNet.h in Headers */, - 1EC7377314B977AB00238410 /* DecodeFeature.h in Headers */, - 1EC7377514B977AB00238410 /* DecodeGraph.h in Headers */, - 1EC7377714B977AB00238410 /* DecodeStep.h in Headers */, - 1EC7377914B977AB00238410 /* DecodeStepGeneration.h in Headers */, - 1EC7377B14B977AB00238410 /* DecodeStepTranslation.h in Headers */, - 1EC7377D14B977AB00238410 /* Dictionary.h in Headers */, - 1EC7378514B977AB00238410 /* DummyScoreProducers.h in Headers */, - 1EC7378614B977AB00238410 /* fdstream.h in Headers */, - 1EC7378914B977AB00238410 /* hash.h in Headers */, - 1EC7378A14B977AB00238410 /* onlineRLM.h in Headers */, - 1EC7378C14B977AB00238410 /* params.h in Headers */, - 1EC7378D14B977AB00238410 /* perfectHash.h in Headers */, - 1EC7378E14B977AB00238410 /* quantizer.h in Headers */, - 1EC7378F14B977AB00238410 /* RandLMCache.h in Headers */, - 1EC7379014B977AB00238410 /* RandLMFilter.h in Headers */, - 1EC7379114B977AB00238410 /* types.h in Headers */, - 1EC7379214B977AB00238410 /* utils.h in Headers */, - 1EC7379414B977AB00238410 /* vocab.h in Headers */, - 1EC7379614B977AB00238410 /* DynSuffixArray.h in Headers */, - 1EC7379814B977AB00238410 /* Factor.h in Headers */, - 1EC7379A14B977AB00238410 /* FactorCollection.h in Headers */, - 1EC7379C14B977AB00238410 /* FactorTypeSet.h in Headers */, - 1EC7379E14B977AB00238410 /* FeatureFunction.h in Headers */, - 1EC737A014B977AB00238410 /* FFState.h in Headers */, - 1EC737A214B977AB00238410 /* File.h in Headers */, - 1EC737A314B977AB00238410 /* FilePtr.h in Headers */, - 1EC737A514B977AB00238410 /* FloydWarshall.h in Headers */, - 1EC737A714B977AB00238410 /* GenerationDictionary.h in Headers */, - 1EC737A914B977AB00238410 /* GlobalLexicalModel.h in Headers */, - 1EC737AA14B977AB00238410 /* gzfilebuf.h in Headers */, - 1EC737AE14B977AB00238410 /* Hypothesis.h in Headers */, - 1EC737B014B977AB00238410 /* HypothesisStack.h in Headers */, - 1EC737B214B977AB00238410 /* HypothesisStackCubePruning.h in Headers */, - 1EC737B414B977AB00238410 /* HypothesisStackNormal.h in Headers */, - 1EC737B614B977AB00238410 /* InputFileStream.h in Headers */, - 1EC737B814B977AB00238410 /* InputType.h in Headers */, - 1EC737BC14B977AB00238410 /* LexicalReordering.h in Headers */, - 1EC737BE14B977AB00238410 /* LexicalReorderingState.h in Headers */, - 1EC737C014B977AB00238410 /* LexicalReorderingTable.h in Headers */, - 1EC737C214B977AB00238410 /* Base.h in Headers */, - 1EC737DB14B977AB00238410 /* Factory.h in Headers */, - 1EC737DD14B977AB00238410 /* Implementation.h in Headers */, - 1EC737DF14B977AB00238410 /* IRST.h in Headers */, - 1EC737E214B977AB00238410 /* Joint.h in Headers */, - 1EC737E414B977AB00238410 /* Ken.h in Headers */, - 1EC737E614B977AB00238410 /* MultiFactor.h in Headers */, - 1EC737E814B977AB00238410 /* ORLM.h in Headers */, - 1EC737EE14B977AB00238410 /* Remote.h in Headers */, - 1EC737F014B977AB00238410 /* SingleFactor.h in Headers */, - 1EC737F214B977AB00238410 /* SRI.h in Headers */, - 1EC737F414B977AB00238410 /* LMList.h in Headers */, - 1EC737F614B977AB00238410 /* LVoc.h in Headers */, - 1EC737F814B977AB00238410 /* Manager.h in Headers */, - 1EC737FA14B977AB00238410 /* NonTerminal.h in Headers */, - 1EC737FB14B977AB00238410 /* ObjectPool.h in Headers */, - 1EC737FC14B977AB00238410 /* OutputCollector.h in Headers */, - 1EC737FF14B977AB00238410 /* Parameter.h in Headers */, - 1EC7380114B977AB00238410 /* PartialTranslOptColl.h in Headers */, - 1EC7380314B977AB00238410 /* PCNTools.h in Headers */, - 1EC7380414B977AB00238410 /* PDTAimp.h in Headers */, - 1EC7380614B977AB00238410 /* Phrase.h in Headers */, - 1EC7380814B977AB00238410 /* PhraseDictionary.h in Headers */, - 1EC7380C14B977AB00238410 /* PhraseDictionaryDynSuffixArray.h in Headers */, - 1EC7381014B977AB00238410 /* PhraseDictionaryMemory.h in Headers */, - 1EC7381214B977AB00238410 /* PhraseDictionaryNode.h in Headers */, - 1EC7381A14B977AB00238410 /* PhraseDictionaryTree.h in Headers */, - 1EC7381C14B977AB00238410 /* PhraseDictionaryTreeAdaptor.h in Headers */, - 1EC7381D14B977AB00238410 /* PrefixTree.h in Headers */, - 1EC7381F14B977AB00238410 /* PrefixTreeMap.h in Headers */, - 1EC7382114B977AB00238410 /* ReorderingConstraint.h in Headers */, - 1EC7382314B977AB00238410 /* ReorderingStack.h in Headers */, - 1EC7382514B977AB00238410 /* RuleCube.h in Headers */, - 1EC7382714B977AB00238410 /* RuleCubeItem.h in Headers */, - 1EC7382914B977AB00238410 /* RuleCubeQueue.h in Headers */, - 1EC7383414B977AB00238410 /* ScoreComponentCollection.h in Headers */, - 1EC7383814B977AB00238410 /* ScoreProducer.h in Headers */, - 1EC7383A14B977AB00238410 /* Search.h in Headers */, - 1EC7383C14B977AB00238410 /* SearchCubePruning.h in Headers */, - 1EC7383E14B977AB00238410 /* SearchNormal.h in Headers */, - 1EC7384014B977AB00238410 /* Sentence.h in Headers */, - 1EC7384214B977AB00238410 /* SentenceStats.h in Headers */, - 1EC7384414B977AB00238410 /* SquareMatrix.h in Headers */, - 1EC7384714B977AB00238410 /* StaticData.h in Headers */, - 1EC7384E14B977AB00238410 /* TargetPhrase.h in Headers */, - 1EC7385014B977AB00238410 /* TargetPhraseCollection.h in Headers */, - 1EC7385214B977AB00238410 /* ThreadPool.h in Headers */, - 1EC7385414B977AB00238410 /* Timer.h in Headers */, - 1EC7385614B977AB00238410 /* TranslationOption.h in Headers */, - 1EC7385814B977AB00238410 /* TranslationOptionCollection.h in Headers */, - 1EC7385A14B977AB00238410 /* TranslationOptionCollectionConfusionNet.h in Headers */, - 1EC7385C14B977AB00238410 /* TranslationOptionCollectionText.h in Headers */, - 1EC7385E14B977AB00238410 /* TranslationOptionList.h in Headers */, - 1EC7386014B977AB00238410 /* TranslationSystem.h in Headers */, - 1EC7386214B977AB00238410 /* TreeInput.h in Headers */, - 1EC7386514B977AB00238410 /* TrellisPath.h in Headers */, - 1EC7386814B977AB00238410 /* TrellisPathCollection.h in Headers */, - 1EC7386A14B977AB00238410 /* TrellisPathList.h in Headers */, - 1EC7386B14B977AB00238410 /* TypeDef.h in Headers */, - 1EC7386C14B977AB00238410 /* UniqueObject.h in Headers */, - 1EC7386E14B977AB00238410 /* UserMessage.h in Headers */, - 1EC7387114B977AB00238410 /* Util.h in Headers */, - 1EC7387414B977AB00238410 /* Word.h in Headers */, - 1EC7387714B977AB00238410 /* WordLattice.h in Headers */, - 1EC7387A14B977AB00238410 /* WordsBitmap.h in Headers */, - 1EC7387D14B977AB00238410 /* WordsRange.h in Headers */, - 1EC7388014B977AB00238410 /* XmlOption.h in Headers */, - 1EF0709414B9EFCC0052152A /* ParallelBackoff.h in Headers */, - 1EAC363514CDC79300DF97C3 /* Loader.h in Headers */, - 1EAC363714CDC79300DF97C3 /* LoaderCompact.h in Headers */, - 1EAC363914CDC79300DF97C3 /* LoaderFactory.h in Headers */, - 1EAC363B14CDC79300DF97C3 /* LoaderHiero.h in Headers */, - 1EAC363D14CDC79300DF97C3 /* LoaderStandard.h in Headers */, - 1EDA805014D19EEF003D2191 /* ApplicableRuleTrie.h in Headers */, - 1EDA805614D19EEF003D2191 /* IntermediateVarSpanNode.h in Headers */, - 1EDA805914D19EEF003D2191 /* Parser.h in Headers */, - 1EDA805A14D19EEF003D2191 /* SentenceMap.h in Headers */, - 1EDA805B14D19EEF003D2191 /* StackLattice.h in Headers */, - 1EDA805D14D19EEF003D2191 /* StackLatticeBuilder.h in Headers */, - 1EDA805E14D19EEF003D2191 /* StackLatticeSearcher.h in Headers */, - 1EDA805F14D19EEF003D2191 /* VarSpanNode.h in Headers */, - 1EDA806114D19EEF003D2191 /* VarSpanTrieBuilder.h in Headers */, - 1EDA806E14D19F12003D2191 /* ChartRuleLookupManagerCYKPlus.h in Headers */, - 1EDA807014D19F12003D2191 /* ChartRuleLookupManagerMemory.h in Headers */, - 1EDA807214D19F12003D2191 /* ChartRuleLookupManagerOnDisk.h in Headers */, - 1EDA807314D19F12003D2191 /* DotChart.h in Headers */, - 1EDA807514D19F12003D2191 /* DotChartInMemory.h in Headers */, - 1EDA807714D19F12003D2191 /* DotChartOnDisk.h in Headers */, - 1EDA808714D19FBF003D2191 /* PhraseDictionaryALSuffixArray.h in Headers */, - 1EDA808914D19FBF003D2191 /* PhraseDictionaryNodeSCFG.h in Headers */, - 1EDA808B14D19FBF003D2191 /* PhraseDictionaryOnDisk.h in Headers */, - 1EDA808D14D19FBF003D2191 /* PhraseDictionarySCFG.h in Headers */, - 1EDA808F14D19FBF003D2191 /* Trie.h in Headers */, - 1EDA809114D19FBF003D2191 /* UTrie.h in Headers */, - 1EDA809314D19FBF003D2191 /* UTrieNode.h in Headers */, - 1EF8F2C4159A61970047B613 /* HypoList.h in Headers */, - 1E879EA815A346F90051F346 /* SearchNormalBatch.h in Headers */, - 1E1D824115AC29BB00FE42E9 /* FileHandler.h in Headers */, - 1E0BA41915B70E5F00AC70E1 /* PhraseDictionaryFuzzyMatch.h in Headers */, - 1E619EA215B8713700C2D7A7 /* ChartRuleLookupManagerMemoryPerSentence.h in Headers */, - 1EE418ED15C7FDCB0028F9AB /* Match.h in Headers */, - 1EE418EF15C7FDCB0028F9AB /* SentenceAlignment.h in Headers */, - 1EE418F115C7FDCB0028F9AB /* SuffixArray.h in Headers */, - 1EE418F315C7FDCB0028F9AB /* FuzzyMatchWrapper.h in Headers */, - 1EE418F515C7FDCB0028F9AB /* Vocabulary.h in Headers */, - 1E6D9FD715D027560064D436 /* BlockHashIndex.h in Headers */, - 1E6D9FD815D027560064D436 /* CanonicalHuffman.h in Headers */, - 1E6D9FDA15D027560064D436 /* CmphStringVectorAdapter.h in Headers */, - 1E6D9FDB15D027560064D436 /* ConsistantPhrases.h in Headers */, - 1E6D9FDE15D027560064D436 /* LexicalReorderingTableCompact.h in Headers */, - 1E6D9FE015D027560064D436 /* LexicalReorderingTableCreator.h in Headers */, - 1E6D9FE115D027560064D436 /* ListCoders.h in Headers */, - 1E6D9FE215D027560064D436 /* MmapAllocator.h in Headers */, - 1E6D9FE315D027560064D436 /* MonotonicVector.h in Headers */, - 1E6D9FE515D027560064D436 /* MurmurHash3.h in Headers */, - 1E6D9FE615D027560064D436 /* PackedArray.h in Headers */, - 1E6D9FE815D027560064D436 /* PhraseDecoder.h in Headers */, - 1E6D9FEA15D027560064D436 /* PhraseDictionaryCompact.h in Headers */, - 1E6D9FEC15D027560064D436 /* PhraseTableCreator.h in Headers */, - 1E6D9FED15D027560064D436 /* StringVector.h in Headers */, - 1E6D9FEE15D027560064D436 /* TargetPhraseCollectionCache.h in Headers */, - 1EC32DB915D2D90700A313B1 /* ThrowingFwrite.h in Headers */, - 1E365EEB16120F4600BA335B /* ChartTranslationOptions.h in Headers */, - 1E316468163B0C5200F64999 /* BleuScoreFeature.h in Headers */, - 1E31646A163B0C5200F64999 /* ChartParser.h in Headers */, - 1E31646B163B0C5200F64999 /* ChartParserCallback.h in Headers */, - 1E3165AB163B0CB200F64999 /* FeatureVector.h in Headers */, - 1E3165B9163B0CB200F64999 /* FuzzyMatchWrapper.h in Headers */, - 1E3165BB163B0CB200F64999 /* Match.h in Headers */, - 1E3165BD163B0CB200F64999 /* SentenceAlignment.h in Headers */, - 1E3165BF163B0CB200F64999 /* SuffixArray.h in Headers */, - 1E3165C1163B0CB200F64999 /* Vocabulary.h in Headers */, - 1E3165C3163B0CB200F64999 /* GlobalLexicalModelUnlimited.h in Headers */, - 1E3165C8163B0CB200F64999 /* Fill.h in Headers */, - 1E3165CB163B0CB200F64999 /* Manager.h in Headers */, - 1E3165CF163B0CB200F64999 /* Base.h in Headers */, - 1E31660A163B0CB200F64999 /* Factory.h in Headers */, - 1E31660C163B0CB200F64999 /* Implementation.h in Headers */, - 1E31660E163B0CB200F64999 /* IRST.h in Headers */, - 1E316611163B0CB200F64999 /* Joint.h in Headers */, - 1E316613163B0CB200F64999 /* Ken.h in Headers */, - 1E316615163B0CB200F64999 /* LDHT.h in Headers */, - 1E316617163B0CB200F64999 /* MultiFactor.h in Headers */, - 1E316619163B0CB200F64999 /* ORLM.h in Headers */, - 1E31661B163B0CB200F64999 /* ParallelBackoff.h in Headers */, - 1E31661F163B0CB200F64999 /* Remote.h in Headers */, - 1E316621163B0CB200F64999 /* SingleFactor.h in Headers */, - 1E316623163B0CB200F64999 /* SRI.h in Headers */, - 1E316625163B0CB200F64999 /* MockHypothesis.h in Headers */, - 1E316629163B0CB200F64999 /* PhraseBoundaryFeature.h in Headers */, - 1E31662B163B0CB200F64999 /* PhraseLengthFeature.h in Headers */, - 1E31662D163B0CB200F64999 /* PhrasePairFeature.h in Headers */, - 1E316655163B0CB200F64999 /* Loader.h in Headers */, - 1E316657163B0CB200F64999 /* LoaderCompact.h in Headers */, - 1E316659163B0CB200F64999 /* LoaderFactory.h in Headers */, - 1E31665B163B0CB200F64999 /* LoaderHiero.h in Headers */, - 1E31665D163B0CB200F64999 /* LoaderStandard.h in Headers */, - 1E31665F163B0CB200F64999 /* PhraseDictionaryALSuffixArray.h in Headers */, - 1E316661163B0CB200F64999 /* PhraseDictionaryFuzzyMatch.h in Headers */, - 1E316663163B0CB200F64999 /* PhraseDictionaryNodeSCFG.h in Headers */, - 1E316665163B0CB200F64999 /* PhraseDictionaryOnDisk.h in Headers */, - 1E316667163B0CB200F64999 /* PhraseDictionarySCFG.h in Headers */, - 1E316669163B0CB200F64999 /* Trie.h in Headers */, - 1E31666B163B0CB200F64999 /* UTrie.h in Headers */, - 1E31666D163B0CB200F64999 /* UTrieNode.h in Headers */, - 1E31666F163B0CB200F64999 /* ApplicableRuleTrie.h in Headers */, - 1E31667E163B0CB200F64999 /* IntermediateVarSpanNode.h in Headers */, - 1E316681163B0CB200F64999 /* Parser.h in Headers */, - 1E316682163B0CB200F64999 /* SentenceMap.h in Headers */, - 1E316683163B0CB200F64999 /* StackLattice.h in Headers */, - 1E316685163B0CB200F64999 /* StackLatticeBuilder.h in Headers */, - 1E316686163B0CB200F64999 /* StackLatticeSearcher.h in Headers */, - 1E316687163B0CB200F64999 /* VarSpanNode.h in Headers */, - 1E316689163B0CB200F64999 /* VarSpanTrieBuilder.h in Headers */, - 1E31668C163B0CB200F64999 /* SourceWordDeletionFeature.h in Headers */, - 1E31668E163B0CB200F64999 /* SparsePhraseDictionaryFeature.h in Headers */, - 1E316690163B0CB200F64999 /* StackVec.h in Headers */, - 1E316697163B0CB200F64999 /* TargetBigramFeature.h in Headers */, - 1E31669A163B0CB200F64999 /* TargetNgramFeature.h in Headers */, - 1E31669C163B0CB200F64999 /* TargetWordInsertionFeature.h in Headers */, - 1E31669D163B0CB200F64999 /* Terminal.h in Headers */, - 1EBC53A1164C44FC00ADFA2C /* WordTranslationFeature.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - D2AAC045055464E500DB518D /* moses */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1DEB91EB08733DB70010E9CD /* Build configuration list for PBXNativeTarget "moses" */; - buildPhases = ( - D2AAC043055464E500DB518D /* Headers */, - D2AAC044055464E500DB518D /* Sources */, - D289987405E68DCB004EDB86 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = moses; - productName = moses; - productReference = D2AAC046055464E500DB518D /* libmoses.a */; - productType = "com.apple.product-type.library.static"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 08FB7793FE84155DC02AAC07 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0420; - }; - buildConfigurationList = 1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "moses" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 08FB7794FE84155DC02AAC07 /* moses */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - D2AAC045055464E500DB518D /* moses */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - D2AAC044055464E500DB518D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EC7374614B977AB00238410 /* AlignmentInfo.cpp in Sources */, - 1EC7374814B977AB00238410 /* AlignmentInfoCollection.cpp in Sources */, - 1EC7374A14B977AB00238410 /* BilingualDynSuffixArray.cpp in Sources */, - 1EC7374C14B977AB00238410 /* BitmapContainer.cpp in Sources */, - 1EC7374F14B977AB00238410 /* ChartCell.cpp in Sources */, - 1EC7375114B977AB00238410 /* ChartCellCollection.cpp in Sources */, - 1EC7375514B977AB00238410 /* ChartHypothesis.cpp in Sources */, - 1EC7375714B977AB00238410 /* ChartHypothesisCollection.cpp in Sources */, - 1EC7375914B977AB00238410 /* ChartManager.cpp in Sources */, - 1EC7376514B977AB00238410 /* ChartTranslationOptionList.cpp in Sources */, - 1EC7376714B977AB00238410 /* ChartTrellisDetour.cpp in Sources */, - 1EC7376914B977AB00238410 /* ChartTrellisDetourQueue.cpp in Sources */, - 1EC7376B14B977AB00238410 /* ChartTrellisNode.cpp in Sources */, - 1EC7376D14B977AB00238410 /* ChartTrellisPath.cpp in Sources */, - 1EC7377014B977AB00238410 /* ConfusionNet.cpp in Sources */, - 1EC7377214B977AB00238410 /* DecodeFeature.cpp in Sources */, - 1EC7377414B977AB00238410 /* DecodeGraph.cpp in Sources */, - 1EC7377614B977AB00238410 /* DecodeStep.cpp in Sources */, - 1EC7377814B977AB00238410 /* DecodeStepGeneration.cpp in Sources */, - 1EC7377A14B977AB00238410 /* DecodeStepTranslation.cpp in Sources */, - 1EC7377C14B977AB00238410 /* Dictionary.cpp in Sources */, - 1EC7378414B977AB00238410 /* DummyScoreProducers.cpp in Sources */, - 1EC7378B14B977AB00238410 /* params.cpp in Sources */, - 1EC7379314B977AB00238410 /* vocab.cpp in Sources */, - 1EC7379514B977AB00238410 /* DynSuffixArray.cpp in Sources */, - 1EC7379714B977AB00238410 /* Factor.cpp in Sources */, - 1EC7379914B977AB00238410 /* FactorCollection.cpp in Sources */, - 1EC7379B14B977AB00238410 /* FactorTypeSet.cpp in Sources */, - 1EC7379D14B977AB00238410 /* FeatureFunction.cpp in Sources */, - 1EC7379F14B977AB00238410 /* FFState.cpp in Sources */, - 1EC737A114B977AB00238410 /* File.cpp in Sources */, - 1EC737A414B977AB00238410 /* FloydWarshall.cpp in Sources */, - 1EC737A614B977AB00238410 /* GenerationDictionary.cpp in Sources */, - 1EC737A814B977AB00238410 /* GlobalLexicalModel.cpp in Sources */, - 1EC737AD14B977AB00238410 /* Hypothesis.cpp in Sources */, - 1EC737AF14B977AB00238410 /* HypothesisStack.cpp in Sources */, - 1EC737B114B977AB00238410 /* HypothesisStackCubePruning.cpp in Sources */, - 1EC737B314B977AB00238410 /* HypothesisStackNormal.cpp in Sources */, - 1EC737B514B977AB00238410 /* InputFileStream.cpp in Sources */, - 1EC737B714B977AB00238410 /* InputType.cpp in Sources */, - 1EC737BB14B977AB00238410 /* LexicalReordering.cpp in Sources */, - 1EC737BD14B977AB00238410 /* LexicalReorderingState.cpp in Sources */, - 1EC737BF14B977AB00238410 /* LexicalReorderingTable.cpp in Sources */, - 1EC737C114B977AB00238410 /* Base.cpp in Sources */, - 1EC737DA14B977AB00238410 /* Factory.cpp in Sources */, - 1EC737DC14B977AB00238410 /* Implementation.cpp in Sources */, - 1EC737DE14B977AB00238410 /* IRST.cpp in Sources */, - 1EC737E114B977AB00238410 /* Joint.cpp in Sources */, - 1EC737E314B977AB00238410 /* Ken.cpp in Sources */, - 1EC737E514B977AB00238410 /* MultiFactor.cpp in Sources */, - 1EC737E714B977AB00238410 /* ORLM.cpp in Sources */, - 1EC737ED14B977AB00238410 /* Remote.cpp in Sources */, - 1EC737EF14B977AB00238410 /* SingleFactor.cpp in Sources */, - 1EC737F114B977AB00238410 /* SRI.cpp in Sources */, - 1EC737F314B977AB00238410 /* LMList.cpp in Sources */, - 1EC737F514B977AB00238410 /* LVoc.cpp in Sources */, - 1EC737F714B977AB00238410 /* Manager.cpp in Sources */, - 1EC737F914B977AB00238410 /* NonTerminal.cpp in Sources */, - 1EC737FE14B977AB00238410 /* Parameter.cpp in Sources */, - 1EC7380014B977AB00238410 /* PartialTranslOptColl.cpp in Sources */, - 1EC7380214B977AB00238410 /* PCNTools.cpp in Sources */, - 1EC7380514B977AB00238410 /* Phrase.cpp in Sources */, - 1EC7380714B977AB00238410 /* PhraseDictionary.cpp in Sources */, - 1EC7380B14B977AB00238410 /* PhraseDictionaryDynSuffixArray.cpp in Sources */, - 1EC7380F14B977AB00238410 /* PhraseDictionaryMemory.cpp in Sources */, - 1EC7381114B977AB00238410 /* PhraseDictionaryNode.cpp in Sources */, - 1EC7381914B977AB00238410 /* PhraseDictionaryTree.cpp in Sources */, - 1EC7381B14B977AB00238410 /* PhraseDictionaryTreeAdaptor.cpp in Sources */, - 1EC7381E14B977AB00238410 /* PrefixTreeMap.cpp in Sources */, - 1EC7382014B977AB00238410 /* ReorderingConstraint.cpp in Sources */, - 1EC7382214B977AB00238410 /* ReorderingStack.cpp in Sources */, - 1EC7382414B977AB00238410 /* RuleCube.cpp in Sources */, - 1EC7382614B977AB00238410 /* RuleCubeItem.cpp in Sources */, - 1EC7382814B977AB00238410 /* RuleCubeQueue.cpp in Sources */, - 1EC7383314B977AB00238410 /* ScoreComponentCollection.cpp in Sources */, - 1EC7383714B977AB00238410 /* ScoreProducer.cpp in Sources */, - 1EC7383914B977AB00238410 /* Search.cpp in Sources */, - 1EC7383B14B977AB00238410 /* SearchCubePruning.cpp in Sources */, - 1EC7383D14B977AB00238410 /* SearchNormal.cpp in Sources */, - 1EC7383F14B977AB00238410 /* Sentence.cpp in Sources */, - 1EC7384114B977AB00238410 /* SentenceStats.cpp in Sources */, - 1EC7384314B977AB00238410 /* SquareMatrix.cpp in Sources */, - 1EC7384614B977AB00238410 /* StaticData.cpp in Sources */, - 1EC7384D14B977AB00238410 /* TargetPhrase.cpp in Sources */, - 1EC7384F14B977AB00238410 /* TargetPhraseCollection.cpp in Sources */, - 1EC7385114B977AB00238410 /* ThreadPool.cpp in Sources */, - 1EC7385314B977AB00238410 /* Timer.cpp in Sources */, - 1EC7385514B977AB00238410 /* TranslationOption.cpp in Sources */, - 1EC7385714B977AB00238410 /* TranslationOptionCollection.cpp in Sources */, - 1EC7385914B977AB00238410 /* TranslationOptionCollectionConfusionNet.cpp in Sources */, - 1EC7385B14B977AB00238410 /* TranslationOptionCollectionText.cpp in Sources */, - 1EC7385D14B977AB00238410 /* TranslationOptionList.cpp in Sources */, - 1EC7385F14B977AB00238410 /* TranslationSystem.cpp in Sources */, - 1EC7386114B977AB00238410 /* TreeInput.cpp in Sources */, - 1EC7386414B977AB00238410 /* TrellisPath.cpp in Sources */, - 1EC7386714B977AB00238410 /* TrellisPathCollection.cpp in Sources */, - 1EC7386D14B977AB00238410 /* UserMessage.cpp in Sources */, - 1EC7387014B977AB00238410 /* Util.cpp in Sources */, - 1EC7387314B977AB00238410 /* Word.cpp in Sources */, - 1EC7387614B977AB00238410 /* WordLattice.cpp in Sources */, - 1EC7387914B977AB00238410 /* WordsBitmap.cpp in Sources */, - 1EC7387C14B977AB00238410 /* WordsRange.cpp in Sources */, - 1EC7387F14B977AB00238410 /* XmlOption.cpp in Sources */, - 1EF0709314B9EFCC0052152A /* ParallelBackoff.cpp in Sources */, - 1EAC363614CDC79300DF97C3 /* LoaderCompact.cpp in Sources */, - 1EAC363814CDC79300DF97C3 /* LoaderFactory.cpp in Sources */, - 1EAC363A14CDC79300DF97C3 /* LoaderHiero.cpp in Sources */, - 1EAC363C14CDC79300DF97C3 /* LoaderStandard.cpp in Sources */, - 1EDA804F14D19EEF003D2191 /* ApplicableRuleTrie.cpp in Sources */, - 1EDA805814D19EEF003D2191 /* Parser.cpp in Sources */, - 1EDA805C14D19EEF003D2191 /* StackLatticeBuilder.cpp in Sources */, - 1EDA806014D19EEF003D2191 /* VarSpanTrieBuilder.cpp in Sources */, - 1EDA806D14D19F12003D2191 /* ChartRuleLookupManagerCYKPlus.cpp in Sources */, - 1EDA806F14D19F12003D2191 /* ChartRuleLookupManagerMemory.cpp in Sources */, - 1EDA807114D19F12003D2191 /* ChartRuleLookupManagerOnDisk.cpp in Sources */, - 1EDA807414D19F12003D2191 /* DotChartInMemory.cpp in Sources */, - 1EDA807614D19F12003D2191 /* DotChartOnDisk.cpp in Sources */, - 1EDA808614D19FBF003D2191 /* PhraseDictionaryALSuffixArray.cpp in Sources */, - 1EDA808814D19FBF003D2191 /* PhraseDictionaryNodeSCFG.cpp in Sources */, - 1EDA808A14D19FBF003D2191 /* PhraseDictionaryOnDisk.cpp in Sources */, - 1EDA808C14D19FBF003D2191 /* PhraseDictionarySCFG.cpp in Sources */, - 1EDA808E14D19FBF003D2191 /* Trie.cpp in Sources */, - 1EDA809014D19FBF003D2191 /* UTrie.cpp in Sources */, - 1EDA809214D19FBF003D2191 /* UTrieNode.cpp in Sources */, - 1E879EA715A346F90051F346 /* SearchNormalBatch.cpp in Sources */, - 1E1D824015AC29BB00FE42E9 /* FileHandler.cpp in Sources */, - 1E0BA41815B70E5F00AC70E1 /* PhraseDictionaryFuzzyMatch.cpp in Sources */, - 1E619EA115B8713700C2D7A7 /* ChartRuleLookupManagerMemoryPerSentence.cpp in Sources */, - 1EE418EE15C7FDCB0028F9AB /* SentenceAlignment.cpp in Sources */, - 1EE418F015C7FDCB0028F9AB /* SuffixArray.cpp in Sources */, - 1EE418F215C7FDCB0028F9AB /* FuzzyMatchWrapper.cpp in Sources */, - 1EE418F415C7FDCB0028F9AB /* Vocabulary.cpp in Sources */, - 1E6D9FD615D027560064D436 /* BlockHashIndex.cpp in Sources */, - 1E6D9FD915D027560064D436 /* CmphStringVectorAdapter.cpp in Sources */, - 1E6D9FDD15D027560064D436 /* LexicalReorderingTableCompact.cpp in Sources */, - 1E6D9FDF15D027560064D436 /* LexicalReorderingTableCreator.cpp in Sources */, - 1E6D9FE415D027560064D436 /* MurmurHash3.cpp in Sources */, - 1E6D9FE715D027560064D436 /* PhraseDecoder.cpp in Sources */, - 1E6D9FE915D027560064D436 /* PhraseDictionaryCompact.cpp in Sources */, - 1E6D9FEB15D027560064D436 /* PhraseTableCreator.cpp in Sources */, - 1EC32DB815D2D90700A313B1 /* ThrowingFwrite.cpp in Sources */, - 1E365EEA16120F4600BA335B /* ChartTranslationOptions.cpp in Sources */, - 1E316469163B0C5200F64999 /* ChartParser.cpp in Sources */, - 1E31646D163B0C6D00F64999 /* BleuScoreFeature.cpp in Sources */, - 1E3165AA163B0CB200F64999 /* FeatureVector.cpp in Sources */, - 1E3165AC163B0CB200F64999 /* FeatureVectorTest.cpp in Sources */, - 1E3165B8163B0CB200F64999 /* FuzzyMatchWrapper.cpp in Sources */, - 1E3165BA163B0CB200F64999 /* Jamfile in Sources */, - 1E3165BC163B0CB200F64999 /* SentenceAlignment.cpp in Sources */, - 1E3165BE163B0CB200F64999 /* SuffixArray.cpp in Sources */, - 1E3165C0163B0CB200F64999 /* Vocabulary.cpp in Sources */, - 1E3165C2163B0CB200F64999 /* GlobalLexicalModelUnlimited.cpp in Sources */, - 1E3165C7163B0CB200F64999 /* Fill.cpp in Sources */, - 1E3165C9163B0CB200F64999 /* Jamfile in Sources */, - 1E3165CA163B0CB200F64999 /* Manager.cpp in Sources */, - 1E3165CE163B0CB200F64999 /* Base.cpp in Sources */, - 1E316609163B0CB200F64999 /* Factory.cpp in Sources */, - 1E31660B163B0CB200F64999 /* Implementation.cpp in Sources */, - 1E31660D163B0CB200F64999 /* IRST.cpp in Sources */, - 1E31660F163B0CB200F64999 /* Jamfile in Sources */, - 1E316610163B0CB200F64999 /* Joint.cpp in Sources */, - 1E316612163B0CB200F64999 /* Ken.cpp in Sources */, - 1E316616163B0CB200F64999 /* MultiFactor.cpp in Sources */, - 1E316618163B0CB200F64999 /* ORLM.cpp in Sources */, - 1E31661A163B0CB200F64999 /* ParallelBackoff.cpp in Sources */, - 1E31661E163B0CB200F64999 /* Remote.cpp in Sources */, - 1E316620163B0CB200F64999 /* SingleFactor.cpp in Sources */, - 1E316622163B0CB200F64999 /* SRI.cpp in Sources */, - 1E316624163B0CB200F64999 /* MockHypothesis.cpp in Sources */, - 1E316628163B0CB200F64999 /* PhraseBoundaryFeature.cpp in Sources */, - 1E31662A163B0CB200F64999 /* PhraseLengthFeature.cpp in Sources */, - 1E31662C163B0CB200F64999 /* PhrasePairFeature.cpp in Sources */, - 1E316654163B0CB200F64999 /* Jamfile in Sources */, - 1E316656163B0CB200F64999 /* LoaderCompact.cpp in Sources */, - 1E316658163B0CB200F64999 /* LoaderFactory.cpp in Sources */, - 1E31665A163B0CB200F64999 /* LoaderHiero.cpp in Sources */, - 1E31665C163B0CB200F64999 /* LoaderStandard.cpp in Sources */, - 1E31665E163B0CB200F64999 /* PhraseDictionaryALSuffixArray.cpp in Sources */, - 1E316660163B0CB200F64999 /* PhraseDictionaryFuzzyMatch.cpp in Sources */, - 1E316662163B0CB200F64999 /* PhraseDictionaryNodeSCFG.cpp in Sources */, - 1E316664163B0CB200F64999 /* PhraseDictionaryOnDisk.cpp in Sources */, - 1E316666163B0CB200F64999 /* PhraseDictionarySCFG.cpp in Sources */, - 1E316668163B0CB200F64999 /* Trie.cpp in Sources */, - 1E31666A163B0CB200F64999 /* UTrie.cpp in Sources */, - 1E31666C163B0CB200F64999 /* UTrieNode.cpp in Sources */, - 1E31666E163B0CB200F64999 /* ApplicableRuleTrie.cpp in Sources */, - 1E31667F163B0CB200F64999 /* Jamfile in Sources */, - 1E316680163B0CB200F64999 /* Parser.cpp in Sources */, - 1E316684163B0CB200F64999 /* StackLatticeBuilder.cpp in Sources */, - 1E316688163B0CB200F64999 /* VarSpanTrieBuilder.cpp in Sources */, - 1E31668A163B0CB200F64999 /* ScoreComponentCollectionTest.cpp in Sources */, - 1E31668B163B0CB200F64999 /* SourceWordDeletionFeature.cpp in Sources */, - 1E31668D163B0CB200F64999 /* SparsePhraseDictionaryFeature.cpp in Sources */, - 1E316696163B0CB200F64999 /* TargetBigramFeature.cpp in Sources */, - 1E316698163B0CB200F64999 /* TargetBigramFeatureTest.cpp in Sources */, - 1E316699163B0CB200F64999 /* TargetNgramFeature.cpp in Sources */, - 1E31669B163B0CB200F64999 /* TargetWordInsertionFeature.cpp in Sources */, - 1EBC53A0164C44FC00ADFA2C /* WordTranslationFeature.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1DEB91EC08733DB70010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_MODEL_TUNING = G5; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - TRACE_ENABLE, - LM_SRI, - LM_IRST, - LM_INTERNAL, - LM_KEN, - LM_IRST, - "_FILE_OFFSET_BITS=64", - _LARGE_FILES, - WITH_THREADS, - IS_XCODE, - HAVE_CMPH, - "KENLM_MAX_ORDER=7", - "MAX_NUM_FACTORS=4", - ); - HEADER_SEARCH_PATHS = ( - ../.., - ../../moses/src, - ../../irstlm/include, - ../../srilm/include, - ../../kenlm, - ../../randlm/include, - /opt/local/include, - ../../synlm/hhmm/wsjparse/include, - ../../synlm/hhmm/rvtl/include/, - ); - INSTALL_PATH = /usr/local/lib; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/../../moses/src/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/bin/darwin-4.2.1/release/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/bin/gcc-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/LM/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/LM/bin/darwin-4.2.1/release/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/LM/bin/gcc-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/Scope3Parser/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/fuzzy-match/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/fuzzy-match/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/Incremental/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/LM/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/RuleTable/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/RuleTable/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/Scope3Parser/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - ); - PRODUCT_NAME = moses; - SDKROOT = ""; - USER_HEADER_SEARCH_PATHS = "../.. ../../moses/src ../../irstlm/include ../../srilm/include ../../kenlm ../../randlm/include /opt/local/include ../../synlm/hhmm/wsjparse/include ../../synlm/hhmm/rvtl/include/ ../.. ../../cmph/include"; - }; - name = Debug; - }; - 1DEB91ED08733DB70010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_MODEL_TUNING = G5; - GCC_PREPROCESSOR_DEFINITIONS = ( - TRACE_ENABLE, - LM_SRI, - LM_IRST, - LM_INTERNAL, - LM_KEN, - LM_IRST, - "_FILE_OFFSET_BITS=64", - _LARGE_FILES, - WITH_THREADS, - IS_XCODE, - HAVE_CMPH, - "KENLM_MAX_ORDER=7", - "MAX_NUM_FACTORS=4", - ); - HEADER_SEARCH_PATHS = ( - ../.., - ../../moses/src, - ../../irstlm/include, - ../../srilm/include, - ../../kenlm, - ../../randlm/include, - /opt/local/include, - ../../synlm/hhmm/wsjparse/include, - ../../synlm/hhmm/rvtl/include/, - ); - INSTALL_PATH = /usr/local/lib; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(SRCROOT)/../../moses/src/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/bin/darwin-4.2.1/release/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/bin/gcc-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/LM/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/LM/bin/darwin-4.2.1/release/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/LM/bin/gcc-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/Scope3Parser/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/fuzzy-match/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/fuzzy-match/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/Incremental/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/LM/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/RuleTable/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/RuleTable/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - "\"$(SRCROOT)/../../moses/src/Scope3Parser/bin/clang-darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi\"", - ); - PRODUCT_NAME = moses; - SDKROOT = ""; - USER_HEADER_SEARCH_PATHS = "../.. ../../moses/src ../../irstlm/include ../../srilm/include ../../kenlm ../../randlm/include /opt/local/include ../../synlm/hhmm/wsjparse/include ../../synlm/hhmm/rvtl/include/ ../.. ../../cmph/include"; - }; - name = Release; - }; - 1DEB91F008733DB70010E9CD /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - TRACE_ENABLE, - LM_SRI, - LM_IRST, - LM_INTERNAL, - LM_KEN, - LM_IRST, - LM_RAND, - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - ../irstlm/include, - ../srilm/include, - ../kenlm, - ../randlm/include, - /opt/local/include, - ); - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - 1DEB91F108733DB70010E9CD /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ARCHS = "$(ARCHS_STANDARD_32_64_BIT)"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PREPROCESSOR_DEFINITIONS = ( - TRACE_ENABLE, - LM_SRI, - LM_IRST, - LM_INTERNAL, - LM_KEN, - LM_IRST, - LM_RAND, - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - ../irstlm/include, - ../srilm/include, - ../kenlm, - ../randlm/include, - /opt/local/include, - ); - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1DEB91EB08733DB70010E9CD /* Build configuration list for PBXNativeTarget "moses" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB91EC08733DB70010E9CD /* Debug */, - 1DEB91ED08733DB70010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1DEB91EF08733DB70010E9CD /* Build configuration list for PBXProject "moses" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1DEB91F008733DB70010E9CD /* Debug */, - 1DEB91F108733DB70010E9CD /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 08FB7793FE84155DC02AAC07 /* Project object */; -} diff --git a/contrib/other-builds/moses/.cproject b/contrib/other-builds/moses/.cproject index a0d7c3d943..5080c02ad0 100644 --- a/contrib/other-builds/moses/.cproject +++ b/contrib/other-builds/moses/.cproject @@ -1,8 +1,8 @@ - - + + @@ -11,8 +11,7 @@ - - + @@ -20,67 +19,74 @@ - - - - - - - - - - + + - - + @@ -89,31 +95,31 @@ - - - - - - - - - + - - - - - - - - + + - - + + - - + + - - - - - - - - + + + @@ -161,5 +156,5 @@ - + diff --git a/contrib/other-builds/moses/.project b/contrib/other-builds/moses/.project index 6081d2d3f3..f3c39b41f1 100644 --- a/contrib/other-builds/moses/.project +++ b/contrib/other-builds/moses/.project @@ -9,62 +9,6 @@ org.eclipse.cdt.managedbuilder.core.genmakebuilder clean,full,incremental, - - ?name? - - - - org.eclipse.cdt.make.core.append_environment - true - - - org.eclipse.cdt.make.core.autoBuildTarget - all - - - org.eclipse.cdt.make.core.buildArguments - -j3 - - - org.eclipse.cdt.make.core.buildCommand - make - - - org.eclipse.cdt.make.core.buildLocation - ${workspace_loc:/moses/Debug} - - - org.eclipse.cdt.make.core.cleanBuildTarget - clean - - - org.eclipse.cdt.make.core.contents - org.eclipse.cdt.make.core.activeConfigSettings - - - org.eclipse.cdt.make.core.enableAutoBuild - false - - - org.eclipse.cdt.make.core.enableCleanBuild - true - - - org.eclipse.cdt.make.core.enableFullBuild - true - - - org.eclipse.cdt.make.core.fullBuildTarget - all - - - org.eclipse.cdt.make.core.stopOnError - true - - - org.eclipse.cdt.make.core.useDefaultBuildCmd - true - @@ -106,6 +50,26 @@ 1 PARENT-3-PROJECT_LOC/moses/AlignmentInfoTest.cpp + + BaseManager.cpp + 1 + PARENT-3-PROJECT_LOC/moses/BaseManager.cpp + + + BaseManager.h + 1 + PARENT-3-PROJECT_LOC/moses/BaseManager.h + + + Bitmap.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Bitmap.cpp + + + Bitmap.h + 1 + PARENT-3-PROJECT_LOC/moses/Bitmap.h + BitmapContainer.cpp 1 @@ -116,6 +80,21 @@ 1 PARENT-3-PROJECT_LOC/moses/BitmapContainer.h + + Bitmaps.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Bitmaps.cpp + + + Bitmaps.h + 1 + PARENT-3-PROJECT_LOC/moses/Bitmaps.h + + + CMakeLists.txt + 1 + PARENT-3-PROJECT_LOC/moses/CMakeLists.txt + ChartCell.cpp 1 @@ -166,6 +145,16 @@ 1 PARENT-3-PROJECT_LOC/moses/ChartHypothesisCollection.h + + ChartKBestExtractor.cpp + 1 + PARENT-3-PROJECT_LOC/moses/ChartKBestExtractor.cpp + + + ChartKBestExtractor.h + 1 + PARENT-3-PROJECT_LOC/moses/ChartKBestExtractor.h + ChartManager.cpp 1 @@ -191,11 +180,26 @@ 1 PARENT-3-PROJECT_LOC/moses/ChartParserCallback.h + + ChartRuleLookupManager.cpp + 1 + PARENT-3-PROJECT_LOC/moses/ChartRuleLookupManager.cpp + ChartRuleLookupManager.h 1 PARENT-3-PROJECT_LOC/moses/ChartRuleLookupManager.h + + ChartTranslationOption.cpp + 1 + PARENT-3-PROJECT_LOC/moses/ChartTranslationOption.cpp + + + ChartTranslationOption.h + 1 + PARENT-3-PROJECT_LOC/moses/ChartTranslationOption.h + ChartTranslationOptionList.cpp 1 @@ -216,51 +220,6 @@ 1 PARENT-3-PROJECT_LOC/moses/ChartTranslationOptions.h - - ChartTrellisDetour.cpp - 1 - PARENT-3-PROJECT_LOC/moses/ChartTrellisDetour.cpp - - - ChartTrellisDetour.h - 1 - PARENT-3-PROJECT_LOC/moses/ChartTrellisDetour.h - - - ChartTrellisDetourQueue.cpp - 1 - PARENT-3-PROJECT_LOC/moses/ChartTrellisDetourQueue.cpp - - - ChartTrellisDetourQueue.h - 1 - PARENT-3-PROJECT_LOC/moses/ChartTrellisDetourQueue.h - - - ChartTrellisNode.cpp - 1 - PARENT-3-PROJECT_LOC/moses/ChartTrellisNode.cpp - - - ChartTrellisNode.h - 1 - PARENT-3-PROJECT_LOC/moses/ChartTrellisNode.h - - - ChartTrellisPath.cpp - 1 - PARENT-3-PROJECT_LOC/moses/ChartTrellisPath.cpp - - - ChartTrellisPath.h - 1 - PARENT-3-PROJECT_LOC/moses/ChartTrellisPath.h - - - ChartTrellisPathList.h - 1 - PARENT-3-PROJECT_LOC/moses/ChartTrellisPathList.h - ConfusionNet.cpp 1 @@ -272,14 +231,14 @@ PARENT-3-PROJECT_LOC/moses/ConfusionNet.h - DecodeFeature.cpp + ContextParameters.cpp 1 - PARENT-3-PROJECT_LOC/moses/DecodeFeature.cpp + PARENT-3-PROJECT_LOC/moses/parameters/ContextParameters.cpp - DecodeFeature.h + ContextParameters.h 1 - PARENT-3-PROJECT_LOC/moses/DecodeFeature.h + PARENT-3-PROJECT_LOC/moses/parameters/ContextParameters.h DecodeGraph.cpp @@ -321,6 +280,16 @@ 1 PARENT-3-PROJECT_LOC/moses/DecodeStepTranslation.h + + ExportInterface.cpp + 1 + PARENT-3-PROJECT_LOC/moses/ExportInterface.cpp + + + ExportInterface.h + 1 + PARENT-3-PROJECT_LOC/moses/ExportInterface.h + FF 2 @@ -396,6 +365,16 @@ 1 PARENT-3-PROJECT_LOC/moses/FloydWarshall.h + + ForestInput.cpp + 1 + PARENT-3-PROJECT_LOC/moses/ForestInput.cpp + + + ForestInput.h + 1 + PARENT-3-PROJECT_LOC/moses/ForestInput.h + GenerationDictionary.cpp 1 @@ -406,6 +385,16 @@ 1 PARENT-3-PROJECT_LOC/moses/GenerationDictionary.h + + HypergraphOutput.cpp + 1 + PARENT-3-PROJECT_LOC/moses/HypergraphOutput.cpp + + + HypergraphOutput.h + 1 + PARENT-3-PROJECT_LOC/moses/HypergraphOutput.h + HypoList.h 1 @@ -451,6 +440,16 @@ 1 PARENT-3-PROJECT_LOC/moses/HypothesisStackNormal.h + + IOWrapper.cpp + 1 + PARENT-3-PROJECT_LOC/moses/IOWrapper.cpp + + + IOWrapper.h + 1 + PARENT-3-PROJECT_LOC/moses/IOWrapper.h + Incremental.cpp 1 @@ -471,6 +470,16 @@ 1 PARENT-3-PROJECT_LOC/moses/InputFileStream.h + + InputPath.cpp + 1 + PARENT-3-PROJECT_LOC/moses/InputPath.cpp + + + InputPath.h + 1 + PARENT-3-PROJECT_LOC/moses/InputPath.h + InputType.cpp 1 @@ -502,34 +511,14 @@ PARENT-3-PROJECT_LOC/moses/LVoc.h - LexicalReordering.cpp - 1 - PARENT-3-PROJECT_LOC/moses/LexicalReordering.cpp - - - LexicalReordering.h + LatticeMBR.cpp 1 - PARENT-3-PROJECT_LOC/moses/LexicalReordering.h + PARENT-3-PROJECT_LOC/moses/LatticeMBR.cpp - LexicalReorderingState.cpp + LatticeMBR.h 1 - PARENT-3-PROJECT_LOC/moses/LexicalReorderingState.cpp - - - LexicalReorderingState.h - 1 - PARENT-3-PROJECT_LOC/moses/LexicalReorderingState.h - - - LexicalReorderingTable.cpp - 1 - PARENT-3-PROJECT_LOC/moses/LexicalReorderingTable.cpp - - - LexicalReorderingTable.h - 1 - PARENT-3-PROJECT_LOC/moses/LexicalReorderingTable.h + PARENT-3-PROJECT_LOC/moses/LatticeMBR.h Manager.cpp @@ -576,6 +565,16 @@ 1 PARENT-3-PROJECT_LOC/moses/OutputCollector.h + + OutputFileStream.cpp + 1 + PARENT-3-PROJECT_LOC/moses/OutputFileStream.cpp + + + OutputFileStream.h + 1 + PARENT-3-PROJECT_LOC/moses/OutputFileStream.h + PCNTools.cpp 1 @@ -586,11 +585,21 @@ 1 PARENT-3-PROJECT_LOC/moses/PCNTools.h + + PDTAimp.cpp + 1 + PARENT-3-PROJECT_LOC/moses/PDTAimp.cpp + PDTAimp.h 1 PARENT-3-PROJECT_LOC/moses/PDTAimp.h + + PP + 2 + virtual:/virtual + Parameter.cpp 1 @@ -621,6 +630,16 @@ 1 PARENT-3-PROJECT_LOC/moses/Phrase.h + + PhraseOrientation.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/PhraseOrientation.cpp + + + PhraseOrientation.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/PhraseOrientation.h + PrefixTree.h 1 @@ -637,24 +656,24 @@ PARENT-3-PROJECT_LOC/moses/PrefixTreeMap.h - ReorderingConstraint.cpp + Range.cpp 1 - PARENT-3-PROJECT_LOC/moses/ReorderingConstraint.cpp + PARENT-3-PROJECT_LOC/moses/Range.cpp - ReorderingConstraint.h + Range.h 1 - PARENT-3-PROJECT_LOC/moses/ReorderingConstraint.h + PARENT-3-PROJECT_LOC/moses/Range.h - ReorderingStack.cpp + ReorderingConstraint.cpp 1 - PARENT-3-PROJECT_LOC/moses/ReorderingStack.cpp + PARENT-3-PROJECT_LOC/moses/ReorderingConstraint.cpp - ReorderingStack.h + ReorderingConstraint.h 1 - PARENT-3-PROJECT_LOC/moses/ReorderingStack.h + PARENT-3-PROJECT_LOC/moses/ReorderingConstraint.h RuleCube.cpp @@ -731,16 +750,6 @@ 1 PARENT-3-PROJECT_LOC/moses/SearchNormal.h - - SearchNormalBatch.cpp - 1 - PARENT-3-PROJECT_LOC/moses/SearchNormalBatch.cpp - - - SearchNormalBatch.h - 1 - PARENT-3-PROJECT_LOC/moses/SearchNormalBatch.h - Sentence.cpp 1 @@ -806,6 +815,21 @@ 1 PARENT-3-PROJECT_LOC/moses/SyntacticLanguageModelState.h + + Syntax + 2 + virtual:/virtual + + + TabbedSentence.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TabbedSentence.cpp + + + TabbedSentence.h + 1 + PARENT-3-PROJECT_LOC/moses/TabbedSentence.h + TargetPhrase.cpp 1 @@ -851,6 +875,16 @@ 1 PARENT-3-PROJECT_LOC/moses/Timer.h + + TranslationAnalysis.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationAnalysis.cpp + + + TranslationAnalysis.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationAnalysis.h + TranslationModel 2 @@ -886,6 +920,16 @@ 1 PARENT-3-PROJECT_LOC/moses/TranslationOptionCollectionConfusionNet.h + + TranslationOptionCollectionLattice.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationOptionCollectionLattice.cpp + + + TranslationOptionCollectionLattice.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationOptionCollectionLattice.h + TranslationOptionCollectionText.cpp 1 @@ -906,6 +950,16 @@ 1 PARENT-3-PROJECT_LOC/moses/TranslationOptionList.h + + TranslationTask.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationTask.cpp + + + TranslationTask.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationTask.h + TreeInput.cpp 1 @@ -951,16 +1005,6 @@ 1 PARENT-3-PROJECT_LOC/moses/UniqueObject.h - - UserMessage.cpp - 1 - PARENT-3-PROJECT_LOC/moses/UserMessage.cpp - - - UserMessage.h - 1 - PARENT-3-PROJECT_LOC/moses/UserMessage.h - Util.cpp 1 @@ -991,26 +1035,6 @@ 1 PARENT-3-PROJECT_LOC/moses/WordLattice.h - - WordsBitmap.cpp - 1 - PARENT-3-PROJECT_LOC/moses/WordsBitmap.cpp - - - WordsBitmap.h - 1 - PARENT-3-PROJECT_LOC/moses/WordsBitmap.h - - - WordsRange.cpp - 1 - PARENT-3-PROJECT_LOC/moses/WordsRange.cpp - - - WordsRange.h - 1 - PARENT-3-PROJECT_LOC/moses/WordsRange.h - XmlOption.cpp 1 @@ -1036,11 +1060,31 @@ 1 PARENT-3-PROJECT_LOC/moses/hypergraph.proto + + mbr.cpp + 1 + PARENT-3-PROJECT_LOC/moses/mbr.cpp + + + mbr.h + 1 + PARENT-3-PROJECT_LOC/moses/mbr.h + + + parameters + 2 + virtual:/virtual + rule.proto 1 PARENT-3-PROJECT_LOC/moses/rule.proto + + server + 2 + virtual:/virtual + FF/BleuScoreFeature.cpp 1 @@ -1052,145 +1096,420 @@ PARENT-3-PROJECT_LOC/moses/FF/BleuScoreFeature.h - FF/ChartBasedFeatureContext.cpp + FF/ConstrainedDecoding.cpp 1 - PARENT-3-PROJECT_LOC/moses/FF/ChartBasedFeatureContext.cpp + PARENT-3-PROJECT_LOC/moses/FF/ConstrainedDecoding.cpp - FF/ChartBasedFeatureContext.h + FF/ConstrainedDecoding.h 1 - PARENT-3-PROJECT_LOC/moses/FF/ChartBasedFeatureContext.h + PARENT-3-PROJECT_LOC/moses/FF/ConstrainedDecoding.h - FF/DistortionScoreProducer.cpp + FF/ControlRecombination.cpp 1 - PARENT-3-PROJECT_LOC/moses/FF/DistortionScoreProducer.cpp + PARENT-3-PROJECT_LOC/moses/FF/ControlRecombination.cpp - FF/DistortionScoreProducer.h + FF/ControlRecombination.h 1 - PARENT-3-PROJECT_LOC/moses/FF/DistortionScoreProducer.h + PARENT-3-PROJECT_LOC/moses/FF/ControlRecombination.h - FF/FFState.cpp + FF/CorrectionPattern.cpp 1 - PARENT-3-PROJECT_LOC/moses/FF/FFState.cpp + PARENT-3-PROJECT_LOC/moses/FF/CorrectionPattern.cpp - FF/FFState.h + FF/CorrectionPattern.h 1 - PARENT-3-PROJECT_LOC/moses/FF/FFState.h + PARENT-3-PROJECT_LOC/moses/FF/CorrectionPattern.h - FF/FeatureFunction.cpp + FF/CountNonTerms.cpp 1 - PARENT-3-PROJECT_LOC/moses/FF/FeatureFunction.cpp + PARENT-3-PROJECT_LOC/moses/FF/CountNonTerms.cpp - FF/FeatureFunction.h + FF/CountNonTerms.h 1 - PARENT-3-PROJECT_LOC/moses/FF/FeatureFunction.h + PARENT-3-PROJECT_LOC/moses/FF/CountNonTerms.h - FF/GlobalLexicalModel.cpp + FF/CoveredReferenceFeature.cpp 1 - PARENT-3-PROJECT_LOC/moses/FF/GlobalLexicalModel.cpp + PARENT-3-PROJECT_LOC/moses/FF/CoveredReferenceFeature.cpp - FF/GlobalLexicalModel.h + FF/CoveredReferenceFeature.h 1 - PARENT-3-PROJECT_LOC/moses/FF/GlobalLexicalModel.h + PARENT-3-PROJECT_LOC/moses/FF/CoveredReferenceFeature.h - FF/GlobalLexicalModelUnlimited.cpp + FF/DecodeFeature.cpp 1 - PARENT-3-PROJECT_LOC/moses/FF/GlobalLexicalModelUnlimited.cpp + PARENT-3-PROJECT_LOC/moses/FF/DecodeFeature.cpp - FF/GlobalLexicalModelUnlimited.h + FF/DecodeFeature.h 1 - PARENT-3-PROJECT_LOC/moses/FF/GlobalLexicalModelUnlimited.h + PARENT-3-PROJECT_LOC/moses/FF/DecodeFeature.h - FF/InputFeature.cpp + FF/DeleteRules.cpp 1 - PARENT-3-PROJECT_LOC/moses/FF/InputFeature.cpp + PARENT-3-PROJECT_LOC/moses/FF/DeleteRules.cpp - FF/InputFeature.h + FF/DeleteRules.h 1 - PARENT-3-PROJECT_LOC/moses/FF/InputFeature.h + PARENT-3-PROJECT_LOC/moses/FF/DeleteRules.h - FF/OSM-Feature + FF/DistortionScoreProducer.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/DistortionScoreProducer.cpp + + + FF/DistortionScoreProducer.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/DistortionScoreProducer.h + + + FF/Dsg-Feature 2 virtual:/virtual - FF/PhraseBasedFeatureContext.cpp + FF/DynamicCacheBasedLanguageModel.cpp 1 - PARENT-3-PROJECT_LOC/moses/FF/PhraseBasedFeatureContext.cpp + PARENT-3-PROJECT_LOC/moses/FF/DynamicCacheBasedLanguageModel.cpp - FF/PhraseBasedFeatureContext.h + FF/DynamicCacheBasedLanguageModel.h 1 - PARENT-3-PROJECT_LOC/moses/FF/PhraseBasedFeatureContext.h + PARENT-3-PROJECT_LOC/moses/FF/DynamicCacheBasedLanguageModel.h - FF/PhraseBoundaryFeature.cpp + FF/EditOps.cpp 1 - PARENT-3-PROJECT_LOC/moses/FF/PhraseBoundaryFeature.cpp + PARENT-3-PROJECT_LOC/moses/FF/EditOps.cpp - FF/PhraseBoundaryFeature.h + FF/EditOps.h 1 - PARENT-3-PROJECT_LOC/moses/FF/PhraseBoundaryFeature.h + PARENT-3-PROJECT_LOC/moses/FF/EditOps.h - FF/PhraseLengthFeature.cpp + FF/ExampleStatefulFF.cpp 1 - PARENT-3-PROJECT_LOC/moses/FF/PhraseLengthFeature.cpp + PARENT-3-PROJECT_LOC/moses/FF/ExampleStatefulFF.cpp - FF/PhraseLengthFeature.h + FF/ExampleStatefulFF.h 1 - PARENT-3-PROJECT_LOC/moses/FF/PhraseLengthFeature.h + PARENT-3-PROJECT_LOC/moses/FF/ExampleStatefulFF.h - FF/PhraseLengthFeatureTest.cpp + FF/ExampleStatelessFF.cpp 1 - PARENT-3-PROJECT_LOC/moses/FF/PhraseLengthFeatureTest.cpp + PARENT-3-PROJECT_LOC/moses/FF/ExampleStatelessFF.cpp - FF/PhrasePairFeature.cpp + FF/ExampleStatelessFF.h 1 - PARENT-3-PROJECT_LOC/moses/FF/PhrasePairFeature.cpp + PARENT-3-PROJECT_LOC/moses/FF/ExampleStatelessFF.h - FF/PhrasePairFeature.h + FF/ExampleTranslationOptionListFeature.h 1 - PARENT-3-PROJECT_LOC/moses/FF/PhrasePairFeature.h + PARENT-3-PROJECT_LOC/moses/FF/ExampleTranslationOptionListFeature.h - FF/PhrasePenalty.cpp + FF/FFState.cpp 1 - PARENT-3-PROJECT_LOC/moses/FF/PhrasePenalty.cpp + PARENT-3-PROJECT_LOC/moses/FF/FFState.cpp - FF/PhrasePenalty.h + FF/FFState.h 1 - PARENT-3-PROJECT_LOC/moses/FF/PhrasePenalty.h + PARENT-3-PROJECT_LOC/moses/FF/FFState.h - FF/SourceWordDeletionFeature.cpp + FF/Factory.cpp 1 - PARENT-3-PROJECT_LOC/moses/FF/SourceWordDeletionFeature.cpp + PARENT-3-PROJECT_LOC/moses/FF/Factory.cpp - FF/SourceWordDeletionFeature.h + FF/Factory.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/Factory.h + + + FF/FeatureFunction.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/FeatureFunction.cpp + + + FF/FeatureFunction.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/FeatureFunction.h + + + FF/GlobalLexicalModel.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/GlobalLexicalModel.cpp + + + FF/GlobalLexicalModel.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/GlobalLexicalModel.h + + + FF/GlobalLexicalModelUnlimited.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/GlobalLexicalModelUnlimited.cpp + + + FF/GlobalLexicalModelUnlimited.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/GlobalLexicalModelUnlimited.h + + + FF/HyperParameterAsWeight.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/HyperParameterAsWeight.cpp + + + FF/HyperParameterAsWeight.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/HyperParameterAsWeight.h + + + FF/InputFeature.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/InputFeature.cpp + + + FF/InputFeature.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/InputFeature.h + + + FF/InternalTree.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/InternalTree.cpp + + + FF/InternalTree.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/InternalTree.h + + + FF/LexicalReordering + 2 + virtual:/virtual + + + FF/MaxSpanFreeNonTermSource.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/MaxSpanFreeNonTermSource.cpp + + + FF/MaxSpanFreeNonTermSource.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/MaxSpanFreeNonTermSource.h + + + FF/Model1Feature.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/Model1Feature.cpp + + + FF/Model1Feature.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/Model1Feature.h + + + FF/NieceTerminal.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/NieceTerminal.cpp + + + FF/NieceTerminal.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/NieceTerminal.h + + + FF/OSM-Feature + 2 + virtual:/virtual + + + FF/PhraseBoundaryFeature.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/PhraseBoundaryFeature.cpp + + + FF/PhraseBoundaryFeature.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/PhraseBoundaryFeature.h + + + FF/PhraseDistanceFeature.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/PhraseDistanceFeature.cpp + + + FF/PhraseDistanceFeature.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/PhraseDistanceFeature.h + + + FF/PhraseLengthFeature.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/PhraseLengthFeature.cpp + + + FF/PhraseLengthFeature.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/PhraseLengthFeature.h + + + FF/PhraseOrientationFeature.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/PhraseOrientationFeature.cpp + + + FF/PhraseOrientationFeature.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/PhraseOrientationFeature.h + + + FF/PhrasePairFeature.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/PhrasePairFeature.cpp + + + FF/PhrasePairFeature.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/PhrasePairFeature.h + + + FF/PhrasePenalty.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/PhrasePenalty.cpp + + + FF/PhrasePenalty.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/PhrasePenalty.h + + + FF/ReferenceComparison.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/ReferenceComparison.cpp + + + FF/ReferenceComparison.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/ReferenceComparison.h + + + FF/RulePairUnlexicalizedSource.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/RulePairUnlexicalizedSource.cpp + + + FF/RulePairUnlexicalizedSource.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/RulePairUnlexicalizedSource.h + + + FF/RuleScope.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/RuleScope.cpp + + + FF/RuleScope.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/RuleScope.h + + + FF/SetSourcePhrase.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/SetSourcePhrase.cpp + + + FF/SetSourcePhrase.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/SetSourcePhrase.h + + + FF/SoftMatchingFeature.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/SoftMatchingFeature.cpp + + + FF/SoftMatchingFeature.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/SoftMatchingFeature.h + + + FF/SoftSourceSyntacticConstraintsFeature.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/SoftSourceSyntacticConstraintsFeature.cpp + + + FF/SoftSourceSyntacticConstraintsFeature.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/SoftSourceSyntacticConstraintsFeature.h + + + FF/SourceGHKMTreeInputMatchFeature.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/SourceGHKMTreeInputMatchFeature.cpp + + + FF/SourceGHKMTreeInputMatchFeature.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/SourceGHKMTreeInputMatchFeature.h + + + FF/SourceWordDeletionFeature.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/SourceWordDeletionFeature.cpp + + + FF/SourceWordDeletionFeature.h 1 PARENT-3-PROJECT_LOC/moses/FF/SourceWordDeletionFeature.h + + FF/SpanLength.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/SpanLength.cpp + + + FF/SpanLength.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/SpanLength.h + + + FF/SparseHieroReorderingFeature.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/SparseHieroReorderingFeature.cpp + + + FF/SparseHieroReorderingFeature.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/SparseHieroReorderingFeature.h + + + FF/SparseHieroReorderingFeatureTest.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/SparseHieroReorderingFeatureTest.cpp + FF/StatefulFeatureFunction.cpp 1 @@ -1211,6 +1530,16 @@ 1 PARENT-3-PROJECT_LOC/moses/FF/StatelessFeatureFunction.h + + FF/SyntaxRHS.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/SyntaxRHS.cpp + + + FF/SyntaxRHS.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/SyntaxRHS.h + FF/TargetBigramFeature.cpp 1 @@ -1221,6 +1550,16 @@ 1 PARENT-3-PROJECT_LOC/moses/FF/TargetBigramFeature.h + + FF/TargetConstituentAdjacencyFeature.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/TargetConstituentAdjacencyFeature.cpp + + + FF/TargetConstituentAdjacencyFeature.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/TargetConstituentAdjacencyFeature.h + FF/TargetNgramFeature.cpp 1 @@ -1231,6 +1570,16 @@ 1 PARENT-3-PROJECT_LOC/moses/FF/TargetNgramFeature.h + + FF/TargetPreferencesFeature.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/TargetPreferencesFeature.cpp + + + FF/TargetPreferencesFeature.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/TargetPreferencesFeature.h + FF/TargetWordInsertionFeature.cpp 1 @@ -1241,6 +1590,26 @@ 1 PARENT-3-PROJECT_LOC/moses/FF/TargetWordInsertionFeature.h + + FF/TreeStructureFeature.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/TreeStructureFeature.cpp + + + FF/TreeStructureFeature.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/TreeStructureFeature.h + + + FF/UnalignedWordCountFeature.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/UnalignedWordCountFeature.cpp + + + FF/UnalignedWordCountFeature.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/UnalignedWordCountFeature.h + FF/UnknownWordPenaltyProducer.cpp 1 @@ -1282,1904 +1651,4819 @@ PARENT-3-PROJECT_LOC/moses/LM/Backward.h - LM/BackwardLMState.cpp + LM/BackwardLMState.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/BackwardLMState.cpp + + + LM/BackwardLMState.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/BackwardLMState.h + + + LM/BackwardTest.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/BackwardTest.cpp + + + LM/Base.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/Base.cpp + + + LM/Base.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/Base.h + + + LM/BilingualLM.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/BilingualLM.cpp + + + LM/BilingualLM.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/BilingualLM.h + + + LM/ChartState.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/ChartState.h + + + LM/DALMWrapper.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/DALMWrapper.cpp + + + LM/DALMWrapper.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/DALMWrapper.h + + + LM/ExampleLM.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/ExampleLM.cpp + + + LM/ExampleLM.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/ExampleLM.h + + + LM/IRST.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/IRST.cpp + + + LM/IRST.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/IRST.h + + + LM/Implementation.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/Implementation.cpp + + + LM/Implementation.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/Implementation.h + + + LM/InMemoryPerSentenceOnDemandLM.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/InMemoryPerSentenceOnDemandLM.cpp + + + LM/InMemoryPerSentenceOnDemandLM.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/InMemoryPerSentenceOnDemandLM.h + + + LM/Jamfile + 1 + PARENT-3-PROJECT_LOC/moses/LM/Jamfile + + + LM/Ken.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/Ken.cpp + + + LM/Ken.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/Ken.h + + + LM/LDHT.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/LDHT.cpp + + + LM/LDHT.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/LDHT.h + + + LM/MaxEntSRI.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/MaxEntSRI.cpp + + + LM/MaxEntSRI.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/MaxEntSRI.h + + + LM/MultiFactor.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/MultiFactor.cpp + + + LM/MultiFactor.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/MultiFactor.h + + + LM/NeuralLMWrapper.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/NeuralLMWrapper.cpp + + + LM/NeuralLMWrapper.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/NeuralLMWrapper.h + + + LM/ORLM.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/ORLM.cpp + + + LM/ORLM.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/ORLM.h + + + LM/ParallelBackoff.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/ParallelBackoff.cpp + + + LM/ParallelBackoff.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/ParallelBackoff.h + + + LM/PointerState.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/PointerState.h + + + LM/Rand.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/Rand.cpp + + + LM/Rand.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/Rand.h + + + LM/Remote.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/Remote.cpp + + + LM/Remote.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/Remote.h + + + LM/SRI.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/SRI.cpp + + + LM/SRI.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/SRI.h + + + LM/SingleFactor.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/SingleFactor.cpp + + + LM/SingleFactor.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/SingleFactor.h + + + LM/backward.arpa + 1 + PARENT-3-PROJECT_LOC/moses/LM/backward.arpa + + + LM/bilingual-lm + 2 + virtual:/virtual + + + LM/bin + 2 + virtual:/virtual + + + LM/oxlm + 2 + virtual:/virtual + + + PP/CountsPhraseProperty.cpp + 1 + PARENT-3-PROJECT_LOC/moses/PP/CountsPhraseProperty.cpp + + + PP/CountsPhraseProperty.h + 1 + PARENT-3-PROJECT_LOC/moses/PP/CountsPhraseProperty.h + + + PP/Factory.cpp + 1 + PARENT-3-PROJECT_LOC/moses/PP/Factory.cpp + + + PP/Factory.h + 1 + PARENT-3-PROJECT_LOC/moses/PP/Factory.h + + + PP/NonTermContextProperty.cpp + 1 + PARENT-3-PROJECT_LOC/moses/PP/NonTermContextProperty.cpp + + + PP/NonTermContextProperty.h + 1 + PARENT-3-PROJECT_LOC/moses/PP/NonTermContextProperty.h + + + PP/OrientationPhraseProperty.cpp + 1 + PARENT-3-PROJECT_LOC/moses/PP/OrientationPhraseProperty.cpp + + + PP/OrientationPhraseProperty.h + 1 + PARENT-3-PROJECT_LOC/moses/PP/OrientationPhraseProperty.h + + + PP/PhraseProperty.cpp + 1 + PARENT-3-PROJECT_LOC/moses/PP/PhraseProperty.cpp + + + PP/PhraseProperty.h + 1 + PARENT-3-PROJECT_LOC/moses/PP/PhraseProperty.h + + + PP/SourceLabelsPhraseProperty.cpp + 1 + PARENT-3-PROJECT_LOC/moses/PP/SourceLabelsPhraseProperty.cpp + + + PP/SourceLabelsPhraseProperty.h + 1 + PARENT-3-PROJECT_LOC/moses/PP/SourceLabelsPhraseProperty.h + + + PP/SpanLengthPhraseProperty.cpp + 1 + PARENT-3-PROJECT_LOC/moses/PP/SpanLengthPhraseProperty.cpp + + + PP/SpanLengthPhraseProperty.h + 1 + PARENT-3-PROJECT_LOC/moses/PP/SpanLengthPhraseProperty.h + + + PP/TargetConstituentBoundariesLeftPhraseProperty.cpp + 1 + PARENT-3-PROJECT_LOC/moses/PP/TargetConstituentBoundariesLeftPhraseProperty.cpp + + + PP/TargetConstituentBoundariesLeftPhraseProperty.h + 1 + PARENT-3-PROJECT_LOC/moses/PP/TargetConstituentBoundariesLeftPhraseProperty.h + + + PP/TargetConstituentBoundariesRightAdjacentPhraseProperty.cpp + 1 + PARENT-3-PROJECT_LOC/moses/PP/TargetConstituentBoundariesRightAdjacentPhraseProperty.cpp + + + PP/TargetConstituentBoundariesRightAdjacentPhraseProperty.h + 1 + PARENT-3-PROJECT_LOC/moses/PP/TargetConstituentBoundariesRightAdjacentPhraseProperty.h + + + PP/TargetPreferencesPhraseProperty.cpp + 1 + PARENT-3-PROJECT_LOC/moses/PP/TargetPreferencesPhraseProperty.cpp + + + PP/TargetPreferencesPhraseProperty.h + 1 + PARENT-3-PROJECT_LOC/moses/PP/TargetPreferencesPhraseProperty.h + + + PP/TreeStructurePhraseProperty.h + 1 + PARENT-3-PROJECT_LOC/moses/PP/TreeStructurePhraseProperty.h + + + Syntax/BoundedPriorityContainer.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/BoundedPriorityContainer.h + + + Syntax/Cube.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/Cube.cpp + + + Syntax/Cube.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/Cube.h + + + Syntax/CubeQueue.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/CubeQueue.cpp + + + Syntax/CubeQueue.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/CubeQueue.h + + + Syntax/F2S + 2 + virtual:/virtual + + + Syntax/InputWeightFF.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/InputWeightFF.cpp + + + Syntax/InputWeightFF.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/InputWeightFF.h + + + Syntax/KBestExtractor.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/KBestExtractor.cpp + + + Syntax/KBestExtractor.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/KBestExtractor.h + + + Syntax/Manager.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/Manager.cpp + + + Syntax/Manager.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/Manager.h + + + Syntax/NonTerminalMap.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/NonTerminalMap.h + + + Syntax/PHyperedge.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/PHyperedge.h + + + Syntax/PVertex.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/PVertex.h + + + Syntax/RuleTable.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/RuleTable.h + + + Syntax/RuleTableFF.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/RuleTableFF.cpp + + + Syntax/RuleTableFF.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/RuleTableFF.h + + + Syntax/S2T + 2 + virtual:/virtual + + + Syntax/SHyperedge.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/SHyperedge.cpp + + + Syntax/SHyperedge.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/SHyperedge.h + + + Syntax/SHyperedgeBundle.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/SHyperedgeBundle.h + + + Syntax/SHyperedgeBundleScorer.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/SHyperedgeBundleScorer.h + + + Syntax/SVertex.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/SVertex.cpp + + + Syntax/SVertex.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/SVertex.h + + + Syntax/SVertexRecombinationOrderer.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/SVertexRecombinationOrderer.h + + + Syntax/SVertexStack.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/SVertexStack.h + + + Syntax/SymbolEqualityPred.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/SymbolEqualityPred.h + + + Syntax/SymbolHasher.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/SymbolHasher.h + + + Syntax/T2S + 2 + virtual:/virtual + + + TranslationModel/CYKPlusParser + 2 + virtual:/virtual + + + TranslationModel/CompactPT + 2 + virtual:/virtual + + + TranslationModel/ExamplePT.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/ExamplePT.cpp + + + TranslationModel/ExamplePT.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/ExamplePT.h + + + TranslationModel/PhraseDictionary.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionary.cpp + + + TranslationModel/PhraseDictionary.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionary.h + + + TranslationModel/PhraseDictionaryCache.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryCache.cpp + + + TranslationModel/PhraseDictionaryCache.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryCache.h + + + TranslationModel/PhraseDictionaryDynamicCacheBased.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryDynamicCacheBased.cpp + + + TranslationModel/PhraseDictionaryDynamicCacheBased.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryDynamicCacheBased.h + + + TranslationModel/PhraseDictionaryGroup.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryGroup.cpp + + + TranslationModel/PhraseDictionaryGroup.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryGroup.h + + + TranslationModel/PhraseDictionaryMemory.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryMemory.cpp + + + TranslationModel/PhraseDictionaryMemory.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryMemory.h + + + TranslationModel/PhraseDictionaryMemoryPerSentence.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryMemoryPerSentence.cpp + + + TranslationModel/PhraseDictionaryMemoryPerSentence.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryMemoryPerSentence.h + + + TranslationModel/PhraseDictionaryMemoryPerSentenceOnDemand.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryMemoryPerSentenceOnDemand.cpp + + + TranslationModel/PhraseDictionaryMemoryPerSentenceOnDemand.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryMemoryPerSentenceOnDemand.h + + + TranslationModel/PhraseDictionaryMultiModel.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryMultiModel.cpp + + + TranslationModel/PhraseDictionaryMultiModel.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryMultiModel.h + + + TranslationModel/PhraseDictionaryMultiModelCounts.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryMultiModelCounts.cpp + + + TranslationModel/PhraseDictionaryMultiModelCounts.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryMultiModelCounts.h + + + TranslationModel/PhraseDictionaryNodeMemory.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryNodeMemory.cpp + + + TranslationModel/PhraseDictionaryNodeMemory.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryNodeMemory.h + + + TranslationModel/PhraseDictionaryScope3.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryScope3.cpp + + + TranslationModel/PhraseDictionaryScope3.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryScope3.h + + + TranslationModel/PhraseDictionaryTransliteration.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryTransliteration.cpp + + + TranslationModel/PhraseDictionaryTransliteration.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryTransliteration.h + + + TranslationModel/PhraseDictionaryTree.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryTree.cpp + + + TranslationModel/PhraseDictionaryTree.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryTree.h + + + TranslationModel/PhraseDictionaryTreeAdaptor.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryTreeAdaptor.cpp + + + TranslationModel/PhraseDictionaryTreeAdaptor.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryTreeAdaptor.h + + + TranslationModel/ProbingPT.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/ProbingPT.cpp + + + TranslationModel/ProbingPT.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/ProbingPT.h + + + TranslationModel/RuleTable + 2 + virtual:/virtual + + + TranslationModel/Scope3Parser + 2 + virtual:/virtual + + + TranslationModel/UG + 2 + virtual:/virtual + + + TranslationModel/fuzzy-match + 2 + virtual:/virtual + + + bin/factor.log + 1 + PARENT-3-PROJECT_LOC/moses/bin/factor.log + + + bin/gcc-4.8 + 2 + virtual:/virtual + + + bin/lm.log + 1 + PARENT-3-PROJECT_LOC/moses/bin/lm.log + + + parameters/AllOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses/parameters/AllOptions.cpp + + + parameters/AllOptions.h + 1 + PARENT-3-PROJECT_LOC/moses/parameters/AllOptions.h + + + parameters/BeamSearchOptions.h + 1 + PARENT-3-PROJECT_LOC/moses/parameters/BeamSearchOptions.h + + + parameters/BookkeepingOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses/parameters/BookkeepingOptions.cpp + + + parameters/BookkeepingOptions.h + 1 + PARENT-3-PROJECT_LOC/moses/parameters/BookkeepingOptions.h + + + parameters/ContextParameters.cpp + 1 + PARENT-3-PROJECT_LOC/moses/parameters/ContextParameters.cpp + + + parameters/ContextParameters.h + 1 + PARENT-3-PROJECT_LOC/moses/parameters/ContextParameters.h + + + parameters/CubePruningOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses/parameters/CubePruningOptions.cpp + + + parameters/CubePruningOptions.h + 1 + PARENT-3-PROJECT_LOC/moses/parameters/CubePruningOptions.h + + + parameters/InputOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses/parameters/InputOptions.cpp + + + parameters/InputOptions.h + 1 + PARENT-3-PROJECT_LOC/moses/parameters/InputOptions.h + + + parameters/LMBR_Options.cpp + 1 + PARENT-3-PROJECT_LOC/moses/parameters/LMBR_Options.cpp + + + parameters/LMBR_Options.h + 1 + PARENT-3-PROJECT_LOC/moses/parameters/LMBR_Options.h + + + parameters/LookupOptions.h + 1 + PARENT-3-PROJECT_LOC/moses/parameters/LookupOptions.h + + + parameters/MBR_Options.cpp + 1 + PARENT-3-PROJECT_LOC/moses/parameters/MBR_Options.cpp + + + parameters/MBR_Options.h + 1 + PARENT-3-PROJECT_LOC/moses/parameters/MBR_Options.h + + + parameters/NBestOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses/parameters/NBestOptions.cpp + + + parameters/NBestOptions.h + 1 + PARENT-3-PROJECT_LOC/moses/parameters/NBestOptions.h + + + parameters/OOVHandlingOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses/parameters/OOVHandlingOptions.cpp + + + parameters/OOVHandlingOptions.h + 1 + PARENT-3-PROJECT_LOC/moses/parameters/OOVHandlingOptions.h + + + parameters/OptionsBaseClass.cpp + 1 + PARENT-3-PROJECT_LOC/moses/parameters/OptionsBaseClass.cpp + + + parameters/OptionsBaseClass.h + 1 + PARENT-3-PROJECT_LOC/moses/parameters/OptionsBaseClass.h + + + parameters/ReorderingOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses/parameters/ReorderingOptions.cpp + + + parameters/ReorderingOptions.h + 1 + PARENT-3-PROJECT_LOC/moses/parameters/ReorderingOptions.h + + + parameters/ReportingOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses/parameters/ReportingOptions.cpp + + + parameters/ReportingOptions.h + 1 + PARENT-3-PROJECT_LOC/moses/parameters/ReportingOptions.h + + + parameters/SearchOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses/parameters/SearchOptions.cpp + + + parameters/SearchOptions.h + 1 + PARENT-3-PROJECT_LOC/moses/parameters/SearchOptions.h + + + parameters/ServerOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses/parameters/ServerOptions.cpp + + + parameters/ServerOptions.h + 1 + PARENT-3-PROJECT_LOC/moses/parameters/ServerOptions.h + + + parameters/SyntaxOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses/parameters/SyntaxOptions.cpp + + + parameters/SyntaxOptions.h + 1 + PARENT-3-PROJECT_LOC/moses/parameters/SyntaxOptions.h + + + server/CloseSession.cpp + 1 + PARENT-3-PROJECT_LOC/moses/server/CloseSession.cpp + + + server/CloseSession.h + 1 + PARENT-3-PROJECT_LOC/moses/server/CloseSession.h + + + server/Hypothesis_4server.cpp + 1 + PARENT-3-PROJECT_LOC/moses/server/Hypothesis_4server.cpp + + + server/Optimizer.cpp + 1 + PARENT-3-PROJECT_LOC/moses/server/Optimizer.cpp + + + server/Optimizer.h + 1 + PARENT-3-PROJECT_LOC/moses/server/Optimizer.h + + + server/PackScores.cpp + 1 + PARENT-3-PROJECT_LOC/moses/server/PackScores.cpp + + + server/PackScores.h + 1 + PARENT-3-PROJECT_LOC/moses/server/PackScores.h + + + server/Server.cpp + 1 + PARENT-3-PROJECT_LOC/moses/server/Server.cpp + + + server/Server.h + 1 + PARENT-3-PROJECT_LOC/moses/server/Server.h + + + server/Session.h + 1 + PARENT-3-PROJECT_LOC/moses/server/Session.h + + + server/TranslationRequest.cpp + 1 + PARENT-3-PROJECT_LOC/moses/server/TranslationRequest.cpp + + + server/TranslationRequest.h + 1 + PARENT-3-PROJECT_LOC/moses/server/TranslationRequest.h + + + server/Translator.cpp + 1 + PARENT-3-PROJECT_LOC/moses/server/Translator.cpp + + + server/Translator.h + 1 + PARENT-3-PROJECT_LOC/moses/server/Translator.h + + + server/Updater.cpp + 1 + PARENT-3-PROJECT_LOC/moses/server/Updater.cpp + + + server/Updater.h + 1 + PARENT-3-PROJECT_LOC/moses/server/Updater.h + + + FF/Dsg-Feature/Desegmenter.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/Dsg-Feature/Desegmenter.cpp + + + FF/Dsg-Feature/Desegmenter.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/Dsg-Feature/Desegmenter.h + + + FF/Dsg-Feature/DsgModel.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/Dsg-Feature/DsgModel.cpp + + + FF/Dsg-Feature/DsgModel.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/Dsg-Feature/DsgModel.h + + + FF/Dsg-Feature/KenDsg.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/Dsg-Feature/KenDsg.cpp + + + FF/Dsg-Feature/KenDsg.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/Dsg-Feature/KenDsg.h + + + FF/Dsg-Feature/dsgHyp.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/Dsg-Feature/dsgHyp.cpp + + + FF/Dsg-Feature/dsgHyp.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/Dsg-Feature/dsgHyp.h + + + FF/LexicalReordering/BidirectionalReorderingState.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/BidirectionalReorderingState.cpp + + + FF/LexicalReordering/BidirectionalReorderingState.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/BidirectionalReorderingState.h + + + FF/LexicalReordering/HReorderingBackwardState.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/HReorderingBackwardState.cpp + + + FF/LexicalReordering/HReorderingBackwardState.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/HReorderingBackwardState.h + + + FF/LexicalReordering/HReorderingForwardState.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/HReorderingForwardState.cpp + + + FF/LexicalReordering/HReorderingForwardState.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/HReorderingForwardState.h + + + FF/LexicalReordering/LRModel.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/LRModel.cpp + + + FF/LexicalReordering/LRModel.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/LRModel.h + + + FF/LexicalReordering/LRState.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/LRState.cpp + + + FF/LexicalReordering/LRState.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/LRState.h + + + FF/LexicalReordering/LexicalReordering.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/LexicalReordering.cpp + + + FF/LexicalReordering/LexicalReordering.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/LexicalReordering.h + + + FF/LexicalReordering/LexicalReorderingTable.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/LexicalReorderingTable.cpp + + + FF/LexicalReordering/LexicalReorderingTable.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/LexicalReorderingTable.h + + + FF/LexicalReordering/PhraseBasedReorderingState.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/PhraseBasedReorderingState.cpp + + + FF/LexicalReordering/PhraseBasedReorderingState.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/PhraseBasedReorderingState.h + + + FF/LexicalReordering/ReorderingStack.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/ReorderingStack.cpp + + + FF/LexicalReordering/ReorderingStack.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/ReorderingStack.h + + + FF/LexicalReordering/SparseReordering.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/SparseReordering.cpp + + + FF/LexicalReordering/SparseReordering.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/LexicalReordering/SparseReordering.h + + + FF/OSM-Feature/KenOSM.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/OSM-Feature/KenOSM.cpp + + + FF/OSM-Feature/KenOSM.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/OSM-Feature/KenOSM.h + + + FF/OSM-Feature/OpSequenceModel.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/OSM-Feature/OpSequenceModel.cpp + + + FF/OSM-Feature/OpSequenceModel.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/OSM-Feature/OpSequenceModel.h + + + FF/OSM-Feature/osmHyp.cpp + 1 + PARENT-3-PROJECT_LOC/moses/FF/OSM-Feature/osmHyp.cpp + + + FF/OSM-Feature/osmHyp.h + 1 + PARENT-3-PROJECT_LOC/moses/FF/OSM-Feature/osmHyp.h + + + LM/bilingual-lm/BiLM_NPLM.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/bilingual-lm/BiLM_NPLM.cpp + + + LM/bilingual-lm/BiLM_NPLM.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/bilingual-lm/BiLM_NPLM.h + + + LM/bin/BackwardTest.test + 2 + virtual:/virtual + + + LM/bin/gcc-4.8 + 2 + virtual:/virtual + + + LM/oxlm/OxLM.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/oxlm/OxLM.cpp + + + LM/oxlm/OxLM.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/oxlm/OxLM.h + + + LM/oxlm/OxLMMapper.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/oxlm/OxLMMapper.cpp + + + LM/oxlm/OxLMMapper.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/oxlm/OxLMMapper.h + + + LM/oxlm/OxLMParallelMapper.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/oxlm/OxLMParallelMapper.cpp + + + LM/oxlm/OxLMParallelMapper.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/oxlm/OxLMParallelMapper.h + + + LM/oxlm/SourceOxLM.cpp + 1 + PARENT-3-PROJECT_LOC/moses/LM/oxlm/SourceOxLM.cpp + + + LM/oxlm/SourceOxLM.h + 1 + PARENT-3-PROJECT_LOC/moses/LM/oxlm/SourceOxLM.h + + + Syntax/F2S/DerivationWriter.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/DerivationWriter.cpp + + + Syntax/F2S/DerivationWriter.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/DerivationWriter.h + + + Syntax/F2S/Forest.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/Forest.cpp + + + Syntax/F2S/Forest.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/Forest.h + + + Syntax/F2S/GlueRuleSynthesizer.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/GlueRuleSynthesizer.cpp + + + Syntax/F2S/GlueRuleSynthesizer.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/GlueRuleSynthesizer.h + + + Syntax/F2S/HyperPath.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/HyperPath.cpp + + + Syntax/F2S/HyperPath.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/HyperPath.h + + + Syntax/F2S/HyperPathLoader.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/HyperPathLoader.cpp + + + Syntax/F2S/HyperPathLoader.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/HyperPathLoader.h + + + Syntax/F2S/HyperTree.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/HyperTree.cpp + + + Syntax/F2S/HyperTree.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/HyperTree.h + + + Syntax/F2S/HyperTreeCreator.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/HyperTreeCreator.h + + + Syntax/F2S/HyperTreeLoader.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/HyperTreeLoader.cpp + + + Syntax/F2S/HyperTreeLoader.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/HyperTreeLoader.h + + + Syntax/F2S/Manager-inl.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/Manager-inl.h + + + Syntax/F2S/Manager.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/Manager.h + + + Syntax/F2S/PHyperedgeToSHyperedgeBundle.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/PHyperedgeToSHyperedgeBundle.h + + + Syntax/F2S/PVertexToStackMap.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/PVertexToStackMap.h + + + Syntax/F2S/RuleMatcher.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/RuleMatcher.h + + + Syntax/F2S/RuleMatcherCallback.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/RuleMatcherCallback.h + + + Syntax/F2S/RuleMatcherHyperTree-inl.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/RuleMatcherHyperTree-inl.h + + + Syntax/F2S/RuleMatcherHyperTree.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/RuleMatcherHyperTree.h + + + Syntax/F2S/TopologicalSorter.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/TopologicalSorter.cpp + + + Syntax/F2S/TopologicalSorter.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/TopologicalSorter.h + + + Syntax/F2S/TreeFragmentTokenizer.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/TreeFragmentTokenizer.cpp + + + Syntax/F2S/TreeFragmentTokenizer.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/F2S/TreeFragmentTokenizer.h + + + Syntax/S2T/DerivationWriter.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/DerivationWriter.cpp + + + Syntax/S2T/DerivationWriter.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/DerivationWriter.h + + + Syntax/S2T/Manager-inl.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Manager-inl.h + + + Syntax/S2T/Manager.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Manager.h + + + Syntax/S2T/OovHandler-inl.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/OovHandler-inl.h + + + Syntax/S2T/OovHandler.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/OovHandler.h + + + Syntax/S2T/PChart.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/PChart.cpp + + + Syntax/S2T/PChart.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/PChart.h + + + Syntax/S2T/PHyperedgeToSHyperedgeBundle.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/PHyperedgeToSHyperedgeBundle.h + + + Syntax/S2T/ParserCallback.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/ParserCallback.h + + + Syntax/S2T/Parsers + 2 + virtual:/virtual + + + Syntax/S2T/RuleTrie.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/RuleTrie.h + + + Syntax/S2T/RuleTrieCYKPlus.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/RuleTrieCYKPlus.cpp + + + Syntax/S2T/RuleTrieCYKPlus.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/RuleTrieCYKPlus.h + + + Syntax/S2T/RuleTrieCreator.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/RuleTrieCreator.h + + + Syntax/S2T/RuleTrieLoader.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/RuleTrieLoader.cpp + + + Syntax/S2T/RuleTrieLoader.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/RuleTrieLoader.h + + + Syntax/S2T/RuleTrieScope3.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/RuleTrieScope3.cpp + + + Syntax/S2T/RuleTrieScope3.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/RuleTrieScope3.h + + + Syntax/S2T/SChart.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/SChart.cpp + + + Syntax/S2T/SChart.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/SChart.h + + + Syntax/T2S/GlueRuleSynthesizer.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/GlueRuleSynthesizer.cpp + + + Syntax/T2S/GlueRuleSynthesizer.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/GlueRuleSynthesizer.h + + + Syntax/T2S/HyperTree.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/HyperTree.h + + + Syntax/T2S/InputTree.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/InputTree.h + + + Syntax/T2S/InputTreeBuilder.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/InputTreeBuilder.cpp + + + Syntax/T2S/InputTreeBuilder.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/InputTreeBuilder.h + + + Syntax/T2S/InputTreeToForest.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/InputTreeToForest.cpp + + + Syntax/T2S/InputTreeToForest.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/InputTreeToForest.h + + + Syntax/T2S/Manager-inl.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/Manager-inl.h + + + Syntax/T2S/Manager.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/Manager.h + + + Syntax/T2S/RuleMatcher.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/RuleMatcher.h + + + Syntax/T2S/RuleMatcherSCFG-inl.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/RuleMatcherSCFG-inl.h + + + Syntax/T2S/RuleMatcherSCFG.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/RuleMatcherSCFG.h + + + Syntax/T2S/RuleTrie.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/RuleTrie.cpp + + + Syntax/T2S/RuleTrie.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/RuleTrie.h + + + Syntax/T2S/RuleTrieCreator.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/RuleTrieCreator.h + + + Syntax/T2S/RuleTrieLoader.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/RuleTrieLoader.cpp + + + Syntax/T2S/RuleTrieLoader.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/T2S/RuleTrieLoader.h + + + TranslationModel/CYKPlusParser/ChartRuleLookupManagerCYKPlus.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerCYKPlus.cpp + + + TranslationModel/CYKPlusParser/ChartRuleLookupManagerCYKPlus.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerCYKPlus.h + + + TranslationModel/CYKPlusParser/ChartRuleLookupManagerExample.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerExample.cpp + + + TranslationModel/CYKPlusParser/ChartRuleLookupManagerExample.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerExample.h + + + TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemory.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemory.cpp + + + TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemory.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemory.h + + + TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemoryPerSentence.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemoryPerSentence.cpp + + + TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemoryPerSentence.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemoryPerSentence.h + + + TranslationModel/CYKPlusParser/ChartRuleLookupManagerOnDisk.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerOnDisk.cpp + + + TranslationModel/CYKPlusParser/ChartRuleLookupManagerOnDisk.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerOnDisk.h + + + TranslationModel/CYKPlusParser/CompletedRuleCollection.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/CompletedRuleCollection.cpp + + + TranslationModel/CYKPlusParser/CompletedRuleCollection.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/CompletedRuleCollection.h + + + TranslationModel/CYKPlusParser/DotChart.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/DotChart.h + + + TranslationModel/CYKPlusParser/DotChartInMemory.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/DotChartInMemory.cpp + + + TranslationModel/CYKPlusParser/DotChartInMemory.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/DotChartInMemory.h + + + TranslationModel/CYKPlusParser/DotChartOnDisk.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/DotChartOnDisk.cpp + + + TranslationModel/CYKPlusParser/DotChartOnDisk.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/DotChartOnDisk.h + + + TranslationModel/CompactPT/BlockHashIndex.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/BlockHashIndex.cpp + + + TranslationModel/CompactPT/BlockHashIndex.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/BlockHashIndex.h + + + TranslationModel/CompactPT/CanonicalHuffman.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/CanonicalHuffman.h + + + TranslationModel/CompactPT/CmphStringVectorAdapter.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/CmphStringVectorAdapter.cpp + + + TranslationModel/CompactPT/CmphStringVectorAdapter.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/CmphStringVectorAdapter.h + + + TranslationModel/CompactPT/ConsistentPhrases.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/ConsistentPhrases.h + + + TranslationModel/CompactPT/Jamfile + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/Jamfile + + + TranslationModel/CompactPT/LexicalReorderingTableCompact.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/LexicalReorderingTableCompact.cpp + + + TranslationModel/CompactPT/LexicalReorderingTableCompact.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/LexicalReorderingTableCompact.h + + + TranslationModel/CompactPT/LexicalReorderingTableCreator.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/LexicalReorderingTableCreator.cpp + + + TranslationModel/CompactPT/LexicalReorderingTableCreator.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/LexicalReorderingTableCreator.h + + + TranslationModel/CompactPT/ListCoders.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/ListCoders.h + + + TranslationModel/CompactPT/MmapAllocator.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/MmapAllocator.h + + + TranslationModel/CompactPT/MonotonicVector.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/MonotonicVector.h + + + TranslationModel/CompactPT/MurmurHash3.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/MurmurHash3.cpp + + + TranslationModel/CompactPT/MurmurHash3.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/MurmurHash3.h + + + TranslationModel/CompactPT/PackedArray.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/PackedArray.h + + + TranslationModel/CompactPT/PhraseDecoder.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/PhraseDecoder.cpp + + + TranslationModel/CompactPT/PhraseDecoder.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/PhraseDecoder.h + + + TranslationModel/CompactPT/PhraseDictionaryCompact.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/PhraseDictionaryCompact.cpp + + + TranslationModel/CompactPT/PhraseDictionaryCompact.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/PhraseDictionaryCompact.h + + + TranslationModel/CompactPT/PhraseTableCreator.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/PhraseTableCreator.cpp + + + TranslationModel/CompactPT/PhraseTableCreator.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/PhraseTableCreator.h + + + TranslationModel/CompactPT/StringVector.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/StringVector.h + + + TranslationModel/CompactPT/StringVectorTemp.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/StringVectorTemp.h + + + TranslationModel/CompactPT/TargetPhraseCollectionCache.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/TargetPhraseCollectionCache.cpp + + + TranslationModel/CompactPT/TargetPhraseCollectionCache.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/TargetPhraseCollectionCache.h + + + TranslationModel/CompactPT/ThrowingFwrite.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/ThrowingFwrite.cpp + + + TranslationModel/CompactPT/ThrowingFwrite.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/ThrowingFwrite.h + + + TranslationModel/CompactPT/bin + 2 + virtual:/virtual + + + TranslationModel/RuleTable/Loader.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/Loader.h + + + TranslationModel/RuleTable/LoaderCompact.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/LoaderCompact.cpp + + + TranslationModel/RuleTable/LoaderCompact.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/LoaderCompact.h + + + TranslationModel/RuleTable/LoaderFactory.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/LoaderFactory.cpp + + + TranslationModel/RuleTable/LoaderFactory.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/LoaderFactory.h + + + TranslationModel/RuleTable/LoaderHiero.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/LoaderHiero.cpp + + + TranslationModel/RuleTable/LoaderHiero.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/LoaderHiero.h + + + TranslationModel/RuleTable/LoaderStandard.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/LoaderStandard.cpp + + + TranslationModel/RuleTable/LoaderStandard.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/LoaderStandard.h + + + TranslationModel/RuleTable/PhraseDictionaryALSuffixArray.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/PhraseDictionaryALSuffixArray.cpp + + + TranslationModel/RuleTable/PhraseDictionaryALSuffixArray.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/PhraseDictionaryALSuffixArray.h + + + TranslationModel/RuleTable/PhraseDictionaryFuzzyMatch.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/PhraseDictionaryFuzzyMatch.cpp + + + TranslationModel/RuleTable/PhraseDictionaryFuzzyMatch.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/PhraseDictionaryFuzzyMatch.h + + + TranslationModel/RuleTable/PhraseDictionaryOnDisk.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/PhraseDictionaryOnDisk.cpp + + + TranslationModel/RuleTable/PhraseDictionaryOnDisk.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/PhraseDictionaryOnDisk.h + + + TranslationModel/RuleTable/Trie.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/Trie.cpp + + + TranslationModel/RuleTable/Trie.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/Trie.h + + + TranslationModel/RuleTable/UTrie.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/UTrie.cpp + + + TranslationModel/RuleTable/UTrie.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/UTrie.h + + + TranslationModel/RuleTable/UTrieNode.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/UTrieNode.cpp + + + TranslationModel/RuleTable/UTrieNode.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/UTrieNode.h + + + TranslationModel/Scope3Parser/ApplicableRuleTrie.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/ApplicableRuleTrie.cpp + + + TranslationModel/Scope3Parser/ApplicableRuleTrie.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/ApplicableRuleTrie.h + + + TranslationModel/Scope3Parser/IntermediateVarSpanNode.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/IntermediateVarSpanNode.h + + + TranslationModel/Scope3Parser/Parser.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/Parser.cpp + + + TranslationModel/Scope3Parser/Parser.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/Parser.h + + + TranslationModel/Scope3Parser/SentenceMap.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/SentenceMap.h + + + TranslationModel/Scope3Parser/StackLattice.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/StackLattice.h + + + TranslationModel/Scope3Parser/StackLatticeBuilder.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/StackLatticeBuilder.cpp + + + TranslationModel/Scope3Parser/StackLatticeBuilder.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/StackLatticeBuilder.h + + + TranslationModel/Scope3Parser/StackLatticeSearcher.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/StackLatticeSearcher.h + + + TranslationModel/Scope3Parser/VarSpanNode.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/VarSpanNode.h + + + TranslationModel/Scope3Parser/VarSpanTrieBuilder.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/VarSpanTrieBuilder.cpp + + + TranslationModel/Scope3Parser/VarSpanTrieBuilder.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/VarSpanTrieBuilder.h + + + TranslationModel/UG/Jamfile + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/Jamfile + + + TranslationModel/UG/Makefile + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/Makefile + + + TranslationModel/UG/TargetPhraseCollectionCache.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/TargetPhraseCollectionCache.cc + + + TranslationModel/UG/TargetPhraseCollectionCache.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/TargetPhraseCollectionCache.h + + + TranslationModel/UG/bin + 2 + virtual:/virtual + + + TranslationModel/UG/bitext-find.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/bitext-find.cc + + + TranslationModel/UG/check-coverage.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/check-coverage.cc + + + TranslationModel/UG/check-coverage2.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/check-coverage2.cc + + + TranslationModel/UG/check-coverage3.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/check-coverage3.cc + + + TranslationModel/UG/check-coverage5.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/check-coverage5.cc + + + TranslationModel/UG/count-ptable-features.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/count-ptable-features.cc + + + TranslationModel/UG/filter-pt.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/filter-pt.cc + + + TranslationModel/UG/fuzzy.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/fuzzy.cc + + + TranslationModel/UG/generic + 2 + virtual:/virtual + + + TranslationModel/UG/mm + 2 + virtual:/virtual + + + TranslationModel/UG/mmsapt.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mmsapt.cpp + + + TranslationModel/UG/mmsapt.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mmsapt.h + + + TranslationModel/UG/mmsapt_align.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mmsapt_align.cc + + + TranslationModel/UG/ptable-describe-features.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/ptable-describe-features.cc + + + TranslationModel/UG/ptable-lookup-corpus.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/ptable-lookup-corpus.cc + + + TranslationModel/UG/ptable-lookup.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/ptable-lookup.cc + + + TranslationModel/UG/sapt_phrase_scorers.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/sapt_phrase_scorers.h + + + TranslationModel/UG/sapt_pscore_base.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/sapt_pscore_base.h + + + TranslationModel/UG/sapt_pscore_coherence.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/sapt_pscore_coherence.h + + + TranslationModel/UG/sapt_pscore_cumulative_bias.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/sapt_pscore_cumulative_bias.h + + + TranslationModel/UG/sapt_pscore_length_ratio.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/sapt_pscore_length_ratio.h + + + TranslationModel/UG/sapt_pscore_lex1.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/sapt_pscore_lex1.h + + + TranslationModel/UG/sapt_pscore_logcnt.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/sapt_pscore_logcnt.h + + + TranslationModel/UG/sapt_pscore_pbwd.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/sapt_pscore_pbwd.h + + + TranslationModel/UG/sapt_pscore_pfwd.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/sapt_pscore_pfwd.h + + + TranslationModel/UG/sapt_pscore_phrasecount.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/sapt_pscore_phrasecount.h + + + TranslationModel/UG/sapt_pscore_provenance.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/sapt_pscore_provenance.h + + + TranslationModel/UG/sapt_pscore_rareness.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/sapt_pscore_rareness.h + + + TranslationModel/UG/sapt_pscore_unaligned.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/sapt_pscore_unaligned.h + + + TranslationModel/UG/sapt_pscore_wordcount.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/sapt_pscore_wordcount.h + + + TranslationModel/UG/sim-pe.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/sim-pe.cc + + + TranslationModel/UG/spe-check-coverage.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/spe-check-coverage.cc + + + TranslationModel/UG/spe-check-coverage2.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/spe-check-coverage2.cc + + + TranslationModel/UG/spe-check-coverage3.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/spe-check-coverage3.cc + + + TranslationModel/UG/test-boost-threadpool.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/test-boost-threadpool.cc + + + TranslationModel/UG/test-domspec.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/test-domspec.cc + + + TranslationModel/UG/test-iptr.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/test-iptr.cc + + + TranslationModel/UG/test-ranked-phrase-lookup.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/test-ranked-phrase-lookup.cc + + + TranslationModel/UG/try-align.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/try-align.cc + + + TranslationModel/UG/try-align2.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/try-align2.cc + + + TranslationModel/UG/util + 2 + virtual:/virtual + + + TranslationModel/fuzzy-match/Alignments.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/Alignments.cpp + + + TranslationModel/fuzzy-match/Alignments.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/Alignments.h + + + TranslationModel/fuzzy-match/FuzzyMatchWrapper.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/FuzzyMatchWrapper.cpp + + + TranslationModel/fuzzy-match/FuzzyMatchWrapper.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/FuzzyMatchWrapper.h + + + TranslationModel/fuzzy-match/Match.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/Match.h + + + TranslationModel/fuzzy-match/SentenceAlignment.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/SentenceAlignment.cpp + + + TranslationModel/fuzzy-match/SentenceAlignment.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/SentenceAlignment.h + + + TranslationModel/fuzzy-match/SuffixArray.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/SuffixArray.cpp + + + TranslationModel/fuzzy-match/SuffixArray.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/SuffixArray.h + + + TranslationModel/fuzzy-match/Vocabulary.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/Vocabulary.cpp + + + TranslationModel/fuzzy-match/Vocabulary.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/Vocabulary.h + + + TranslationModel/fuzzy-match/create_xml.cpp + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/create_xml.cpp + + + TranslationModel/fuzzy-match/create_xml.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/create_xml.h + + + bin/gcc-4.8/release + 2 + virtual:/virtual + + + LM/bin/BackwardTest.test/gcc-4.8 + 2 + virtual:/virtual + + + LM/bin/gcc-4.8/release + 2 + virtual:/virtual + + + Syntax/S2T/Parsers/Parser.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Parser.h + + + Syntax/S2T/Parsers/RecursiveCYKPlusParser + 2 + virtual:/virtual + + + Syntax/S2T/Parsers/Scope3Parser + 2 + virtual:/virtual + + + TranslationModel/CompactPT/bin/darwin-4.2.1 + 2 + virtual:/virtual + + + TranslationModel/UG/bin/darwin-4.2.1 + 2 + virtual:/virtual + + + TranslationModel/UG/generic/Jamfile + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/Jamfile + + + TranslationModel/UG/generic/bin + 2 + virtual:/virtual + + + TranslationModel/UG/generic/file_io + 2 + virtual:/virtual + + + TranslationModel/UG/generic/program_options + 2 + virtual:/virtual + + + TranslationModel/UG/generic/sampling + 2 + virtual:/virtual + + + TranslationModel/UG/generic/sorting + 2 + virtual:/virtual + + + TranslationModel/UG/generic/stringdist + 2 + virtual:/virtual + + + TranslationModel/UG/generic/threading + 2 + virtual:/virtual + + + TranslationModel/UG/mm/Jamfile + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/Jamfile + + + TranslationModel/UG/mm/Makefile.x + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/Makefile.x + + + TranslationModel/UG/mm/bin + 2 + virtual:/virtual + + + TranslationModel/UG/mm/calc-coverage.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/calc-coverage.cc + + + TranslationModel/UG/mm/custom-pt.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/custom-pt.cc + + + TranslationModel/UG/mm/mam2symal.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/mam2symal.cc + + + TranslationModel/UG/mm/mam_verify.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/mam_verify.cc + + + TranslationModel/UG/mm/mmlex-build.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/mmlex-build.cc + + + TranslationModel/UG/mm/mmlex-lookup.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/mmlex-lookup.cc + + + TranslationModel/UG/mm/mtt-build.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/mtt-build.cc + + + TranslationModel/UG/mm/mtt-count-words.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/mtt-count-words.cc + + + TranslationModel/UG/mm/mtt-demo1.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/mtt-demo1.cc + + + TranslationModel/UG/mm/mtt-dump.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/mtt-dump.cc + + + TranslationModel/UG/mm/mtt.count.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/mtt.count.cc + + + TranslationModel/UG/mm/num_read_write.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/num_read_write.cc + + + TranslationModel/UG/mm/num_read_write.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/num_read_write.h + + + TranslationModel/UG/mm/obsolete + 2 + virtual:/virtual + + + TranslationModel/UG/mm/symal2mam.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/symal2mam.cc + + + TranslationModel/UG/mm/test-dynamic-im-tsa.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/test-dynamic-im-tsa.cc + + + TranslationModel/UG/mm/test-http-client.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/test-http-client.cc + + + TranslationModel/UG/mm/test-xml-escaping.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/test-xml-escaping.cc + + + TranslationModel/UG/mm/tpt_pickler.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/tpt_pickler.cc + + + TranslationModel/UG/mm/tpt_pickler.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/tpt_pickler.h + + + TranslationModel/UG/mm/tpt_tightindex.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/tpt_tightindex.cc + + + TranslationModel/UG/mm/tpt_tightindex.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/tpt_tightindex.h + + + TranslationModel/UG/mm/tpt_tokenindex.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/tpt_tokenindex.cc + + + TranslationModel/UG/mm/tpt_tokenindex.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/tpt_tokenindex.h + + + TranslationModel/UG/mm/tpt_typedefs.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/tpt_typedefs.h + + + TranslationModel/UG/mm/ug_bitext.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_bitext.cc + + + TranslationModel/UG/mm/ug_bitext.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_bitext.h + + + TranslationModel/UG/mm/ug_bitext_agenda.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_bitext_agenda.h + + + TranslationModel/UG/mm/ug_bitext_agenda_job.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_bitext_agenda_job.h + + + TranslationModel/UG/mm/ug_bitext_agenda_worker.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_bitext_agenda_worker.h + + + TranslationModel/UG/mm/ug_bitext_jstats.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_bitext_jstats.cc + + + TranslationModel/UG/mm/ug_bitext_jstats.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_bitext_jstats.h + + + TranslationModel/UG/mm/ug_bitext_moses.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_bitext_moses.h + + + TranslationModel/UG/mm/ug_bitext_phrase_extraction_record.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_bitext_phrase_extraction_record.h + + + TranslationModel/UG/mm/ug_bitext_pstats.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_bitext_pstats.cc + + + TranslationModel/UG/mm/ug_bitext_pstats.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_bitext_pstats.h + + + TranslationModel/UG/mm/ug_bitext_sampler.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_bitext_sampler.h + + + TranslationModel/UG/mm/ug_conll_bottom_up_token.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_conll_bottom_up_token.h + + + TranslationModel/UG/mm/ug_conll_record.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_conll_record.cc + + + TranslationModel/UG/mm/ug_conll_record.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_conll_record.h + + + TranslationModel/UG/mm/ug_corpus_token.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_corpus_token.cc + + + TranslationModel/UG/mm/ug_corpus_token.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_corpus_token.h + + + TranslationModel/UG/mm/ug_deptree.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_deptree.cc + + + TranslationModel/UG/mm/ug_deptree.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_deptree.h + + + TranslationModel/UG/mm/ug_http_client.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_http_client.cc + + + TranslationModel/UG/mm/ug_http_client.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_http_client.h + + + TranslationModel/UG/mm/ug_im_bitext.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_im_bitext.cc + + + TranslationModel/UG/mm/ug_im_bitext.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_im_bitext.h + + + TranslationModel/UG/mm/ug_im_tsa.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_im_tsa.h + + + TranslationModel/UG/mm/ug_im_ttrack.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_im_ttrack.h + + + TranslationModel/UG/mm/ug_lexical_phrase_scorer1.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_lexical_phrase_scorer1.h + + + TranslationModel/UG/mm/ug_lexical_phrase_scorer2.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_lexical_phrase_scorer2.h + + + TranslationModel/UG/mm/ug_lexical_reordering.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_lexical_reordering.cc + + + TranslationModel/UG/mm/ug_lexical_reordering.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_lexical_reordering.h + + + TranslationModel/UG/mm/ug_load_primer.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_load_primer.cc + + + TranslationModel/UG/mm/ug_load_primer.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_load_primer.h + + + TranslationModel/UG/mm/ug_lru_cache.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_lru_cache.h + + + TranslationModel/UG/mm/ug_mm_2d_table.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_mm_2d_table.h + + + TranslationModel/UG/mm/ug_mm_bitext.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_mm_bitext.h + + + TranslationModel/UG/mm/ug_mm_tsa.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_mm_tsa.h + + + TranslationModel/UG/mm/ug_mm_tsa_tree_iterator.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_mm_tsa_tree_iterator.h + + + TranslationModel/UG/mm/ug_mm_ttrack.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_mm_ttrack.h + + + TranslationModel/UG/mm/ug_phrasepair.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_phrasepair.cc + + + TranslationModel/UG/mm/ug_phrasepair.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_phrasepair.h + + + TranslationModel/UG/mm/ug_prep_phrases.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_prep_phrases.h + + + TranslationModel/UG/mm/ug_sampling_bias.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_sampling_bias.cc + + + TranslationModel/UG/mm/ug_sampling_bias.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_sampling_bias.h + + + TranslationModel/UG/mm/ug_tsa_array_entry.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_tsa_array_entry.cc + + + TranslationModel/UG/mm/ug_tsa_array_entry.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_tsa_array_entry.h + + + TranslationModel/UG/mm/ug_tsa_base.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_tsa_base.h + + + TranslationModel/UG/mm/ug_tsa_bitset_cache.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_tsa_bitset_cache.h + + + TranslationModel/UG/mm/ug_tsa_tree_iterator.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_tsa_tree_iterator.h + + + TranslationModel/UG/mm/ug_ttrack_base.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_ttrack_base.cc + + + TranslationModel/UG/mm/ug_ttrack_base.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_ttrack_base.h + + + TranslationModel/UG/mm/ug_ttrack_position.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_ttrack_position.cc + + + TranslationModel/UG/mm/ug_ttrack_position.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_ttrack_position.h + + + TranslationModel/UG/mm/ug_typedefs.h + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/ug_typedefs.h + + + TranslationModel/UG/util/Makefile + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/util/Makefile + + + TranslationModel/UG/util/ibm1-align + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/util/ibm1-align + + + TranslationModel/UG/util/ibm1-align.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/util/ibm1-align.cc + + + TranslationModel/UG/util/tokenindex.dump.cc + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/util/tokenindex.dump.cc + + + bin/gcc-4.8/release/debug-symbols-on + 2 + virtual:/virtual + + + LM/bin/BackwardTest.test/gcc-4.8/release + 2 + virtual:/virtual + + + LM/bin/gcc-4.8/release/debug-symbols-on + 2 + virtual:/virtual + + + Syntax/S2T/Parsers/RecursiveCYKPlusParser/RecursiveCYKPlusParser-inl.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/RecursiveCYKPlusParser/RecursiveCYKPlusParser-inl.h + + + Syntax/S2T/Parsers/RecursiveCYKPlusParser/RecursiveCYKPlusParser.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/RecursiveCYKPlusParser/RecursiveCYKPlusParser.h + + + Syntax/S2T/Parsers/Scope3Parser/Parser-inl.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/Parser-inl.h + + + Syntax/S2T/Parsers/Scope3Parser/Parser.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/Parser.h + + + Syntax/S2T/Parsers/Scope3Parser/PatternApplicationTrie.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/PatternApplicationTrie.cpp + + + Syntax/S2T/Parsers/Scope3Parser/PatternApplicationTrie.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/PatternApplicationTrie.h + + + Syntax/S2T/Parsers/Scope3Parser/SentenceMap.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/SentenceMap.h + + + Syntax/S2T/Parsers/Scope3Parser/SymbolRange.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/SymbolRange.h + + + Syntax/S2T/Parsers/Scope3Parser/SymbolRangeCalculator.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/SymbolRangeCalculator.cpp + + + Syntax/S2T/Parsers/Scope3Parser/SymbolRangeCalculator.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/SymbolRangeCalculator.h + + + Syntax/S2T/Parsers/Scope3Parser/TailLattice.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/TailLattice.h + + + Syntax/S2T/Parsers/Scope3Parser/TailLatticeBuilder.cpp + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/TailLatticeBuilder.cpp + + + Syntax/S2T/Parsers/Scope3Parser/TailLatticeBuilder.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/TailLatticeBuilder.h + + + Syntax/S2T/Parsers/Scope3Parser/TailLatticeSearcher.h + 1 + PARENT-3-PROJECT_LOC/moses/Syntax/S2T/Parsers/Scope3Parser/TailLatticeSearcher.h + + + TranslationModel/CompactPT/bin/darwin-4.2.1/release + 2 + virtual:/virtual + + + TranslationModel/UG/bin/darwin-4.2.1/release + 2 + virtual:/virtual + + + TranslationModel/UG/generic/bin/darwin-4.2.1 + 2 + virtual:/virtual + + + TranslationModel/UG/generic/file_io/ug_stream.cpp 1 - PARENT-3-PROJECT_LOC/moses/LM/BackwardLMState.cpp + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/file_io/ug_stream.cpp - LM/BackwardLMState.h + TranslationModel/UG/generic/file_io/ug_stream.h 1 - PARENT-3-PROJECT_LOC/moses/LM/BackwardLMState.h + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/file_io/ug_stream.h - LM/BackwardTest.cpp + TranslationModel/UG/generic/program_options/ug_get_options.cpp 1 - PARENT-3-PROJECT_LOC/moses/LM/BackwardTest.cpp + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/program_options/ug_get_options.cpp - LM/Base.cpp + TranslationModel/UG/generic/program_options/ug_get_options.h 1 - PARENT-3-PROJECT_LOC/moses/LM/Base.cpp + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/program_options/ug_get_options.h - LM/Base.h + TranslationModel/UG/generic/program_options/ug_splice_arglist.cc 1 - PARENT-3-PROJECT_LOC/moses/LM/Base.h + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/program_options/ug_splice_arglist.cc - LM/ChartState.h + TranslationModel/UG/generic/program_options/ug_splice_arglist.h 1 - PARENT-3-PROJECT_LOC/moses/LM/ChartState.h + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/program_options/ug_splice_arglist.h - LM/IRST.cpp + TranslationModel/UG/generic/sampling/Sampling.h 1 - PARENT-3-PROJECT_LOC/moses/LM/IRST.cpp + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/sampling/Sampling.h - LM/IRST.h + TranslationModel/UG/generic/sorting/NBestList.h 1 - PARENT-3-PROJECT_LOC/moses/LM/IRST.h + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/sorting/NBestList.h - LM/Implementation.cpp + TranslationModel/UG/generic/sorting/VectorIndexSorter.h 1 - PARENT-3-PROJECT_LOC/moses/LM/Implementation.cpp + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/sorting/VectorIndexSorter.h - LM/Implementation.h + TranslationModel/UG/generic/stringdist/ug_stringdist.cc 1 - PARENT-3-PROJECT_LOC/moses/LM/Implementation.h + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/stringdist/ug_stringdist.cc - LM/Jamfile + TranslationModel/UG/generic/stringdist/ug_stringdist.h 1 - PARENT-3-PROJECT_LOC/moses/LM/Jamfile + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/stringdist/ug_stringdist.h - LM/Joint.cpp + TranslationModel/UG/generic/threading/ug_ref_counter.h 1 - PARENT-3-PROJECT_LOC/moses/LM/Joint.cpp + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/threading/ug_ref_counter.h - LM/Joint.h + TranslationModel/UG/generic/threading/ug_thread_pool.cc 1 - PARENT-3-PROJECT_LOC/moses/LM/Joint.h + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/threading/ug_thread_pool.cc - LM/Ken.cpp + TranslationModel/UG/generic/threading/ug_thread_pool.h 1 - PARENT-3-PROJECT_LOC/moses/LM/Ken.cpp + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/threading/ug_thread_pool.h - LM/Ken.h + TranslationModel/UG/generic/threading/ug_thread_safe_counter.cc 1 - PARENT-3-PROJECT_LOC/moses/LM/Ken.h + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/threading/ug_thread_safe_counter.cc - LM/LDHT.cpp + TranslationModel/UG/generic/threading/ug_thread_safe_counter.h 1 - PARENT-3-PROJECT_LOC/moses/LM/LDHT.cpp + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/threading/ug_thread_safe_counter.h - LM/LDHT.h - 1 - PARENT-3-PROJECT_LOC/moses/LM/LDHT.h + TranslationModel/UG/mm/bin/darwin-4.2.1 + 2 + virtual:/virtual - LM/MultiFactor.cpp + TranslationModel/UG/mm/obsolete/ug_bitext_base.h 1 - PARENT-3-PROJECT_LOC/moses/LM/MultiFactor.cpp + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/obsolete/ug_bitext_base.h - LM/MultiFactor.h - 1 - PARENT-3-PROJECT_LOC/moses/LM/MultiFactor.h + bin/gcc-4.8/release/debug-symbols-on/link-static + 2 + virtual:/virtual - LM/ORLM.cpp - 1 - PARENT-3-PROJECT_LOC/moses/LM/ORLM.cpp + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on + 2 + virtual:/virtual - LM/ORLM.h - 1 - PARENT-3-PROJECT_LOC/moses/LM/ORLM.h + LM/bin/gcc-4.8/release/debug-symbols-on/link-static + 2 + virtual:/virtual - LM/ParallelBackoff.cpp - 1 - PARENT-3-PROJECT_LOC/moses/LM/ParallelBackoff.cpp + TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on + 2 + virtual:/virtual - LM/ParallelBackoff.h - 1 - PARENT-3-PROJECT_LOC/moses/LM/ParallelBackoff.h + TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static + 2 + virtual:/virtual - LM/PointerState.h - 1 - PARENT-3-PROJECT_LOC/moses/LM/PointerState.h + TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on + 2 + virtual:/virtual - LM/Rand.cpp - 1 - PARENT-3-PROJECT_LOC/moses/LM/Rand.cpp + TranslationModel/UG/bin/darwin-4.2.1/release/link-static + 2 + virtual:/virtual - LM/Rand.h - 1 - PARENT-3-PROJECT_LOC/moses/LM/Rand.h + TranslationModel/UG/generic/bin/darwin-4.2.1/release + 2 + virtual:/virtual - LM/Remote.cpp - 1 - PARENT-3-PROJECT_LOC/moses/LM/Remote.cpp + TranslationModel/UG/mm/bin/darwin-4.2.1/release + 2 + virtual:/virtual - LM/Remote.h - 1 - PARENT-3-PROJECT_LOC/moses/LM/Remote.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual - LM/SRI.cpp - 1 - PARENT-3-PROJECT_LOC/moses/LM/SRI.cpp + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static + 2 + virtual:/virtual - LM/SRI.h - 1 - PARENT-3-PROJECT_LOC/moses/LM/SRI.h + LM/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual - LM/SingleFactor.cpp - 1 - PARENT-3-PROJECT_LOC/moses/LM/SingleFactor.cpp + TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static + 2 + virtual:/virtual - LM/SingleFactor.h - 1 - PARENT-3-PROJECT_LOC/moses/LM/SingleFactor.h + TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi + 2 + virtual:/virtual - LM/backward.arpa - 1 - PARENT-3-PROJECT_LOC/moses/LM/backward.arpa + TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static + 2 + virtual:/virtual - TranslationModel/BilingualDynSuffixArray.cpp - 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/BilingualDynSuffixArray.cpp + TranslationModel/UG/bin/darwin-4.2.1/release/link-static/threading-multi + 2 + virtual:/virtual - TranslationModel/BilingualDynSuffixArray.h - 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/BilingualDynSuffixArray.h + TranslationModel/UG/generic/bin/darwin-4.2.1/release/debug-symbols-on + 2 + virtual:/virtual - TranslationModel/CYKPlusParser + TranslationModel/UG/generic/bin/darwin-4.2.1/release/link-static 2 virtual:/virtual - TranslationModel/CompactPT + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on 2 virtual:/virtual - TranslationModel/DynSAInclude + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static 2 virtual:/virtual - TranslationModel/DynSuffixArray.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/AlignmentInfo.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSuffixArray.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/AlignmentInfo.o - TranslationModel/DynSuffixArray.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/AlignmentInfoCollection.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSuffixArray.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/AlignmentInfoCollection.o - TranslationModel/PhraseDictionary.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/AlignmentInfoTest.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionary.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/AlignmentInfoTest.o - TranslationModel/PhraseDictionary.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Backward.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionary.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Backward.o - TranslationModel/PhraseDictionaryDynSuffixArray.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BackwardLMState.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryDynSuffixArray.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BackwardLMState.o - TranslationModel/PhraseDictionaryDynSuffixArray.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Base.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryDynSuffixArray.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Base.o - TranslationModel/PhraseDictionaryMemory.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BilingualLM.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryMemory.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BilingualLM.o - TranslationModel/PhraseDictionaryMemory.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Bitmap.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryMemory.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Bitmap.o - TranslationModel/PhraseDictionaryMultiModel.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BitmapContainer.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryMultiModel.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BitmapContainer.o - TranslationModel/PhraseDictionaryMultiModel.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartCell.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryMultiModel.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartCell.o - TranslationModel/PhraseDictionaryMultiModelCounts.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartCellCollection.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryMultiModelCounts.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartCellCollection.o - TranslationModel/PhraseDictionaryMultiModelCounts.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartHypothesis.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryMultiModelCounts.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartHypothesis.o - TranslationModel/PhraseDictionaryNodeMemory.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartHypothesisCollection.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryNodeMemory.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartHypothesisCollection.o - TranslationModel/PhraseDictionaryNodeMemory.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartKBestExtractor.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryNodeMemory.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartKBestExtractor.o - TranslationModel/PhraseDictionaryTree.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartManager.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryTree.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartManager.o - TranslationModel/PhraseDictionaryTree.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartParser.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryTree.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartParser.o - TranslationModel/PhraseDictionaryTreeAdaptor.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartRuleLookupManager.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryTreeAdaptor.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartRuleLookupManager.o - TranslationModel/PhraseDictionaryTreeAdaptor.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartTranslationOption.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/PhraseDictionaryTreeAdaptor.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartTranslationOption.o - TranslationModel/RuleTable - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartTranslationOptionList.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartTranslationOptionList.o - TranslationModel/Scope3Parser - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartTranslationOptions.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ChartTranslationOptions.o - TranslationModel/WordCoocTable.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ConfusionNet.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/WordCoocTable.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ConfusionNet.o - TranslationModel/WordCoocTable.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/DecodeGraph.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/WordCoocTable.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/DecodeGraph.o - TranslationModel/fuzzy-match - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/DecodeStep.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/DecodeStep.o - bin/BackwardTest.test - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/DecodeStepGeneration.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/DecodeStepGeneration.o - bin/factor.log + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/DecodeStepTranslation.o 1 - PARENT-3-PROJECT_LOC/moses/bin/factor.log + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/DecodeStepTranslation.o - bin/gcc-4.7 + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF 2 virtual:/virtual - bin/lm.log + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF_Factory.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/lm.log + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF_Factory.o - FF/OSM-Feature/OpSequenceModel.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Factor.o 1 - PARENT-3-PROJECT_LOC/moses/FF/OSM-Feature/OpSequenceModel.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Factor.o - FF/OSM-Feature/OpSequenceModel.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FactorCollection.o 1 - PARENT-3-PROJECT_LOC/moses/FF/OSM-Feature/OpSequenceModel.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FactorCollection.o - FF/OSM-Feature/osmHyp.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FactorTypeSet.o 1 - PARENT-3-PROJECT_LOC/moses/FF/OSM-Feature/osmHyp.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FactorTypeSet.o - FF/OSM-Feature/osmHyp.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureVector.o 1 - PARENT-3-PROJECT_LOC/moses/FF/OSM-Feature/osmHyp.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureVector.o - TranslationModel/CYKPlusParser/ChartRuleLookupManagerCYKPlus.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureVectorTest.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerCYKPlus.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FeatureVectorTest.o - TranslationModel/CYKPlusParser/ChartRuleLookupManagerCYKPlus.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/File.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerCYKPlus.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/File.o - TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemory.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FloydWarshall.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemory.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FloydWarshall.o - TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemory.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/GenerationDictionary.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemory.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/GenerationDictionary.o - TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemoryPerSentence.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/HypergraphOutput.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemoryPerSentence.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/HypergraphOutput.o - TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemoryPerSentence.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Hypothesis.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemoryPerSentence.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Hypothesis.o - TranslationModel/CYKPlusParser/ChartRuleLookupManagerOnDisk.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/HypothesisStack.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerOnDisk.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/HypothesisStack.o - TranslationModel/CYKPlusParser/ChartRuleLookupManagerOnDisk.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/HypothesisStackCubePruning.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/ChartRuleLookupManagerOnDisk.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/HypothesisStackCubePruning.o - TranslationModel/CYKPlusParser/DotChart.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/HypothesisStackNormal.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/DotChart.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/HypothesisStackNormal.o - TranslationModel/CYKPlusParser/DotChartInMemory.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/IOWrapper.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/DotChartInMemory.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/IOWrapper.o - TranslationModel/CYKPlusParser/DotChartInMemory.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Implementation.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/DotChartInMemory.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Implementation.o - TranslationModel/CYKPlusParser/DotChartOnDisk.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Incremental.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/DotChartOnDisk.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Incremental.o - TranslationModel/CYKPlusParser/DotChartOnDisk.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/InputFileStream.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CYKPlusParser/DotChartOnDisk.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/InputFileStream.o - TranslationModel/CompactPT/BlockHashIndex.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/InputPath.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/BlockHashIndex.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/InputPath.o - TranslationModel/CompactPT/BlockHashIndex.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/InputType.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/BlockHashIndex.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/InputType.o - TranslationModel/CompactPT/CanonicalHuffman.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Joint.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/CanonicalHuffman.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Joint.o - TranslationModel/CompactPT/CmphStringVectorAdapter.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Ken.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/CmphStringVectorAdapter.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Ken.o - TranslationModel/CompactPT/CmphStringVectorAdapter.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/LVoc.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/CmphStringVectorAdapter.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/LVoc.o - TranslationModel/CompactPT/ConsistentPhrases.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/LatticeMBR.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/ConsistentPhrases.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/LatticeMBR.o - TranslationModel/CompactPT/Jamfile + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Manager.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/Jamfile + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Manager.o - TranslationModel/CompactPT/LexicalReorderingTableCompact.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MockHypothesis.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/LexicalReorderingTableCompact.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MockHypothesis.o - TranslationModel/CompactPT/LexicalReorderingTableCompact.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MosesTest.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/LexicalReorderingTableCompact.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MosesTest.o - TranslationModel/CompactPT/LexicalReorderingTableCreator.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MultiFactor.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/LexicalReorderingTableCreator.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MultiFactor.o - TranslationModel/CompactPT/LexicalReorderingTableCreator.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/NonTerminal.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/LexicalReorderingTableCreator.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/NonTerminal.o - TranslationModel/CompactPT/ListCoders.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PCNTools.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/ListCoders.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PCNTools.o - TranslationModel/CompactPT/MmapAllocator.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PDTAimp.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/MmapAllocator.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PDTAimp.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PP + 2 + virtual:/virtual + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Parameter.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Parameter.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PartialTranslOptColl.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PartialTranslOptColl.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Phrase.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Phrase.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PhraseOrientation.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PhraseOrientation.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PrefixTreeMap.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PrefixTreeMap.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Range.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Range.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Remote.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Remote.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ReorderingConstraint.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ReorderingConstraint.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/RuleCube.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/RuleCube.o - TranslationModel/CompactPT/MonotonicVector.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/RuleCubeItem.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/MonotonicVector.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/RuleCubeItem.o - TranslationModel/CompactPT/MurmurHash3.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/RuleCubeQueue.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/MurmurHash3.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/RuleCubeQueue.o - TranslationModel/CompactPT/MurmurHash3.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreComponentCollection.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/MurmurHash3.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreComponentCollection.o - TranslationModel/CompactPT/PackedArray.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreComponentCollectionTest.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/PackedArray.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ScoreComponentCollectionTest.o - TranslationModel/CompactPT/PhraseDecoder.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Search.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/PhraseDecoder.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Search.o - TranslationModel/CompactPT/PhraseDecoder.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SearchCubePruning.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/PhraseDecoder.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SearchCubePruning.o - TranslationModel/CompactPT/PhraseDictionaryCompact.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SearchNormal.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/PhraseDictionaryCompact.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SearchNormal.o - TranslationModel/CompactPT/PhraseDictionaryCompact.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SearchNormalBatch.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/PhraseDictionaryCompact.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SearchNormalBatch.o - TranslationModel/CompactPT/PhraseTableCreator.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Sentence.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/PhraseTableCreator.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Sentence.o - TranslationModel/CompactPT/PhraseTableCreator.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SentenceStats.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/PhraseTableCreator.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SentenceStats.o - TranslationModel/CompactPT/StringVector.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SingleFactor.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/StringVector.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SingleFactor.o - TranslationModel/CompactPT/TargetPhraseCollectionCache.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SkeletonLM.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/TargetPhraseCollectionCache.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SkeletonLM.o - TranslationModel/CompactPT/ThrowingFwrite.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SquareMatrix.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/ThrowingFwrite.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SquareMatrix.o - TranslationModel/CompactPT/ThrowingFwrite.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/StaticData.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/ThrowingFwrite.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/StaticData.o - TranslationModel/CompactPT/bin + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax 2 virtual:/virtual - TranslationModel/DynSAInclude/FileHandler.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TargetPhrase.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSAInclude/FileHandler.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TargetPhrase.o - TranslationModel/DynSAInclude/FileHandler.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TargetPhraseCollection.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSAInclude/FileHandler.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TargetPhraseCollection.o - TranslationModel/DynSAInclude/Jamfile + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ThreadPool.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSAInclude/Jamfile + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ThreadPool.o - TranslationModel/DynSAInclude/RandLMCache.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Timer.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSAInclude/RandLMCache.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Timer.o - TranslationModel/DynSAInclude/RandLMFilter.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationAnalysis.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSAInclude/RandLMFilter.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationAnalysis.o - TranslationModel/DynSAInclude/fdstream.h - 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSAInclude/fdstream.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel + 2 + virtual:/virtual - TranslationModel/DynSAInclude/hash.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationOption.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSAInclude/hash.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationOption.o - TranslationModel/DynSAInclude/onlineRLM.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationOptionCollection.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSAInclude/onlineRLM.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationOptionCollection.o - TranslationModel/DynSAInclude/params.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationOptionCollectionConfusionNet.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSAInclude/params.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationOptionCollectionConfusionNet.o - TranslationModel/DynSAInclude/params.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationOptionCollectionLattice.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSAInclude/params.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationOptionCollectionLattice.o - TranslationModel/DynSAInclude/perfectHash.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationOptionCollectionText.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSAInclude/perfectHash.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationOptionCollectionText.o - TranslationModel/DynSAInclude/quantizer.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationOptionList.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSAInclude/quantizer.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationOptionList.o - TranslationModel/DynSAInclude/types.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationTask.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSAInclude/types.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationTask.o - TranslationModel/DynSAInclude/utils.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TreeInput.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSAInclude/utils.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TreeInput.o - TranslationModel/DynSAInclude/vocab.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TrellisPath.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSAInclude/vocab.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TrellisPath.o - TranslationModel/DynSAInclude/vocab.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TrellisPathCollection.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/DynSAInclude/vocab.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TrellisPathCollection.o - TranslationModel/RuleTable/Loader.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/UserMessage.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/Loader.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/UserMessage.o - TranslationModel/RuleTable/LoaderCompact.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Util.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/LoaderCompact.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Util.o - TranslationModel/RuleTable/LoaderCompact.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Word.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/LoaderCompact.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Word.o - TranslationModel/RuleTable/LoaderFactory.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/WordLattice.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/LoaderFactory.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/WordLattice.o - TranslationModel/RuleTable/LoaderFactory.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/XmlOption.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/LoaderFactory.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/XmlOption.o - TranslationModel/RuleTable/LoaderHiero.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/libmoses.a 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/LoaderHiero.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/libmoses.a - TranslationModel/RuleTable/LoaderHiero.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/mbr.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/LoaderHiero.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/mbr.o - TranslationModel/RuleTable/LoaderStandard.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/moses_test 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/LoaderStandard.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/moses_test - TranslationModel/RuleTable/LoaderStandard.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/moses_test.passed 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/LoaderStandard.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/moses_test.passed - TranslationModel/RuleTable/PhraseDictionaryALSuffixArray.cpp - 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/PhraseDictionaryALSuffixArray.cpp + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual - TranslationModel/RuleTable/PhraseDictionaryALSuffixArray.h + LM/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/IRST.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/PhraseDictionaryALSuffixArray.h + PARENT-3-PROJECT_LOC/moses/LM/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/IRST.o - TranslationModel/RuleTable/PhraseDictionaryFuzzyMatch.cpp + LM/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ORLM.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/PhraseDictionaryFuzzyMatch.cpp + PARENT-3-PROJECT_LOC/moses/LM/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/ORLM.o - TranslationModel/RuleTable/PhraseDictionaryFuzzyMatch.h + LM/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Rand.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/PhraseDictionaryFuzzyMatch.h + PARENT-3-PROJECT_LOC/moses/LM/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Rand.o - TranslationModel/RuleTable/PhraseDictionaryOnDisk.cpp - 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/PhraseDictionaryOnDisk.cpp + TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual - TranslationModel/RuleTable/PhraseDictionaryOnDisk.h + TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/BlockHashIndex.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/PhraseDictionaryOnDisk.h + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/BlockHashIndex.o - TranslationModel/RuleTable/Trie.cpp + TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/CmphStringVectorAdapter.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/Trie.cpp + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/CmphStringVectorAdapter.o - TranslationModel/RuleTable/Trie.h + TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/LexicalReorderingTableCompact.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/Trie.h + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/LexicalReorderingTableCompact.o - TranslationModel/RuleTable/UTrie.cpp + TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/LexicalReorderingTableCreator.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/UTrie.cpp + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/LexicalReorderingTableCreator.o - TranslationModel/RuleTable/UTrie.h + TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/MurmurHash3.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/UTrie.h + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/MurmurHash3.o - TranslationModel/RuleTable/UTrieNode.cpp + TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/PhraseDecoder.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/UTrieNode.cpp + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/PhraseDecoder.o - TranslationModel/RuleTable/UTrieNode.h + TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/PhraseDictionaryCompact.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/RuleTable/UTrieNode.h + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/PhraseDictionaryCompact.o - TranslationModel/Scope3Parser/ApplicableRuleTrie.cpp + TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/PhraseTableCreator.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/ApplicableRuleTrie.cpp + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/PhraseTableCreator.o - TranslationModel/Scope3Parser/ApplicableRuleTrie.h + TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/TargetPhraseCollectionCache.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/ApplicableRuleTrie.h + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/TargetPhraseCollectionCache.o - TranslationModel/Scope3Parser/IntermediateVarSpanNode.h + TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/ThrowingFwrite.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/IntermediateVarSpanNode.h + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/link-static/threading-multi/ThrowingFwrite.o - TranslationModel/Scope3Parser/Parser.cpp - 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/Parser.cpp + TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual - TranslationModel/Scope3Parser/Parser.h + TranslationModel/UG/bin/darwin-4.2.1/release/link-static/threading-multi/TargetPhraseCollectionCache.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/Parser.h + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/bin/darwin-4.2.1/release/link-static/threading-multi/TargetPhraseCollectionCache.o - TranslationModel/Scope3Parser/SentenceMap.h + TranslationModel/UG/bin/darwin-4.2.1/release/link-static/threading-multi/mmsapt.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/SentenceMap.h + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/bin/darwin-4.2.1/release/link-static/threading-multi/mmsapt.o - TranslationModel/Scope3Parser/StackLattice.h + TranslationModel/UG/bin/darwin-4.2.1/release/link-static/threading-multi/mmsapt_align.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/StackLattice.h + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/bin/darwin-4.2.1/release/link-static/threading-multi/mmsapt_align.o - TranslationModel/Scope3Parser/StackLatticeBuilder.cpp - 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/StackLatticeBuilder.cpp + TranslationModel/UG/generic/bin/darwin-4.2.1/release/debug-symbols-on/link-static + 2 + virtual:/virtual - TranslationModel/Scope3Parser/StackLatticeBuilder.h - 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/StackLatticeBuilder.h + TranslationModel/UG/generic/bin/darwin-4.2.1/release/link-static/threading-multi + 2 + virtual:/virtual - TranslationModel/Scope3Parser/StackLatticeSearcher.h - 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/StackLatticeSearcher.h + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static + 2 + virtual:/virtual - TranslationModel/Scope3Parser/VarSpanNode.h - 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/VarSpanNode.h + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi + 2 + virtual:/virtual - TranslationModel/Scope3Parser/VarSpanTrieBuilder.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/BleuScoreFeature.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/VarSpanTrieBuilder.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/BleuScoreFeature.o - TranslationModel/Scope3Parser/VarSpanTrieBuilder.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/ConstrainedDecoding.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/Scope3Parser/VarSpanTrieBuilder.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/ConstrainedDecoding.o - TranslationModel/fuzzy-match/Alignments.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/ControlRecombination.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/Alignments.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/ControlRecombination.o - TranslationModel/fuzzy-match/Alignments.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/CountNonTerms.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/Alignments.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/CountNonTerms.o - TranslationModel/fuzzy-match/FuzzyMatchWrapper.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/CoveredReferenceFeature.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/FuzzyMatchWrapper.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/CoveredReferenceFeature.o - TranslationModel/fuzzy-match/FuzzyMatchWrapper.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/DecodeFeature.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/FuzzyMatchWrapper.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/DecodeFeature.o - TranslationModel/fuzzy-match/Match.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/DistortionScoreProducer.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/Match.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/DistortionScoreProducer.o - TranslationModel/fuzzy-match/SentenceAlignment.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/ExternalFeature.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/SentenceAlignment.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/ExternalFeature.o - TranslationModel/fuzzy-match/SentenceAlignment.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/FFState.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/SentenceAlignment.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/FFState.o - TranslationModel/fuzzy-match/SuffixArray.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/FeatureFunction.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/SuffixArray.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/FeatureFunction.o - TranslationModel/fuzzy-match/SuffixArray.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/GlobalLexicalModel.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/SuffixArray.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/GlobalLexicalModel.o - TranslationModel/fuzzy-match/Vocabulary.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/GlobalLexicalModelUnlimited.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/Vocabulary.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/GlobalLexicalModelUnlimited.o - TranslationModel/fuzzy-match/Vocabulary.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/HyperParameterAsWeight.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/Vocabulary.h + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/HyperParameterAsWeight.o - TranslationModel/fuzzy-match/create_xml.cpp + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/InputFeature.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/create_xml.cpp + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/InputFeature.o - TranslationModel/fuzzy-match/create_xml.h + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/InternalTree.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/fuzzy-match/create_xml.h - - - bin/BackwardTest.test/gcc-4.7 - 2 - virtual:/virtual + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/InternalTree.o - bin/gcc-4.7/release + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/LexicalReordering 2 virtual:/virtual - TranslationModel/CompactPT/bin/gcc-4.7 - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/MaxSpanFreeNonTermSource.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/MaxSpanFreeNonTermSource.o - TranslationModel/CompactPT/bin/pt.log + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/NieceTerminal.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/pt.log + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/NieceTerminal.o - bin/BackwardTest.test/gcc-4.7/release + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/OSM-Feature 2 virtual:/virtual - bin/gcc-4.7/release/debug-symbols-on - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/PhraseBoundaryFeature.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/PhraseBoundaryFeature.o - TranslationModel/CompactPT/bin/gcc-4.7/release - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/PhraseLengthFeature.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/PhraseLengthFeature.o - bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/PhraseOrientationFeature.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/PhraseOrientationFeature.o - bin/gcc-4.7/release/debug-symbols-on/link-static - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/PhrasePairFeature.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/PhrasePairFeature.o - TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/PhrasePenalty.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/PhrasePenalty.o - bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/ReferenceComparison.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/ReferenceComparison.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/RuleScope.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/RuleScope.o - TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SetSourcePhrase.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SetSourcePhrase.o - bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SkeletonChangeInput.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SkeletonChangeInput.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/AlignmentInfo.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SkeletonStatefulFF.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/AlignmentInfo.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SkeletonStatefulFF.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/AlignmentInfoCollection.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SkeletonStatelessFF.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/AlignmentInfoCollection.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SkeletonStatelessFF.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/AlignmentInfoTest.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SoftMatchingFeature.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/AlignmentInfoTest.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SoftMatchingFeature.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Backward.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SoftSourceSyntacticConstraintsFeature.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Backward.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SoftSourceSyntacticConstraintsFeature.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BackwardLMState.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SourceGHKMTreeInputMatchFeature.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BackwardLMState.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SourceGHKMTreeInputMatchFeature.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Base.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SourceWordDeletionFeature.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Base.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SourceWordDeletionFeature.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BitmapContainer.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SpanLength.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BitmapContainer.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SpanLength.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BleuScoreFeature.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SparseHieroReorderingFeature.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BleuScoreFeature.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SparseHieroReorderingFeature.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartCell.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SparseHieroReorderingFeatureTest.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartCell.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SparseHieroReorderingFeatureTest.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartCellCollection.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/StatefulFeatureFunction.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartCellCollection.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/StatefulFeatureFunction.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartHypothesis.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/StatelessFeatureFunction.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartHypothesis.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/StatelessFeatureFunction.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartHypothesisCollection.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SyntaxRHS.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartHypothesisCollection.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/SyntaxRHS.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartManager.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/TargetBigramFeature.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartManager.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/TargetBigramFeature.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartParser.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/TargetNgramFeature.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartParser.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/TargetNgramFeature.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartTranslationOptionList.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/TargetWordInsertionFeature.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartTranslationOptionList.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/TargetWordInsertionFeature.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartTranslationOptions.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/TreeStructureFeature.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartTranslationOptions.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/TreeStructureFeature.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartTrellisDetour.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/UnknownWordPenaltyProducer.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartTrellisDetour.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/UnknownWordPenaltyProducer.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartTrellisDetourQueue.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/WordPenaltyProducer.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartTrellisDetourQueue.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/WordPenaltyProducer.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartTrellisNode.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/WordTranslationFeature.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartTrellisNode.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/WordTranslationFeature.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartTrellisPath.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PP/CountsPhraseProperty.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ChartTrellisPath.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PP/CountsPhraseProperty.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ConfusionNet.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PP/Factory.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ConfusionNet.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PP/Factory.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/DecodeFeature.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PP/NonTermContextProperty.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/DecodeFeature.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PP/NonTermContextProperty.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/DecodeGraph.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PP/OrientationPhraseProperty.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/DecodeGraph.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PP/OrientationPhraseProperty.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/DecodeStep.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PP/PhraseProperty.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/DecodeStep.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PP/PhraseProperty.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/DecodeStepGeneration.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PP/SourceLabelsPhraseProperty.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/DecodeStepGeneration.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PP/SourceLabelsPhraseProperty.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/DecodeStepTranslation.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PP/SpanLengthPhraseProperty.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/DecodeStepTranslation.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/PP/SpanLengthPhraseProperty.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Dictionary.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/Cube.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Dictionary.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/Cube.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/DummyScoreProducers.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/CubeQueue.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/DummyScoreProducers.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/CubeQueue.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/FFState.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/KBestExtractor.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/FFState.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/KBestExtractor.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Factor.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/RuleTableFF.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Factor.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/RuleTableFF.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T + 2 + virtual:/virtual - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/FactorCollection.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/SHyperedge.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/FactorCollection.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/SHyperedge.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/FactorTypeSet.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/SVertex.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/FactorTypeSet.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/SVertex.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Factory.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/BilingualDynSuffixArray.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Factory.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/BilingualDynSuffixArray.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser + 2 + virtual:/virtual + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSAInclude + 2 + virtual:/virtual - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/FeatureFunction.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSuffixArray.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/FeatureFunction.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSuffixArray.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/FeatureVector.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionary.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/FeatureVector.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionary.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/FeatureVectorTest.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryDynSuffixArray.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/FeatureVectorTest.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryDynSuffixArray.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/File.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryMemory.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/File.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryMemory.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/FloydWarshall.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryMultiModel.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/FloydWarshall.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryMultiModel.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/GenerationDictionary.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryMultiModelCounts.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/GenerationDictionary.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryMultiModelCounts.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/GlobalLexicalModel.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryNodeMemory.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/GlobalLexicalModel.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryNodeMemory.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/GlobalLexicalModelUnlimited.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryScope3.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/GlobalLexicalModelUnlimited.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryScope3.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Hypothesis.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryTransliteration.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Hypothesis.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryTransliteration.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/HypothesisStack.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryTree.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/HypothesisStack.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryTree.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/HypothesisStackCubePruning.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryTreeAdaptor.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/HypothesisStackCubePruning.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryTreeAdaptor.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable + 2 + virtual:/virtual + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser + 2 + virtual:/virtual - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/HypothesisStackNormal.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/SkeletonPT.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/HypothesisStackNormal.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/SkeletonPT.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/IRST.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/WordCoocTable.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/IRST.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/WordCoocTable.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match + 2 + virtual:/virtual - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Implementation.o + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Backward.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Implementation.o + PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Backward.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Incremental.o + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BackwardLMState.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Incremental.o + PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BackwardLMState.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/InputFileStream.o + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BackwardTest 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/InputFileStream.o + PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BackwardTest - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/InputType.o + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BackwardTest.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/InputType.o + PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BackwardTest.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Joint.o + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BackwardTest.output 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Joint.o + PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BackwardTest.output - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Ken.o + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BackwardTest.run 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Ken.o + PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BackwardTest.run - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/LMList.o + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BackwardTest.test 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/LMList.o + PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BackwardTest.test - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/LVoc.o + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Base.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/LVoc.o + PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Base.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/LexicalReordering.o + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BilingualLM.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/LexicalReordering.o + PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/BilingualLM.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/LexicalReorderingState.o + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Implementation.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/LexicalReorderingState.o + PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Implementation.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/LexicalReorderingTable.o + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Joint.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/LexicalReorderingTable.o + PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Joint.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Manager.o + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Ken.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Manager.o + PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Ken.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/MockHypothesis.o + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MultiFactor.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/MockHypothesis.o + PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/MultiFactor.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/MosesTest.o + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Remote.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/MosesTest.o + PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Remote.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/MultiFactor.o + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SingleFactor.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/MultiFactor.o + PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SingleFactor.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/NonTerminal.o + LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SkeletonLM.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/NonTerminal.o + PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/SkeletonLM.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ORLM.o + TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/BlockHashIndex.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ORLM.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/BlockHashIndex.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PCNTools.o + TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/CmphStringVectorAdapter.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PCNTools.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/CmphStringVectorAdapter.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ParallelBackoff.o + TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/LexicalReorderingTableCompact.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ParallelBackoff.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/LexicalReorderingTableCompact.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Parameter.o + TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/LexicalReorderingTableCreator.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Parameter.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/LexicalReorderingTableCreator.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PartialTranslOptColl.o + TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/MurmurHash3.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PartialTranslOptColl.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/MurmurHash3.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Phrase.o + TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/PhraseDecoder.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Phrase.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/PhraseDecoder.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PhraseBoundaryFeature.o + TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/PhraseDictionaryCompact.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PhraseBoundaryFeature.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/PhraseDictionaryCompact.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PhraseLengthFeature.o + TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/PhraseTableCreator.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PhraseLengthFeature.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/PhraseTableCreator.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PhraseLengthFeatureTest.o + TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ThrowingFwrite.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PhraseLengthFeatureTest.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ThrowingFwrite.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PhrasePairFeature.o + TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/count-ptable-features 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PhrasePairFeature.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/count-ptable-features - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PrefixTreeMap.o + TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/count-ptable-features.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PrefixTreeMap.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/count-ptable-features.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Remote.o + TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mmsapt.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Remote.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mmsapt.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ReorderingConstraint.o + TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mmsapt_align.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ReorderingConstraint.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mmsapt_align.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ReorderingStack.o + TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ptable-describe-features 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ReorderingStack.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ptable-describe-features - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/RuleCube.o + TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ptable-describe-features.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/RuleCube.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ptable-describe-features.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/RuleCubeItem.o + TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ptable-lookup 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/RuleCubeItem.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ptable-lookup - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/RuleCubeQueue.o + TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ptable-lookup.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/RuleCubeQueue.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ptable-lookup.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SRI.o + TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/spe-check-coverage 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SRI.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/spe-check-coverage - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ScoreComponentCollection.o + TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/spe-check-coverage.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ScoreComponentCollection.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/spe-check-coverage.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ScoreComponentCollectionTest.o + TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/try-align 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ScoreComponentCollectionTest.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/try-align - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ScoreProducer.o + TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/try-align.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ScoreProducer.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/try-align.o + + + TranslationModel/UG/generic/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Search.o + TranslationModel/UG/generic/bin/darwin-4.2.1/release/link-static/threading-multi/ug_get_options.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Search.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/bin/darwin-4.2.1/release/link-static/threading-multi/ug_get_options.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SearchCubePruning.o + TranslationModel/UG/generic/bin/darwin-4.2.1/release/link-static/threading-multi/ug_splice_arglist.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SearchCubePruning.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/bin/darwin-4.2.1/release/link-static/threading-multi/ug_splice_arglist.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SearchNormal.o + TranslationModel/UG/generic/bin/darwin-4.2.1/release/link-static/threading-multi/ug_stream.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SearchNormal.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/bin/darwin-4.2.1/release/link-static/threading-multi/ug_stream.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SearchNormalBatch.o + TranslationModel/UG/generic/bin/darwin-4.2.1/release/link-static/threading-multi/ug_thread_pool.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SearchNormalBatch.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/bin/darwin-4.2.1/release/link-static/threading-multi/ug_thread_pool.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Sentence.o + TranslationModel/UG/generic/bin/darwin-4.2.1/release/link-static/threading-multi/ug_thread_safe_counter.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Sentence.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/bin/darwin-4.2.1/release/link-static/threading-multi/ug_thread_safe_counter.o + + + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi + 2 + virtual:/virtual - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SentenceStats.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/mmlex-build 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SentenceStats.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/mmlex-build - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SingleFactor.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/mmlex-build.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SingleFactor.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/mmlex-build.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SourceWordDeletionFeature.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/mtt-build 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SourceWordDeletionFeature.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/mtt-build - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SparsePhraseDictionaryFeature.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/mtt-build.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SparsePhraseDictionaryFeature.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/mtt-build.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SquareMatrix.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/num_read_write.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SquareMatrix.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/num_read_write.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/StaticData.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/symal2mam 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/StaticData.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/symal2mam - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TargetBigramFeature.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/symal2mam.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TargetBigramFeature.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/symal2mam.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TargetBigramFeatureTest.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/tpt_pickler.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TargetBigramFeatureTest.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/tpt_pickler.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TargetNgramFeature.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/tpt_tightindex.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TargetNgramFeature.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/tpt_tightindex.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TargetPhrase.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/tpt_tokenindex.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TargetPhrase.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/tpt_tokenindex.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TargetPhraseCollection.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_bitext.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TargetPhraseCollection.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_bitext.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TargetWordInsertionFeature.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_bitext_jstats.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TargetWordInsertionFeature.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_bitext_jstats.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ThreadPool.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_bitext_pstats.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ThreadPool.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_bitext_pstats.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Timer.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_conll_record.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Timer.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_conll_record.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel - 2 - virtual:/virtual + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_corpus_token.o + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_corpus_token.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationOption.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_deptree.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationOption.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_deptree.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationOptionCollection.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_http_client.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationOptionCollection.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_http_client.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationOptionCollectionConfusionNet.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_im_bitext.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationOptionCollectionConfusionNet.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_im_bitext.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationOptionCollectionText.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_lexical_reordering.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationOptionCollectionText.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_lexical_reordering.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationOptionList.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_load_primer.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationOptionList.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_load_primer.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationSystem.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_phrasepair.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationSystem.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_phrasepair.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TreeInput.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_sampling_bias.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TreeInput.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_sampling_bias.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TrellisPath.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_tsa_array_entry.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TrellisPath.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_tsa_array_entry.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TrellisPathCollection.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_ttrack_base.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TrellisPathCollection.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_ttrack_base.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/UserMessage.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_ttrack_position.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/UserMessage.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/link-static/threading-multi/ug_ttrack_position.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Util.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/LexicalReordering/LexicalReordering.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Util.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/LexicalReordering/LexicalReordering.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Word.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/LexicalReordering/LexicalReorderingState.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Word.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/LexicalReordering/LexicalReorderingState.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/WordLattice.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/LexicalReordering/LexicalReorderingTable.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/WordLattice.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/LexicalReordering/LexicalReorderingTable.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/WordTranslationFeature.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/LexicalReordering/ReorderingStack.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/WordTranslationFeature.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/LexicalReordering/ReorderingStack.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/WordsBitmap.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/LexicalReordering/SparseReordering.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/WordsBitmap.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/LexicalReordering/SparseReordering.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/WordsRange.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/OSM-Feature/KenOSM.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/WordsRange.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/OSM-Feature/KenOSM.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/XmlOption.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/OSM-Feature/OpSequenceModel.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/XmlOption.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/OSM-Feature/OpSequenceModel.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/libmoses.a + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/OSM-Feature/osmHyp.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/libmoses.a + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/FF/OSM-Feature/osmHyp.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/moses_test + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/DerivationWriter.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/moses_test + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/DerivationWriter.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/moses_test.passed + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/PChart.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/moses_test.passed + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/PChart.o - TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/Parsers 2 virtual:/virtual - bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Backward.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/RuleTrieCYKPlus.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Backward.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/RuleTrieCYKPlus.o - bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BackwardLMState.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/RuleTrieLoader.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BackwardLMState.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/RuleTrieLoader.o - bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BackwardTest + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/RuleTrieScope3.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BackwardTest + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/RuleTrieScope3.o - bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BackwardTest.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/SChart.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BackwardTest.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/SChart.o - bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BackwardTest.output + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerCYKPlus.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BackwardTest.output + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerCYKPlus.o - bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BackwardTest.run + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemory.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BackwardTest.run + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemory.o - bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BackwardTest.test + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemoryPerSentence.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BackwardTest.test + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemoryPerSentence.o - bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Base.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerOnDisk.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Base.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerOnDisk.o - bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Implementation.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Implementation.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerSkeleton.o - bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Joint.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/CompletedRuleCollection.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Joint.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/CompletedRuleCollection.o - bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Ken.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/DotChartInMemory.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Ken.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/DotChartInMemory.o - bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/MultiFactor.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/DotChartOnDisk.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/MultiFactor.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/DotChartOnDisk.o - bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Remote.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSAInclude/FileHandler.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/Remote.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSAInclude/FileHandler.o - bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SingleFactor.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSAInclude/params.o 1 - PARENT-3-PROJECT_LOC/moses/LM/bin/BackwardTest.test/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/SingleFactor.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSAInclude/params.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/BilingualDynSuffixArray.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSAInclude/vocab.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/BilingualDynSuffixArray.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSAInclude/vocab.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/LoaderCompact.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/LoaderCompact.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSAInclude - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/LoaderFactory.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/LoaderFactory.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSuffixArray.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/LoaderHiero.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSuffixArray.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/LoaderHiero.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionary.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/LoaderStandard.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionary.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/LoaderStandard.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryDynSuffixArray.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/PhraseDictionaryALSuffixArray.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryDynSuffixArray.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/PhraseDictionaryALSuffixArray.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryMemory.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/PhraseDictionaryFuzzyMatch.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryMemory.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/PhraseDictionaryFuzzyMatch.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryMultiModel.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/PhraseDictionaryOnDisk.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryMultiModel.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/PhraseDictionaryOnDisk.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryMultiModelCounts.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/Trie.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryMultiModelCounts.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/Trie.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryNode.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/UTrie.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryNode.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/UTrie.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryTree.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/UTrieNode.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryTree.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/UTrieNode.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryTreeAdaptor.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser/ApplicableRuleTrie.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/PhraseDictionaryTreeAdaptor.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser/ApplicableRuleTrie.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser/Parser.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser/Parser.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser/StackLatticeBuilder.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser/StackLatticeBuilder.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match - 2 - virtual:/virtual + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser/VarSpanTrieBuilder.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser/VarSpanTrieBuilder.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/Alignments.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/Alignments.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/FuzzyMatchWrapper.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/FuzzyMatchWrapper.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/SentenceAlignment.o + 1 + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/SentenceAlignment.o - TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BlockHashIndex.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/SuffixArray.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/BlockHashIndex.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/SuffixArray.o - TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/CmphStringVectorAdapter.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/Vocabulary.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/CmphStringVectorAdapter.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/Vocabulary.o - TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/LexicalReorderingTableCompact.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/create_xml.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/LexicalReorderingTableCompact.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/create_xml.o - TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/LexicalReorderingTableCreator.o + TranslationModel/UG/generic/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_get_options.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/LexicalReorderingTableCreator.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_get_options.o - TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/MurmurHash3.o + TranslationModel/UG/generic/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_splice_arglist.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/MurmurHash3.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_splice_arglist.o - TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PhraseDecoder.o + TranslationModel/UG/generic/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_stream.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PhraseDecoder.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_stream.o - TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PhraseDictionaryCompact.o + TranslationModel/UG/generic/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_thread_safe_counter.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PhraseDictionaryCompact.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/generic/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_thread_safe_counter.o - TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PhraseTableCreator.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/calc-coverage 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/PhraseTableCreator.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/calc-coverage - TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ThrowingFwrite.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/calc-coverage.o 1 - PARENT-3-PROJECT_LOC/moses/TranslationModel/CompactPT/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/ThrowingFwrite.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/calc-coverage.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerCYKPlus.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mam2symal 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerCYKPlus.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mam2symal - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemory.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mam2symal.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemory.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mam2symal.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemoryPerSentence.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mam_verify 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerMemoryPerSentence.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mam_verify - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerOnDisk.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mam_verify.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/ChartRuleLookupManagerOnDisk.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mam_verify.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/DotChartInMemory.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mmlex-build 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/DotChartInMemory.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mmlex-build - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/DotChartOnDisk.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mmlex-build.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/CYKPlusParser/DotChartOnDisk.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mmlex-build.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSAInclude/FileHandler.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mmlex-lookup 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSAInclude/FileHandler.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mmlex-lookup - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSAInclude/params.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mmlex-lookup.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSAInclude/params.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mmlex-lookup.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSAInclude/vocab.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mtt-build 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/DynSAInclude/vocab.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mtt-build - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/LoaderCompact.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mtt-build.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/LoaderCompact.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mtt-build.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/LoaderFactory.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mtt-count-words 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/LoaderFactory.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mtt-count-words - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/LoaderHiero.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mtt-count-words.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/LoaderHiero.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mtt-count-words.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/LoaderStandard.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mtt-demo1 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/LoaderStandard.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mtt-demo1 - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/PhraseDictionaryALSuffixArray.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mtt-demo1.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/PhraseDictionaryALSuffixArray.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mtt-demo1.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/PhraseDictionaryFuzzyMatch.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mtt-dump 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/PhraseDictionaryFuzzyMatch.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mtt-dump - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/PhraseDictionaryMemory.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mtt-dump.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/PhraseDictionaryMemory.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/mtt-dump.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/PhraseDictionaryNodeMemory.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/num_read_write.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/PhraseDictionaryNodeMemory.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/num_read_write.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/PhraseDictionaryOnDisk.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/symal2mam 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/PhraseDictionaryOnDisk.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/symal2mam - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/Trie.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/symal2mam.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/Trie.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/symal2mam.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/UTrie.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/tpt_pickler.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/UTrie.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/tpt_pickler.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/UTrieNode.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/tpt_tightindex.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/RuleTable/UTrieNode.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/tpt_tightindex.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser/ApplicableRuleTrie.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/tpt_tokenindex.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser/ApplicableRuleTrie.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/tpt_tokenindex.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser/Parser.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_bitext.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser/Parser.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_bitext.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser/StackLatticeBuilder.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_conll_record.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser/StackLatticeBuilder.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_conll_record.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser/VarSpanTrieBuilder.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_corpus_token.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/Scope3Parser/VarSpanTrieBuilder.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_corpus_token.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/Alignments.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_deptree.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/Alignments.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_deptree.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/FuzzyMatchWrapper.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_load_primer.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/FuzzyMatchWrapper.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_load_primer.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/SentenceAlignment.o + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_mmbitext.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/SentenceAlignment.o + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_mmbitext.o + + + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_phrasepair.o + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_phrasepair.o + + + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_tsa_array_entry.o + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_tsa_array_entry.o + + + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_ttrack_base.o + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_ttrack_base.o + + + TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_ttrack_position.o + 1 + PARENT-3-PROJECT_LOC/moses/TranslationModel/UG/mm/bin/darwin-4.2.1/release/debug-symbols-on/link-static/threading-multi/ug_ttrack_position.o + + + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/Parsers/Scope3Parser + 2 + virtual:/virtual - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/SuffixArray.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/Parsers/Scope3Parser/PatternApplicationTrie.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/SuffixArray.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/Parsers/Scope3Parser/PatternApplicationTrie.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/Vocabulary.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/Parsers/Scope3Parser/SymbolRangeCalculator.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/Vocabulary.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/Parsers/Scope3Parser/SymbolRangeCalculator.o - bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/create_xml.o + bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/Parsers/Scope3Parser/TailLatticeBuilder.o 1 - PARENT-3-PROJECT_LOC/moses/bin/gcc-4.7/release/debug-symbols-on/link-static/threading-multi/TranslationModel/fuzzy-match/create_xml.o + PARENT-3-PROJECT_LOC/moses/bin/gcc-4.8/release/debug-symbols-on/link-static/threading-multi/Syntax/S2T/Parsers/Scope3Parser/TailLatticeBuilder.o diff --git a/contrib/other-builds/moses/moses.project b/contrib/other-builds/moses/moses.project new file mode 100644 index 0000000000..2c78adc36c --- /dev/null +++ b/contrib/other-builds/moses/moses.project @@ -0,0 +1,903 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/moses2-cmd/.cproject b/contrib/other-builds/moses2-cmd/.cproject new file mode 100644 index 0000000000..9fd7f85e41 --- /dev/null +++ b/contrib/other-builds/moses2-cmd/.cproject @@ -0,0 +1,177 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/moses2-cmd/.project b/contrib/other-builds/moses2-cmd/.project new file mode 100644 index 0000000000..7b1b96ecca --- /dev/null +++ b/contrib/other-builds/moses2-cmd/.project @@ -0,0 +1,44 @@ + + + moses2-cmd + + + lm + moses + moses2 + probingpt + util + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + Main.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/Main.cpp + + + Main.h + 1 + PARENT-3-PROJECT_LOC/moses2/Main.h + + + diff --git a/contrib/other-builds/moses2/.cproject b/contrib/other-builds/moses2/.cproject new file mode 100644 index 0000000000..1e4a32e1d1 --- /dev/null +++ b/contrib/other-builds/moses2/.cproject @@ -0,0 +1,145 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/moses2/.project b/contrib/other-builds/moses2/.project new file mode 100644 index 0000000000..1588c88b62 --- /dev/null +++ b/contrib/other-builds/moses2/.project @@ -0,0 +1,1621 @@ + + + moses2 + + + moses + util + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + AlignmentInfo.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/AlignmentInfo.cpp + + + AlignmentInfo.h + 1 + PARENT-3-PROJECT_LOC/moses2/AlignmentInfo.h + + + AlignmentInfoCollection.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/AlignmentInfoCollection.cpp + + + AlignmentInfoCollection.h + 1 + PARENT-3-PROJECT_LOC/moses2/AlignmentInfoCollection.h + + + ArcLists.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/ArcLists.cpp + + + ArcLists.h + 1 + PARENT-3-PROJECT_LOC/moses2/ArcLists.h + + + Array.h + 1 + PARENT-3-PROJECT_LOC/moses2/Array.h + + + EstimatedScores.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/EstimatedScores.cpp + + + EstimatedScores.h + 1 + PARENT-3-PROJECT_LOC/moses2/EstimatedScores.h + + + FF + 2 + virtual:/virtual + + + HypothesisBase.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/HypothesisBase.cpp + + + HypothesisBase.h + 1 + PARENT-3-PROJECT_LOC/moses2/HypothesisBase.h + + + HypothesisColl.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/HypothesisColl.cpp + + + HypothesisColl.h + 1 + PARENT-3-PROJECT_LOC/moses2/HypothesisColl.h + + + InMemoryTrie + 2 + virtual:/virtual + + + InputPathBase.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/InputPathBase.cpp + + + InputPathBase.h + 1 + PARENT-3-PROJECT_LOC/moses2/InputPathBase.h + + + InputPathsBase.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/InputPathsBase.cpp + + + InputPathsBase.h + 1 + PARENT-3-PROJECT_LOC/moses2/InputPathsBase.h + + + InputType.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/InputType.cpp + + + InputType.h + 1 + PARENT-3-PROJECT_LOC/moses2/InputType.h + + + Jamfile + 1 + PARENT-3-PROJECT_LOC/moses2/Jamfile + + + LM + 2 + virtual:/virtual + + + Main.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/Main.cpp + + + ManagerBase.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/ManagerBase.cpp + + + ManagerBase.h + 1 + PARENT-3-PROJECT_LOC/moses2/ManagerBase.h + + + MemPool.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/MemPool.cpp + + + MemPool.h + 1 + PARENT-3-PROJECT_LOC/moses2/MemPool.h + + + MemPoolAllocator.h + 1 + PARENT-3-PROJECT_LOC/moses2/MemPoolAllocator.h + + + Phrase.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/Phrase.cpp + + + Phrase.h + 1 + PARENT-3-PROJECT_LOC/moses2/Phrase.h + + + PhraseBased + 2 + virtual:/virtual + + + PhraseImplTemplate.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseImplTemplate.h + + + Recycler.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/Recycler.cpp + + + Recycler.h + 1 + PARENT-3-PROJECT_LOC/moses2/Recycler.h + + + SCFG + 2 + virtual:/virtual + + + Scores.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/Scores.cpp + + + Scores.h + 1 + PARENT-3-PROJECT_LOC/moses2/Scores.h + + + SubPhrase.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SubPhrase.cpp + + + SubPhrase.h + 1 + PARENT-3-PROJECT_LOC/moses2/SubPhrase.h + + + System.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/System.cpp + + + System.h + 1 + PARENT-3-PROJECT_LOC/moses2/System.h + + + TargetPhrase.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/TargetPhrase.cpp + + + TargetPhrase.h + 1 + PARENT-3-PROJECT_LOC/moses2/TargetPhrase.h + + + TranslationModel + 2 + virtual:/virtual + + + TranslationTask.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationTask.cpp + + + TranslationTask.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationTask.h + + + TrellisPaths.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/TrellisPaths.cpp + + + TrellisPaths.h + 1 + PARENT-3-PROJECT_LOC/moses2/TrellisPaths.h + + + TypeDef.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/TypeDef.cpp + + + TypeDef.h + 1 + PARENT-3-PROJECT_LOC/moses2/TypeDef.h + + + Vector.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/Vector.cpp + + + Vector.h + 1 + PARENT-3-PROJECT_LOC/moses2/Vector.h + + + Weights.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/Weights.cpp + + + Weights.h + 1 + PARENT-3-PROJECT_LOC/moses2/Weights.h + + + Word.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/Word.cpp + + + Word.h + 1 + PARENT-3-PROJECT_LOC/moses2/Word.h + + + defer + 2 + virtual:/virtual + + + legacy + 2 + virtual:/virtual + + + parameters + 2 + virtual:/virtual + + + pugiconfig.hpp + 1 + PARENT-3-PROJECT_LOC/moses2/pugiconfig.hpp + + + pugixml.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/pugixml.cpp + + + pugixml.hpp + 1 + PARENT-3-PROJECT_LOC/moses2/pugixml.hpp + + + server + 2 + virtual:/virtual + + + FF/Distortion.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/Distortion.cpp + + + FF/Distortion.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/Distortion.h + + + FF/ExampleStatefulFF.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/ExampleStatefulFF.cpp + + + FF/ExampleStatefulFF.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/ExampleStatefulFF.h + + + FF/ExampleStatelessFF.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/ExampleStatelessFF.cpp + + + FF/ExampleStatelessFF.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/ExampleStatelessFF.h + + + FF/FFState.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/FFState.cpp + + + FF/FFState.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/FFState.h + + + FF/FeatureFunction.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/FeatureFunction.cpp + + + FF/FeatureFunction.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/FeatureFunction.h + + + FF/FeatureFunctions.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/FeatureFunctions.cpp + + + FF/FeatureFunctions.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/FeatureFunctions.h + + + FF/FeatureRegistry.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/FeatureRegistry.cpp + + + FF/FeatureRegistry.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/FeatureRegistry.h + + + FF/LexicalReordering + 2 + virtual:/virtual + + + FF/OSM + 2 + virtual:/virtual + + + FF/PhrasePenalty.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/PhrasePenalty.cpp + + + FF/PhrasePenalty.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/PhrasePenalty.h + + + FF/PointerState.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/PointerState.cpp + + + FF/PointerState.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/PointerState.h + + + FF/StatefulFeatureFunction.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/StatefulFeatureFunction.cpp + + + FF/StatefulFeatureFunction.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/StatefulFeatureFunction.h + + + FF/StatelessFeatureFunction.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/StatelessFeatureFunction.cpp + + + FF/StatelessFeatureFunction.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/StatelessFeatureFunction.h + + + FF/WordPenalty.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/WordPenalty.cpp + + + FF/WordPenalty.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/WordPenalty.h + + + InMemoryTrie/InMemoryTrie.h + 1 + PARENT-3-PROJECT_LOC/moses2/InMemoryTrie/InMemoryTrie.h + + + InMemoryTrie/Node.h + 1 + PARENT-3-PROJECT_LOC/moses2/InMemoryTrie/Node.h + + + InMemoryTrie/utils.h + 1 + PARENT-3-PROJECT_LOC/moses2/InMemoryTrie/utils.h + + + LM/GPULM.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/LM/GPULM.cpp + + + LM/GPULM.h + 1 + PARENT-3-PROJECT_LOC/moses2/LM/GPULM.h + + + LM/KENLM.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/LM/KENLM.cpp + + + LM/KENLM.h + 1 + PARENT-3-PROJECT_LOC/moses2/LM/KENLM.h + + + LM/KENLMBatch.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/LM/KENLMBatch.cpp + + + LM/KENLMBatch.h + 1 + PARENT-3-PROJECT_LOC/moses2/LM/KENLMBatch.h + + + LM/LanguageModel.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/LM/LanguageModel.cpp + + + LM/LanguageModel.h + 1 + PARENT-3-PROJECT_LOC/moses2/LM/LanguageModel.h + + + PhraseBased/CubePruningMiniStack + 2 + virtual:/virtual + + + PhraseBased/Hypothesis.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/Hypothesis.cpp + + + PhraseBased/Hypothesis.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/Hypothesis.h + + + PhraseBased/InputPath.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/InputPath.cpp + + + PhraseBased/InputPath.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/InputPath.h + + + PhraseBased/InputPaths.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/InputPaths.cpp + + + PhraseBased/InputPaths.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/InputPaths.h + + + PhraseBased/Manager.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/Manager.cpp + + + PhraseBased/Manager.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/Manager.h + + + PhraseBased/Normal + 2 + virtual:/virtual + + + PhraseBased/PhraseImpl.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/PhraseImpl.cpp + + + PhraseBased/PhraseImpl.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/PhraseImpl.h + + + PhraseBased/ReorderingConstraint.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/ReorderingConstraint.cpp + + + PhraseBased/ReorderingConstraint.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/ReorderingConstraint.h + + + PhraseBased/Search.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/Search.cpp + + + PhraseBased/Search.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/Search.h + + + PhraseBased/Sentence.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/Sentence.cpp + + + PhraseBased/Sentence.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/Sentence.h + + + PhraseBased/TargetPhraseImpl.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/TargetPhraseImpl.cpp + + + PhraseBased/TargetPhraseImpl.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/TargetPhraseImpl.h + + + PhraseBased/TargetPhrases.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/TargetPhrases.cpp + + + PhraseBased/TargetPhrases.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/TargetPhrases.h + + + PhraseBased/TrellisPath.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/TrellisPath.cpp + + + PhraseBased/TrellisPath.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/TrellisPath.h + + + SCFG/ActiveChart.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/ActiveChart.cpp + + + SCFG/ActiveChart.h + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/ActiveChart.h + + + SCFG/Hypothesis.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/Hypothesis.cpp + + + SCFG/Hypothesis.h + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/Hypothesis.h + + + SCFG/InputPath.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/InputPath.cpp + + + SCFG/InputPath.h + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/InputPath.h + + + SCFG/InputPaths.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/InputPaths.cpp + + + SCFG/InputPaths.h + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/InputPaths.h + + + SCFG/Manager.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/Manager.cpp + + + SCFG/Manager.h + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/Manager.h + + + SCFG/Misc.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/Misc.cpp + + + SCFG/Misc.h + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/Misc.h + + + SCFG/PhraseImpl.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/PhraseImpl.cpp + + + SCFG/PhraseImpl.h + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/PhraseImpl.h + + + SCFG/Sentence.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/Sentence.cpp + + + SCFG/Sentence.h + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/Sentence.h + + + SCFG/Stack.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/Stack.cpp + + + SCFG/Stack.h + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/Stack.h + + + SCFG/Stacks.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/Stacks.cpp + + + SCFG/Stacks.h + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/Stacks.h + + + SCFG/TargetPhraseImpl.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/TargetPhraseImpl.cpp + + + SCFG/TargetPhraseImpl.h + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/TargetPhraseImpl.h + + + SCFG/TargetPhrases.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/TargetPhrases.cpp + + + SCFG/TargetPhrases.h + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/TargetPhrases.h + + + SCFG/Word.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/Word.cpp + + + SCFG/Word.h + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/Word.h + + + SCFG/nbest + 2 + virtual:/virtual + + + TranslationModel/CompactPT + 2 + virtual:/virtual + + + TranslationModel/Memory + 2 + virtual:/virtual + + + TranslationModel/PhraseTable.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/PhraseTable.cpp + + + TranslationModel/PhraseTable.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/PhraseTable.h + + + TranslationModel/ProbingPT.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/ProbingPT.cpp + + + TranslationModel/ProbingPT.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/ProbingPT.h + + + TranslationModel/Transliteration.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/Transliteration.cpp + + + TranslationModel/Transliteration.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/Transliteration.h + + + TranslationModel/UnknownWordPenalty.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/UnknownWordPenalty.cpp + + + TranslationModel/UnknownWordPenalty.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/UnknownWordPenalty.h + + + defer/CubePruningBitmapStack + 2 + virtual:/virtual + + + defer/CubePruningCardinalStack + 2 + virtual:/virtual + + + defer/CubePruningPerBitmap + 2 + virtual:/virtual + + + defer/CubePruningPerMiniStack + 2 + virtual:/virtual + + + legacy/Bitmap.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/Bitmap.cpp + + + legacy/Bitmap.h + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/Bitmap.h + + + legacy/Bitmaps.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/Bitmaps.cpp + + + legacy/Bitmaps.h + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/Bitmaps.h + + + legacy/Factor.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/Factor.cpp + + + legacy/Factor.h + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/Factor.h + + + legacy/FactorCollection.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/FactorCollection.cpp + + + legacy/FactorCollection.h + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/FactorCollection.h + + + legacy/InputFileStream.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/InputFileStream.cpp + + + legacy/InputFileStream.h + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/InputFileStream.h + + + legacy/Matrix.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/Matrix.cpp + + + legacy/Matrix.h + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/Matrix.h + + + legacy/OutputCollector.h + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/OutputCollector.h + + + legacy/OutputFileStream.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/OutputFileStream.cpp + + + legacy/OutputFileStream.h + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/OutputFileStream.h + + + legacy/Parameter.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/Parameter.cpp + + + legacy/Parameter.h + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/Parameter.h + + + legacy/Range.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/Range.cpp + + + legacy/Range.h + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/Range.h + + + legacy/ThreadPool.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/ThreadPool.cpp + + + legacy/ThreadPool.h + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/ThreadPool.h + + + legacy/Timer.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/Timer.cpp + + + legacy/Timer.h + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/Timer.h + + + legacy/Util2.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/Util2.cpp + + + legacy/Util2.h + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/Util2.h + + + legacy/gzfilebuf.h + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/gzfilebuf.h + + + legacy/xmlrpc-c.h + 1 + PARENT-3-PROJECT_LOC/moses2/legacy/xmlrpc-c.h + + + parameters/AllOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/AllOptions.cpp + + + parameters/AllOptions.h + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/AllOptions.h + + + parameters/BeamSearchOptions.h + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/BeamSearchOptions.h + + + parameters/BookkeepingOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/BookkeepingOptions.cpp + + + parameters/BookkeepingOptions.h + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/BookkeepingOptions.h + + + parameters/ContextParameters.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/ContextParameters.cpp + + + parameters/ContextParameters.h + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/ContextParameters.h + + + parameters/CubePruningOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/CubePruningOptions.cpp + + + parameters/CubePruningOptions.h + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/CubePruningOptions.h + + + parameters/InputOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/InputOptions.cpp + + + parameters/InputOptions.h + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/InputOptions.h + + + parameters/LMBR_Options.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/LMBR_Options.cpp + + + parameters/LMBR_Options.h + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/LMBR_Options.h + + + parameters/LookupOptions.h + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/LookupOptions.h + + + parameters/MBR_Options.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/MBR_Options.cpp + + + parameters/MBR_Options.h + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/MBR_Options.h + + + parameters/NBestOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/NBestOptions.cpp + + + parameters/NBestOptions.h + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/NBestOptions.h + + + parameters/OOVHandlingOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/OOVHandlingOptions.cpp + + + parameters/OOVHandlingOptions.h + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/OOVHandlingOptions.h + + + parameters/OptionsBaseClass.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/OptionsBaseClass.cpp + + + parameters/OptionsBaseClass.h + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/OptionsBaseClass.h + + + parameters/ReorderingOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/ReorderingOptions.cpp + + + parameters/ReorderingOptions.h + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/ReorderingOptions.h + + + parameters/ReportingOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/ReportingOptions.cpp + + + parameters/ReportingOptions.h + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/ReportingOptions.h + + + parameters/SearchOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/SearchOptions.cpp + + + parameters/SearchOptions.h + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/SearchOptions.h + + + parameters/ServerOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/ServerOptions.cpp + + + parameters/ServerOptions.h + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/ServerOptions.h + + + parameters/SyntaxOptions.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/SyntaxOptions.cpp + + + parameters/SyntaxOptions.h + 1 + PARENT-3-PROJECT_LOC/moses2/parameters/SyntaxOptions.h + + + server/Server.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/server/Server.cpp + + + server/Server.h + 1 + PARENT-3-PROJECT_LOC/moses2/server/Server.h + + + server/TranslationRequest.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/server/TranslationRequest.cpp + + + server/TranslationRequest.h + 1 + PARENT-3-PROJECT_LOC/moses2/server/TranslationRequest.h + + + server/Translator.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/server/Translator.cpp + + + server/Translator.h + 1 + PARENT-3-PROJECT_LOC/moses2/server/Translator.h + + + FF/LexicalReordering/BidirectionalReorderingState.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/LexicalReordering/BidirectionalReorderingState.cpp + + + FF/LexicalReordering/BidirectionalReorderingState.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/LexicalReordering/BidirectionalReorderingState.h + + + FF/LexicalReordering/HReorderingBackwardState.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/LexicalReordering/HReorderingBackwardState.cpp + + + FF/LexicalReordering/HReorderingBackwardState.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/LexicalReordering/HReorderingBackwardState.h + + + FF/LexicalReordering/HReorderingForwardState.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/LexicalReordering/HReorderingForwardState.cpp + + + FF/LexicalReordering/HReorderingForwardState.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/LexicalReordering/HReorderingForwardState.h + + + FF/LexicalReordering/LRModel.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/LexicalReordering/LRModel.cpp + + + FF/LexicalReordering/LRModel.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/LexicalReordering/LRModel.h + + + FF/LexicalReordering/LRState.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/LexicalReordering/LRState.cpp + + + FF/LexicalReordering/LRState.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/LexicalReordering/LRState.h + + + FF/LexicalReordering/LexicalReordering.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/LexicalReordering/LexicalReordering.cpp + + + FF/LexicalReordering/LexicalReordering.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/LexicalReordering/LexicalReordering.h + + + FF/LexicalReordering/PhraseBasedReorderingState.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/LexicalReordering/PhraseBasedReorderingState.cpp + + + FF/LexicalReordering/PhraseBasedReorderingState.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/LexicalReordering/PhraseBasedReorderingState.h + + + FF/LexicalReordering/ReorderingStack.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/LexicalReordering/ReorderingStack.cpp + + + FF/LexicalReordering/ReorderingStack.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/LexicalReordering/ReorderingStack.h + + + FF/OSM/KenOSM.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/OSM/KenOSM.cpp + + + FF/OSM/KenOSM.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/OSM/KenOSM.h + + + FF/OSM/OpSequenceModel.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/OSM/OpSequenceModel.cpp + + + FF/OSM/OpSequenceModel.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/OSM/OpSequenceModel.h + + + FF/OSM/osmHyp.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/FF/OSM/osmHyp.cpp + + + FF/OSM/osmHyp.h + 1 + PARENT-3-PROJECT_LOC/moses2/FF/OSM/osmHyp.h + + + PhraseBased/CubePruningMiniStack/Misc.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/CubePruningMiniStack/Misc.cpp + + + PhraseBased/CubePruningMiniStack/Misc.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/CubePruningMiniStack/Misc.h + + + PhraseBased/CubePruningMiniStack/Search.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/CubePruningMiniStack/Search.cpp + + + PhraseBased/CubePruningMiniStack/Search.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/CubePruningMiniStack/Search.h + + + PhraseBased/CubePruningMiniStack/Stack.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/CubePruningMiniStack/Stack.cpp + + + PhraseBased/CubePruningMiniStack/Stack.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/CubePruningMiniStack/Stack.h + + + PhraseBased/Normal/Search.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/Normal/Search.cpp + + + PhraseBased/Normal/Search.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/Normal/Search.h + + + PhraseBased/Normal/Stack.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/Normal/Stack.cpp + + + PhraseBased/Normal/Stack.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/Normal/Stack.h + + + PhraseBased/Normal/Stacks.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/Normal/Stacks.cpp + + + PhraseBased/Normal/Stacks.h + 1 + PARENT-3-PROJECT_LOC/moses2/PhraseBased/Normal/Stacks.h + + + SCFG/nbest/KBestExtractor.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/nbest/KBestExtractor.cpp + + + SCFG/nbest/KBestExtractor.h + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/nbest/KBestExtractor.h + + + SCFG/nbest/NBest.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/nbest/NBest.cpp + + + SCFG/nbest/NBest.h + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/nbest/NBest.h + + + SCFG/nbest/NBestColl.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/nbest/NBestColl.cpp + + + SCFG/nbest/NBestColl.h + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/nbest/NBestColl.h + + + SCFG/nbest/NBests.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/nbest/NBests.cpp + + + SCFG/nbest/NBests.h + 1 + PARENT-3-PROJECT_LOC/moses2/SCFG/nbest/NBests.h + + + TranslationModel/CompactPT/BlockHashIndex.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/BlockHashIndex.cpp + + + TranslationModel/CompactPT/BlockHashIndex.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/BlockHashIndex.h + + + TranslationModel/CompactPT/CanonicalHuffman.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/CanonicalHuffman.h + + + TranslationModel/CompactPT/CmphStringVectorAdapter.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/CmphStringVectorAdapter.cpp + + + TranslationModel/CompactPT/CmphStringVectorAdapter.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/CmphStringVectorAdapter.h + + + TranslationModel/CompactPT/LexicalReorderingTableCompact.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/LexicalReorderingTableCompact.cpp + + + TranslationModel/CompactPT/LexicalReorderingTableCompact.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/LexicalReorderingTableCompact.h + + + TranslationModel/CompactPT/ListCoders.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/ListCoders.h + + + TranslationModel/CompactPT/MmapAllocator.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/MmapAllocator.h + + + TranslationModel/CompactPT/MonotonicVector.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/MonotonicVector.h + + + TranslationModel/CompactPT/MurmurHash3.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/MurmurHash3.cpp + + + TranslationModel/CompactPT/MurmurHash3.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/MurmurHash3.h + + + TranslationModel/CompactPT/PackedArray.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/PackedArray.h + + + TranslationModel/CompactPT/StringVector.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/StringVector.h + + + TranslationModel/CompactPT/TargetPhraseCollectionCache.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/TargetPhraseCollectionCache.cpp + + + TranslationModel/CompactPT/TargetPhraseCollectionCache.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/TargetPhraseCollectionCache.h + + + TranslationModel/CompactPT/ThrowingFwrite.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/ThrowingFwrite.cpp + + + TranslationModel/CompactPT/ThrowingFwrite.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/CompactPT/ThrowingFwrite.h + + + TranslationModel/Memory/Node.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/Memory/Node.h + + + TranslationModel/Memory/PhraseTableMemory.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/Memory/PhraseTableMemory.cpp + + + TranslationModel/Memory/PhraseTableMemory.h + 1 + PARENT-3-PROJECT_LOC/moses2/TranslationModel/Memory/PhraseTableMemory.h + + + defer/CubePruningBitmapStack/Misc.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningBitmapStack/Misc.cpp + + + defer/CubePruningBitmapStack/Misc.h + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningBitmapStack/Misc.h + + + defer/CubePruningBitmapStack/Search.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningBitmapStack/Search.cpp + + + defer/CubePruningBitmapStack/Search.h + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningBitmapStack/Search.h + + + defer/CubePruningBitmapStack/Stack.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningBitmapStack/Stack.cpp + + + defer/CubePruningBitmapStack/Stack.h + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningBitmapStack/Stack.h + + + defer/CubePruningCardinalStack/Misc.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningCardinalStack/Misc.cpp + + + defer/CubePruningCardinalStack/Misc.h + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningCardinalStack/Misc.h + + + defer/CubePruningCardinalStack/Search.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningCardinalStack/Search.cpp + + + defer/CubePruningCardinalStack/Search.h + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningCardinalStack/Search.h + + + defer/CubePruningCardinalStack/Stack.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningCardinalStack/Stack.cpp + + + defer/CubePruningCardinalStack/Stack.h + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningCardinalStack/Stack.h + + + defer/CubePruningPerBitmap/Misc.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningPerBitmap/Misc.cpp + + + defer/CubePruningPerBitmap/Misc.h + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningPerBitmap/Misc.h + + + defer/CubePruningPerBitmap/Search.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningPerBitmap/Search.cpp + + + defer/CubePruningPerBitmap/Search.h + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningPerBitmap/Search.h + + + defer/CubePruningPerBitmap/Stacks.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningPerBitmap/Stacks.cpp + + + defer/CubePruningPerBitmap/Stacks.h + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningPerBitmap/Stacks.h + + + defer/CubePruningPerMiniStack/Misc.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningPerMiniStack/Misc.cpp + + + defer/CubePruningPerMiniStack/Misc.h + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningPerMiniStack/Misc.h + + + defer/CubePruningPerMiniStack/Search.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningPerMiniStack/Search.cpp + + + defer/CubePruningPerMiniStack/Search.h + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningPerMiniStack/Search.h + + + defer/CubePruningPerMiniStack/Stacks.cpp + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningPerMiniStack/Stacks.cpp + + + defer/CubePruningPerMiniStack/Stacks.h + 1 + PARENT-3-PROJECT_LOC/moses2/defer/CubePruningPerMiniStack/Stacks.h + + + diff --git a/contrib/other-builds/moses2/moses2.sln b/contrib/other-builds/moses2/moses2.sln new file mode 100644 index 0000000000..053c000df4 --- /dev/null +++ b/contrib/other-builds/moses2/moses2.sln @@ -0,0 +1,43 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.9.34607.119 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "moses2", "moses2.vcxproj", "{B4304E97-D37F-4022-BD03-841A4FAEE398}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Debug|x64 = Debug|x64 + Debug-exe|Win32 = Debug-exe|Win32 + Debug-exe|x64 = Debug-exe|x64 + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + Release-exe|Win32 = Release-exe|Win32 + Release-exe|x64 = Release-exe|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {B4304E97-D37F-4022-BD03-841A4FAEE398}.Debug|Win32.ActiveCfg = Debug|Win32 + {B4304E97-D37F-4022-BD03-841A4FAEE398}.Debug|Win32.Build.0 = Debug|Win32 + {B4304E97-D37F-4022-BD03-841A4FAEE398}.Debug|x64.ActiveCfg = Debug|x64 + {B4304E97-D37F-4022-BD03-841A4FAEE398}.Debug|x64.Build.0 = Debug|x64 + {B4304E97-D37F-4022-BD03-841A4FAEE398}.Debug-exe|Win32.ActiveCfg = Debug-exe|x64 + {B4304E97-D37F-4022-BD03-841A4FAEE398}.Debug-exe|Win32.Build.0 = Debug-exe|x64 + {B4304E97-D37F-4022-BD03-841A4FAEE398}.Debug-exe|x64.ActiveCfg = Debug-exe|x64 + {B4304E97-D37F-4022-BD03-841A4FAEE398}.Debug-exe|x64.Build.0 = Debug-exe|x64 + {B4304E97-D37F-4022-BD03-841A4FAEE398}.Release|Win32.ActiveCfg = Release|Win32 + {B4304E97-D37F-4022-BD03-841A4FAEE398}.Release|Win32.Build.0 = Release|Win32 + {B4304E97-D37F-4022-BD03-841A4FAEE398}.Release|x64.ActiveCfg = Release|x64 + {B4304E97-D37F-4022-BD03-841A4FAEE398}.Release|x64.Build.0 = Release|x64 + {B4304E97-D37F-4022-BD03-841A4FAEE398}.Release-exe|Win32.ActiveCfg = Release-exe|x64 + {B4304E97-D37F-4022-BD03-841A4FAEE398}.Release-exe|Win32.Build.0 = Release-exe|x64 + {B4304E97-D37F-4022-BD03-841A4FAEE398}.Release-exe|x64.ActiveCfg = Release-exe|x64 + {B4304E97-D37F-4022-BD03-841A4FAEE398}.Release-exe|x64.Build.0 = Release-exe|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {8B10AABC-E114-4EB7-BE1E-9432E208DDEA} + EndGlobalSection +EndGlobal diff --git a/contrib/other-builds/moses2/moses2.vcxproj b/contrib/other-builds/moses2/moses2.vcxproj new file mode 100644 index 0000000000..df1fc34271 --- /dev/null +++ b/contrib/other-builds/moses2/moses2.vcxproj @@ -0,0 +1,592 @@ + + + + + Debug-exe2 + x64 + + + Debug-exe + x64 + + + Debug + x64 + + + Release-exe + x64 + + + Release + x64 + + + + {B4304E97-D37F-4022-BD03-841A4FAEE398} + Win32Proj + moses2 + 10.0.18362.0 + v140 + c:\depot\translator\packages\boost.library\1.66.0 + c:\depot\translator\private\mt\zlib\src + + + + DynamicLibrary + true + Unicode + false + false + + + Application + true + Unicode + false + false + + + Application + true + Unicode + false + false + + + DynamicLibrary + true + Unicode + false + false + + + DynamicLibrary + false + true + Unicode + + + Application + false + true + Unicode + + + DynamicLibrary + false + true + Unicode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + $(ProjectName)decoder + + + true + $(ProjectName)decoder + + + true + $(ProjectName)decoder + + + true + $(ProjectName)decoder + + + false + $(ProjectName)decoder + + + false + $(ProjectName)decoder + + + false + $(ProjectName)decoder + + + + + + Level3 + Disabled + NO_COMPACT_TABLES;HAVE_CMPHXXX;MAX_NUM_FACTORS=4;KENLM_MAX_ORDER=6;_USE_MATH_DEFINES;NOMINMAX;WITH_THREADS;NO_PIPES;_WIN32;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + $(ZlibDir);$(BoostDir);$(MSBuildProjectDirectory)/../../..;C:\Program Files (x86)\Visual Leak Detector\include;C:\depot\translator\private\mt\mman;%(AdditionalIncludeDirectories) + MultiThreadedDebugDLL + $(IntDir)\%(RelativeDir)\%(Filename).obj + false + false + Default + + + ProgramDatabase + false + + + true + + + Console + true + $(BoostDir)\lib64-msvc-14.0;$(ZlibDir)\dll\bin\x64\Debug;C:\Program Files (x86)\Visual Leak Detector\lib\Win64 + %(AdditionalDependencies) + LinkVerbose + false + + + + + + + Level3 + Disabled + NO_COMPACT_TABLES;HAVE_CMPHXXX;MAX_NUM_FACTORS=4;KENLM_MAX_ORDER=6;_USE_MATH_DEFINES;NOMINMAX;WITH_THREADS;NO_PIPES;_WIN32;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + $(ZlibDir);$(BoostDir);$(MSBuildProjectDirectory)/../../..;C:\Program Files (x86)\Visual Leak Detector\include;C:\depot\translator\private\mt\mman;%(AdditionalIncludeDirectories) + MultiThreadedDebugDLL + $(IntDir)\%(RelativeDir)\%(Filename).obj + false + false + Default + + + ProgramDatabase + false + + + true + + + Console + true + $(BoostDir)\lib64-msvc-14.0;$(ZlibDir)\dll\bin\x64\Debug;C:\Program Files (x86)\Visual Leak Detector\lib\Win64 + %(AdditionalDependencies) + LinkVerbose + false + + + + + + + Level3 + Disabled + NO_COMPACT_TABLES;HAVE_CMPHXXX;MAX_NUM_FACTORS=4;KENLM_MAX_ORDER=6;_USE_MATH_DEFINES;NOMINMAX;WITH_THREADS;NO_PIPES;_WIN32;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + $(ZlibDir);$(BoostDir);$(MSBuildProjectDirectory)/../../..;C:\Program Files (x86)\Visual Leak Detector\include;C:\depot\translator\private\mt\mman;%(AdditionalIncludeDirectories) + MultiThreadedDebugDLL + $(IntDir)\%(RelativeDir)\%(Filename).obj + false + false + Default + + + ProgramDatabase + false + + + true + + + Console + true + $(BoostDir)\lib64-msvc-14.0;$(ZlibDir)\dll\bin\x64\Debug;C:\Program Files (x86)\Visual Leak Detector\lib\Win64 + %(AdditionalDependencies) + LinkVerbose + false + + + + + + + Level3 + Disabled + NO_COMPACT_TABLES;HAVE_CMPHXXX;MAX_NUM_FACTORS=4;KENLM_MAX_ORDER=6;_USE_MATH_DEFINES;NOMINMAX;WITH_THREADS;NO_PIPES;_WIN32;WIN32;_DEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + $(ZlibDir);$(BoostDir);$(MSBuildProjectDirectory)/../../..;C:\Program Files (x86)\Visual Leak Detector\include;C:\depot\translator\private\mt\mman;%(AdditionalIncludeDirectories) + MultiThreadedDebugDLL + $(IntDir)\%(RelativeDir)\%(Filename).obj + false + false + Default + + + ProgramDatabase + false + + + true + + + Console + true + $(BoostDir)\lib64-msvc-14.0;$(ZlibDir)\dll\bin\x64\Debug;C:\Program Files (x86)\Visual Leak Detector\lib\Win64 + %(AdditionalDependencies) + LinkVerbose + false + + + + + Level3 + + + MaxSpeed + true + true + NO_COMPACT_TABLES;HAVE_CMPHXXX;MAX_NUM_FACTORS=4;KENLM_MAX_ORDER=6;_USE_MATH_DEFINES;NOMINMAX;WITH_THREADS;NO_PIPES;_WIN32;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + $(ZlibDir);$(BoostDir);$(MSBuildProjectDirectory)/../../..;C:\Program Files (x86)\Visual Leak Detector\include;C:\depot\translator\private\mt\mman;%(AdditionalIncludeDirectories) + MultiThreadedDLL + $(IntDir)\%(RelativeDir)\%(Filename).obj + false + Default + ProgramDatabase + true + + + Console + true + true + true + $(BoostDir)\lib64-msvc-14.0;$(ZlibDir)\dll\bin\x64\Debug;C:\Program Files (x86)\Visual Leak Detector\lib\Win64 + %(AdditionalDependencies) + + + + + Level3 + + + MaxSpeed + true + true + NO_COMPACT_TABLES;HAVE_CMPHXXX;MAX_NUM_FACTORS=4;KENLM_MAX_ORDER=6;_USE_MATH_DEFINES;NOMINMAX;WITH_THREADS;NO_PIPES;_WIN32;WIN32;NDEBUG;_CONSOLE;_LIB;%(PreprocessorDefinitions) + $(ZlibDir);$(BoostDir);$(MSBuildProjectDirectory)/../../..;C:\Program Files (x86)\Visual Leak Detector\include;C:\depot\translator\private\mt\mman;%(AdditionalIncludeDirectories) + MultiThreadedDLL + $(IntDir)\%(RelativeDir)\%(Filename).obj + false + Default + ProgramDatabase + true + + + Console + true + true + true + $(BoostDir)\lib64-msvc-14.0;$(ZlibDir)\dll\bin\x64\Debug;C:\Program Files (x86)\Visual Leak Detector\lib\Win64 + %(AdditionalDependencies) + + + + + Level3 + + + MaxSpeed + true + true + NO_COMPACT_TABLES;HAVE_CMPHXXX;MAX_NUM_FACTORS=4;KENLM_MAX_ORDER=6;_USE_MATH_DEFINES;NOMINMAX;WITH_THREADS;NO_PIPES;_WIN32;WIN32;NDEBUG;_CONSOLE;_LIB;NO_PROBING_PT;%(PreprocessorDefinitions) + $(ZlibDir);$(BoostDir);$(MSBuildProjectDirectory)/../../..;%(AdditionalIncludeDirectories) + MultiThreaded + $(IntDir)\%(RelativeDir)\%(Filename).obj + false + Default + ProgramDatabase + true + + + Console + true + true + true + $(BoostDir)\lib64-msvc-14.0;$(ZlibDir)\dll\bin\x64\Debug + %(AdditionalDependencies) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + true + + + + + + + + true + + + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/contrib/other-builds/moses2/moses2.vcxproj.filters b/contrib/other-builds/moses2/moses2.vcxproj.filters new file mode 100644 index 0000000000..6995b6ada1 --- /dev/null +++ b/contrib/other-builds/moses2/moses2.vcxproj.filters @@ -0,0 +1,768 @@ + + + + + {4FC737F1-C7A5-4376-A066-2A32D752A2FF} + cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx + + + {93995380-89BD-4b04-88EB-625FBE52EBFB} + h;hh;hpp;hxx;hm;inl;inc;xsd + + + {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} + rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms + + + {214e915b-eafb-4e76-b9a2-1fbfe99424b7} + + + {d6922dd8-d86c-4c79-8587-a3a412a2e9f6} + + + {4e9f8bc8-ef01-463e-a309-df80bb1e63b5} + + + {58e84bec-0301-41b2-a4c2-dc00162c550a} + + + {ccdac19b-8883-4c3d-8006-365d4846688f} + + + {929b6fab-e56b-4218-bfb6-da1c50a6c48e} + + + {797f4634-c680-45fc-b30e-b5e90ee5d224} + + + {5a603a90-587d-4fef-ab01-ba6e5173869e} + + + {85931b40-138d-48c4-a288-c4ee96039879} + + + {a044c0cd-45cc-4a91-bd83-0e04d11f2afa} + + + {fe76b14f-0997-4f14-b3d6-c6f1b725bf72} + + + {dea1c12e-1a75-4313-9c03-28689a06a1ee} + + + {b895cea0-249f-4b4a-9b47-872d810fd4f2} + + + {12cccf90-d56a-4aca-8780-41777bb2f291} + + + {e8564ac2-1055-4b10-9da0-4ae82e713881} + + + {cad8906a-d5b9-447d-952c-68bd6fa93bef} + + + {806d58ef-f545-4428-a8f0-f870e211d15f} + + + {8f10d9c1-66d4-4490-b310-d3f4973bad29} + + + {8f2f68ba-2b5e-4d2c-92a7-6ece71df74ba} + + + {742ab76a-e9db-4098-b7dd-38a4aeac845e} + + + {4bcc6bd2-7220-4a5a-95e1-fd08b03a0d34} + + + + + Source Files\FF + + + Source Files\FF + + + Source Files\FF + + + Source Files\FF + + + Source Files\FF + + + Source Files\FF + + + Source Files\FF + + + Source Files\FF + + + Source Files\FF + + + Source Files\FF + + + Source Files\FF + + + Source Files\FF + + + Source Files\FF\OSM + + + Source Files\FF\OSM + + + Source Files\FF\OSM + + + Source Files\FF\LexicalReordering + + + Source Files\FF\LexicalReordering + + + Source Files\FF\LexicalReordering + + + Source Files\FF\LexicalReordering + + + Source Files\FF\LexicalReordering + + + Source Files\FF\LexicalReordering + + + Source Files\FF\LexicalReordering + + + Source Files\FF\LexicalReordering + + + Source Files\legacy + + + Source Files\legacy + + + Source Files\legacy + + + Source Files\legacy + + + Source Files\legacy + + + Source Files\legacy + + + Source Files\legacy + + + Source Files\legacy + + + Source Files\legacy + + + Source Files\legacy + + + Source Files\legacy + + + Source Files\legacy + + + Source Files\Moses2LM + + + Source Files\Moses2LM + + + Source Files\Moses2LM + + + Source Files\Moses2LM + + + Source Files\parameters + + + Source Files\parameters + + + Source Files\parameters + + + Source Files\parameters + + + Source Files\parameters + + + Source Files\parameters + + + Source Files\parameters + + + Source Files\parameters + + + Source Files\parameters + + + Source Files\parameters + + + Source Files\parameters + + + Source Files\parameters + + + Source Files\parameters + + + Source Files\parameters + + + Source Files\PhraseBased + + + Source Files\PhraseBased + + + Source Files\PhraseBased + + + Source Files\PhraseBased + + + Source Files\PhraseBased + + + Source Files\PhraseBased + + + Source Files\PhraseBased + + + Source Files\PhraseBased + + + Source Files\PhraseBased + + + Source Files\PhraseBased + + + Source Files\PhraseBased + + + Source Files\PhraseBased + + + Source Files\PhraseBased\Normal + + + Source Files\PhraseBased\Normal + + + Source Files\PhraseBased\Normal + + + Source Files\PhraseBased\CubePruningMiniStack + + + Source Files\PhraseBased\CubePruningMiniStack + + + Source Files\PhraseBased\CubePruningMiniStack + + + Source Files\ProbingPT + + + Source Files\ProbingPT + + + Source Files\ProbingPT + + + Source Files\ProbingPT + + + Source Files\SCFG + + + Source Files\SCFG + + + Source Files\SCFG + + + Source Files\SCFG + + + Source Files\SCFG + + + Source Files\SCFG + + + Source Files\SCFG + + + Source Files\SCFG + + + Source Files\SCFG + + + Source Files\SCFG + + + Source Files\SCFG + + + Source Files\SCFG + + + Source Files\SCFG + + + Source Files\SCFG\nbest + + + Source Files\SCFG\nbest + + + Source Files\SCFG\nbest + + + Source Files\SCFG\nbest + + + Source Files\TranslationModel + + + Source Files\TranslationModel + + + Source Files\TranslationModel + + + Source Files\TranslationModel\Memory + + + Source Files\util\double-conversion + + + Source Files\util\double-conversion + + + Source Files\util\double-conversion + + + Source Files\util\double-conversion + + + Source Files\util\double-conversion + + + Source Files\util\double-conversion + + + Source Files\util\double-conversion + + + Source Files\util\double-conversion + + + Source Files\util + + + Source Files\util + + + Source Files\util + + + Source Files\util + + + Source Files\util + + + Source Files\util + + + Source Files\util + + + Source Files\util + + + Source Files\util + + + Source Files\util + + + Source Files\util + + + Source Files\util + + + Source Files\util + + + Source Files\util + + + Source Files\util + + + Source Files\util + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files + + + Source Files\lm + + + Source Files\lm + + + Source Files\lm + + + Source Files\lm + + + Source Files\lm + + + Source Files\lm + + + Source Files\lm + + + Source Files\lm + + + Source Files\lm + + + Source Files\lm + + + Source Files\lm + + + Source Files\lm + + + Source Files\lm + + + Source Files\lm + + + Source Files\lm + + + Source Files + + + Source Files\parameters + + + Source Files\TranslationModel\Dynamic + + + Source Files + + + Source Files\TranslationModel + + + Source Files\ProbingPT + + + Source Files\ProbingPT + + + Source Files\legacy + + + + + + + + Source Files\TranslationModel + + + Source Files\ProbingPT + + + Source Files\ProbingPT + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files + + + Header Files\legacy + + + Header Files\legacy + + + Header Files\legacy + + + Header Files\legacy + + + Header Files\legacy + + + Header Files\legacy + + + Header Files\legacy + + + Header Files\legacy + + + Header Files\legacy + + + Header Files\legacy + + + Header Files\legacy + + + Header Files\legacy + + + Header Files\legacy + + + Header Files\legacy + + + Header Files\legacy + + + Header Files\FF + + + Header Files\FF + + + Header Files\FF + + + Header Files\FF + + + Header Files\FF + + + Header Files\FF + + + Header Files\FF + + + Header Files\FF + + + Header Files\FF + + + Header Files\FF + + + Header Files\FF + + + Header Files\FF + + + \ No newline at end of file diff --git a/contrib/other-builds/mosesserver.vcxproj b/contrib/other-builds/mosesserver.vcxproj deleted file mode 100644 index b143d47a72..0000000000 --- a/contrib/other-builds/mosesserver.vcxproj +++ /dev/null @@ -1,177 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {85811FDF-8AD1-4490-A545-B2F51931A18C} - mosescmd - Win32Proj - - - - Application - Unicode - true - - - Application - Unicode - true - - - Application - Unicode - - - Application - Unicode - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - true - true - $(SolutionDir)$(Configuration)\ - $(SolutionDir)$(Configuration)\ - $(Configuration)\ - $(Configuration)\ - false - false - C:\Program Files\boost\boost_1_47;$(IncludePath) - C:\Program Files\boost\boost_1_47;$(IncludePath) - C:\Program Files\boost\boost_1_47;$(IncludePath) - C:\Program Files\boost\boost_1_47;$(IncludePath) - - - - Disabled - C:\xmlrpc-c\include;C:\Program Files\boost\boost_1_51;$(SolutionDir)/../../moses/src;$(SolutionDir)/../..;%(AdditionalIncludeDirectories) - WITH_THREADS;NO_PIPES;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - - - libxmlrpc_server_abyss.lib;libxmlrpc_server.lib;libxmlrpc_abyss.lib;libxmlrpc.lib;libxmlrpc_util.lib;libxmlrpc_xmlparse.lib;libxmlrpc_xmltok.lib;libxmlrpc++.lib;C:\GnuWin32\lib\zlib.lib;$(SolutionDir)$(Configuration)\moses.lib;$(SolutionDir)$(Configuration)\kenlm.lib;$(SolutionDir)$(Configuration)\OnDiskPt.lib;%(AdditionalDependencies) - true - Console - false - - - MachineX86 - C:\xmlrpc-c\bin\Debug-Static-Win32;C:\Program Files\boost\boost_1_51\lib - - - - - Disabled - C:\xmlrpc-c\include;C:\Program Files\boost\boost_1_51;$(SolutionDir)/../../moses/src;$(SolutionDir)/../..;%(AdditionalIncludeDirectories) - WITH_THREADS;NO_PIPES;WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - ProgramDatabase - - - libxmlrpc_server_abyss.lib;libxmlrpc_server.lib;libxmlrpc_abyss.lib;libxmlrpc.lib;libxmlrpc_util.lib;libxmlrpc_xmlparse.lib;libxmlrpc_xmltok.lib;libxmlrpc++.lib;C:\GnuWin32\lib\zlib.lib;$(SolutionDir)$(Configuration)\moses.lib;$(SolutionDir)$(Configuration)\kenlm.lib;$(SolutionDir)$(Configuration)\OnDiskPt.lib;%(AdditionalDependencies) - true - Console - false - - - C:\xmlrpc-c\bin\Debug-Static-Win32;C:\Program Files\boost\boost_1_51\lib - - - - - C:\xmlrpc-c\include;C:\boost\boost_1_47;$(SolutionDir)/../../moses/src;$(SolutionDir)/../..;%(AdditionalIncludeDirectories) - WITH_THREADS;NO_PIPES;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - - - libxmlrpc_server_abyss.lib;libxmlrpc_server.lib;libxmlrpc_abyss.lib;libxmlrpc.lib;libxmlrpc_util.lib;libxmlrpc_xmlparse.lib;libxmlrpc_xmltok.lib;libxmlrpc++.lib;C:\GnuWin32\lib\zlib.lib;$(SolutionDir)$(Configuration)\moses.lib;$(SolutionDir)$(Configuration)\kenlm.lib;$(SolutionDir)$(Configuration)\OnDiskPt.lib;%(AdditionalDependencies) - true - Console - true - true - false - - - MachineX86 - C:\xmlrpc-c\bin\Release-Static-Win32;C:\boost\boost_1_47\lib - - - - - C:\xmlrpc-c\include;C:\boost\boost_1_47;$(SolutionDir)/../../moses/src;$(SolutionDir)/../..;%(AdditionalIncludeDirectories) - WITH_THREADS;NO_PIPES;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - MultiThreadedDLL - - - Level3 - ProgramDatabase - - - libxmlrpc_server_abyss.lib;libxmlrpc_server.lib;libxmlrpc_abyss.lib;libxmlrpc.lib;libxmlrpc_util.lib;libxmlrpc_xmlparse.lib;libxmlrpc_xmltok.lib;libxmlrpc++.lib;C:\GnuWin32\lib\zlib.lib;$(SolutionDir)$(Configuration)\moses.lib;$(SolutionDir)$(Configuration)\kenlm.lib;$(SolutionDir)$(Configuration)\OnDiskPt.lib;%(AdditionalDependencies) - true - Console - true - true - false - - - C:\xmlrpc-c\bin\Release-Static-Win32;C:\boost\boost_1_47\lib - - - - - - - - - \ No newline at end of file diff --git a/contrib/other-builds/probingpt/.cproject b/contrib/other-builds/probingpt/.cproject new file mode 100644 index 0000000000..155f077a05 --- /dev/null +++ b/contrib/other-builds/probingpt/.cproject @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/probingpt/.project b/contrib/other-builds/probingpt/.project new file mode 100644 index 0000000000..023a89212a --- /dev/null +++ b/contrib/other-builds/probingpt/.project @@ -0,0 +1,34 @@ + + + probingpt + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + probingpt + 2 + PARENT-3-PROJECT_LOC/probingpt + + + diff --git a/contrib/other-builds/processLexicalTableMin.xcodeproj/project.pbxproj b/contrib/other-builds/processLexicalTableMin.xcodeproj/project.pbxproj deleted file mode 100644 index 113d9723d0..0000000000 --- a/contrib/other-builds/processLexicalTableMin.xcodeproj/project.pbxproj +++ /dev/null @@ -1,297 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1E6D9FF115D027F00064D436 /* libmoses.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EB3EBD515D0269B006B9CF1 /* libmoses.a */; }; - 1EB3EBB315D024C7006B9CF1 /* processLexicalTableMin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EB3EBB215D024C7006B9CF1 /* processLexicalTableMin.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1E6D9FF215D0292D0064D436 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EB3EBD015D0269B006B9CF1 /* moses.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC045055464E500DB518D; - remoteInfo = moses; - }; - 1EB3EBD415D0269B006B9CF1 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EB3EBD015D0269B006B9CF1 /* moses.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC046055464E500DB518D; - remoteInfo = moses; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 1E3A0AEA15D0242A003EF9B4 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1E3A0AEC15D0242A003EF9B4 /* processLexicalTableMin */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = processLexicalTableMin; sourceTree = BUILT_PRODUCTS_DIR; }; - 1EB3EBB215D024C7006B9CF1 /* processLexicalTableMin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = processLexicalTableMin.cpp; path = ../../misc/processLexicalTableMin.cpp; sourceTree = ""; }; - 1EB3EBD015D0269B006B9CF1 /* moses.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = moses.xcodeproj; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1E3A0AE915D0242A003EF9B4 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1E6D9FF115D027F00064D436 /* libmoses.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1E3A0AE115D02427003EF9B4 = { - isa = PBXGroup; - children = ( - 1EB3EBB215D024C7006B9CF1 /* processLexicalTableMin.cpp */, - 1E3A0AED15D0242A003EF9B4 /* Products */, - 1EB3EBD015D0269B006B9CF1 /* moses.xcodeproj */, - ); - sourceTree = ""; - }; - 1E3A0AED15D0242A003EF9B4 /* Products */ = { - isa = PBXGroup; - children = ( - 1E3A0AEC15D0242A003EF9B4 /* processLexicalTableMin */, - ); - name = Products; - sourceTree = ""; - }; - 1EB3EBD115D0269B006B9CF1 /* Products */ = { - isa = PBXGroup; - children = ( - 1EB3EBD515D0269B006B9CF1 /* libmoses.a */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1E3A0AEB15D0242A003EF9B4 /* processLexicalTableMin */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1E3A0AF615D0242B003EF9B4 /* Build configuration list for PBXNativeTarget "processLexicalTableMin" */; - buildPhases = ( - 1E3A0AE815D0242A003EF9B4 /* Sources */, - 1E3A0AE915D0242A003EF9B4 /* Frameworks */, - 1E3A0AEA15D0242A003EF9B4 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - 1E6D9FF315D0292D0064D436 /* PBXTargetDependency */, - ); - name = processLexicalTableMin; - productName = processLexicalTableMin; - productReference = 1E3A0AEC15D0242A003EF9B4 /* processLexicalTableMin */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 1E3A0AE315D02427003EF9B4 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 1E3A0AE615D02427003EF9B4 /* Build configuration list for PBXProject "processLexicalTableMin" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 1E3A0AE115D02427003EF9B4; - productRefGroup = 1E3A0AED15D0242A003EF9B4 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 1EB3EBD115D0269B006B9CF1 /* Products */; - ProjectRef = 1EB3EBD015D0269B006B9CF1 /* moses.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1E3A0AEB15D0242A003EF9B4 /* processLexicalTableMin */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 1EB3EBD515D0269B006B9CF1 /* libmoses.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libmoses.a; - remoteRef = 1EB3EBD415D0269B006B9CF1 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXSourcesBuildPhase section */ - 1E3A0AE815D0242A003EF9B4 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EB3EBB315D024C7006B9CF1 /* processLexicalTableMin.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 1E6D9FF315D0292D0064D436 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = moses; - targetProxy = 1E6D9FF215D0292D0064D436 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1E3A0AF415D0242B003EF9B4 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - ../../, - ../../irstlm/include, - /opt/local/include, - ); - MACOSX_DEPLOYMENT_TARGET = 10.7; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "../../ ../../irstlm/include /opt/local/include ../../moses/src"; - }; - name = Debug; - }; - 1E3A0AF515D0242B003EF9B4 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - ../../, - ../../irstlm/include, - /opt/local/include, - ); - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "../../ ../../irstlm/include /opt/local/include ../../moses/src"; - }; - name = Release; - }; - 1E3A0AF715D0242B003EF9B4 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREPROCESSOR_DEFINITIONS = WITH_THREADS; - "GCC_PREPROCESSOR_DEFINITIONS[arch=*]" = WITH_THREADS; - LIBRARY_SEARCH_PATHS = ( - ../../irstlm/lib, - ../../srilm/lib/macosx, - ../../randlm/lib, - /opt/local/lib, - ); - OTHER_LDFLAGS = ( - "-lz", - "-lirstlm", - "-lmisc", - "-ldstruct", - "-loolm", - "-lflm", - "-llattice", - "-lrandlm", - "-lboost_thread-mt", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 1E3A0AF815D0242B003EF9B4 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREPROCESSOR_DEFINITIONS = WITH_THREADS; - LIBRARY_SEARCH_PATHS = ( - ../../irstlm/lib, - ../../srilm/lib/macosx, - ../../randlm/lib, - /opt/local/lib, - ); - OTHER_LDFLAGS = ( - "-lz", - "-lirstlm", - "-lmisc", - "-ldstruct", - "-loolm", - "-lflm", - "-llattice", - "-lrandlm", - "-lboost_thread-mt", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1E3A0AE615D02427003EF9B4 /* Build configuration list for PBXProject "processLexicalTableMin" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1E3A0AF415D0242B003EF9B4 /* Debug */, - 1E3A0AF515D0242B003EF9B4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1E3A0AF615D0242B003EF9B4 /* Build configuration list for PBXNativeTarget "processLexicalTableMin" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1E3A0AF715D0242B003EF9B4 /* Debug */, - 1E3A0AF815D0242B003EF9B4 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 1E3A0AE315D02427003EF9B4 /* Project object */; -} diff --git a/contrib/other-builds/processPhraseTableMin.xcodeproj/project.pbxproj b/contrib/other-builds/processPhraseTableMin.xcodeproj/project.pbxproj deleted file mode 100644 index 9db1d49b8c..0000000000 --- a/contrib/other-builds/processPhraseTableMin.xcodeproj/project.pbxproj +++ /dev/null @@ -1,304 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1EF3D68A15D02AEF00969478 /* processPhraseTableMin.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1EF3D68915D02AEF00969478 /* processPhraseTableMin.cpp */; }; - 1EF3D6A415D02B6400969478 /* libmoses.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1EF3D69915D02B4400969478 /* libmoses.a */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1EF3D69815D02B4400969478 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EF3D69415D02B4400969478 /* moses.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC046055464E500DB518D; - remoteInfo = moses; - }; - 1EF3D6A515D02B6B00969478 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1EF3D69415D02B4400969478 /* moses.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = D2AAC045055464E500DB518D; - remoteInfo = moses; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 1E6D9FFD15D02A8D0064D436 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = /usr/share/man/man1/; - dstSubfolderSpec = 0; - files = ( - ); - runOnlyForDeploymentPostprocessing = 1; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 1E6D9FFF15D02A8D0064D436 /* processPhraseTableMin */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = processPhraseTableMin; sourceTree = BUILT_PRODUCTS_DIR; }; - 1EF3D68915D02AEF00969478 /* processPhraseTableMin.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = processPhraseTableMin.cpp; path = ../../misc/processPhraseTableMin.cpp; sourceTree = ""; }; - 1EF3D69415D02B4400969478 /* moses.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; path = moses.xcodeproj; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1E6D9FFC15D02A8D0064D436 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EF3D6A415D02B6400969478 /* libmoses.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1E6D9FF415D02A8C0064D436 = { - isa = PBXGroup; - children = ( - 1EF3D68915D02AEF00969478 /* processPhraseTableMin.cpp */, - 1E6DA00015D02A8D0064D436 /* Products */, - 1EF3D69415D02B4400969478 /* moses.xcodeproj */, - ); - sourceTree = ""; - }; - 1E6DA00015D02A8D0064D436 /* Products */ = { - isa = PBXGroup; - children = ( - 1E6D9FFF15D02A8D0064D436 /* processPhraseTableMin */, - ); - name = Products; - sourceTree = ""; - }; - 1EF3D69515D02B4400969478 /* Products */ = { - isa = PBXGroup; - children = ( - 1EF3D69915D02B4400969478 /* libmoses.a */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 1E6D9FFE15D02A8D0064D436 /* processPhraseTableMin */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1E6DA00915D02A8D0064D436 /* Build configuration list for PBXNativeTarget "processPhraseTableMin" */; - buildPhases = ( - 1E6D9FFB15D02A8D0064D436 /* Sources */, - 1E6D9FFC15D02A8D0064D436 /* Frameworks */, - 1E6D9FFD15D02A8D0064D436 /* CopyFiles */, - ); - buildRules = ( - ); - dependencies = ( - 1EF3D6A615D02B6B00969478 /* PBXTargetDependency */, - ); - name = processPhraseTableMin; - productName = processPhraseTableMin; - productReference = 1E6D9FFF15D02A8D0064D436 /* processPhraseTableMin */; - productType = "com.apple.product-type.tool"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 1E6D9FF615D02A8C0064D436 /* Project object */ = { - isa = PBXProject; - buildConfigurationList = 1E6D9FF915D02A8C0064D436 /* Build configuration list for PBXProject "processPhraseTableMin" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 1E6D9FF415D02A8C0064D436; - productRefGroup = 1E6DA00015D02A8D0064D436 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 1EF3D69515D02B4400969478 /* Products */; - ProjectRef = 1EF3D69415D02B4400969478 /* moses.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 1E6D9FFE15D02A8D0064D436 /* processPhraseTableMin */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 1EF3D69915D02B4400969478 /* libmoses.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libmoses.a; - remoteRef = 1EF3D69815D02B4400969478 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXSourcesBuildPhase section */ - 1E6D9FFB15D02A8D0064D436 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EF3D68A15D02AEF00969478 /* processPhraseTableMin.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 1EF3D6A615D02B6B00969478 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = moses; - targetProxy = 1EF3D6A515D02B6B00969478 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 1E6DA00715D02A8D0064D436 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - LIBRARY_SEARCH_PATHS = ""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - 1E6DA00815D02A8D0064D436 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_VERSION = com.apple.compilers.llvm.clang.1_0; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_MISSING_PROTOTYPES = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - LIBRARY_SEARCH_PATHS = ""; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - }; - name = Release; - }; - 1E6DA00A15D02A8D0064D436 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREPROCESSOR_DEFINITIONS = WITH_THREADS; - HEADER_SEARCH_PATHS = ( - ../../, - ../../irstlm/include, - /opt/local/include, - ../../moses/src, - ../../cmph/include, - ); - LIBRARY_SEARCH_PATHS = ( - ../../irstlm/lib, - ../../srilm/lib/macosx, - ../../randlm/lib, - /opt/local/lib, - ../../cmph/lib, - ); - OTHER_LDFLAGS = ( - "-lz", - "-lirstlm", - "-lmisc", - "-ldstruct", - "-loolm", - "-lflm", - "-llattice", - "-lrandlm", - "-lboost_thread-mt", - "-lcmph", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - 1E6DA00B15D02A8D0064D436 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - GCC_PREPROCESSOR_DEFINITIONS = WITH_THREADS; - HEADER_SEARCH_PATHS = ( - ../../, - ../../irstlm/include, - /opt/local/include, - ../../moses/src, - ../../cmph/include, - ); - LIBRARY_SEARCH_PATHS = ( - ../../irstlm/lib, - ../../srilm/lib/macosx, - ../../randlm/lib, - /opt/local/lib, - ../../cmph/lib, - ); - OTHER_LDFLAGS = ( - "-lz", - "-lirstlm", - "-lmisc", - "-ldstruct", - "-loolm", - "-lflm", - "-llattice", - "-lrandlm", - "-lboost_thread-mt", - "-lcmph", - ); - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1E6D9FF915D02A8C0064D436 /* Build configuration list for PBXProject "processPhraseTableMin" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1E6DA00715D02A8D0064D436 /* Debug */, - 1E6DA00815D02A8D0064D436 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1E6DA00915D02A8D0064D436 /* Build configuration list for PBXNativeTarget "processPhraseTableMin" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1E6DA00A15D02A8D0064D436 /* Debug */, - 1E6DA00B15D02A8D0064D436 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 1E6D9FF615D02A8C0064D436 /* Project object */; -} diff --git a/contrib/other-builds/pruneGeneration/pruneGeneration.project b/contrib/other-builds/pruneGeneration/pruneGeneration.project new file mode 100644 index 0000000000..70d26f418d --- /dev/null +++ b/contrib/other-builds/pruneGeneration/pruneGeneration.project @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + None + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + None + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/query.sln b/contrib/other-builds/query.sln deleted file mode 100755 index 8e40beace1..0000000000 --- a/contrib/other-builds/query.sln +++ /dev/null @@ -1,29 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual C++ Express 2010 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "query", "query.vcxproj", "{0A9F6EFE-21FD-4252-841A-599B8661A62B}" - ProjectSection(ProjectDependencies) = postProject - {A5402E0B-6ED7-465C-9669-E4124A0CDDCB} = {A5402E0B-6ED7-465C-9669-E4124A0CDDCB} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "kenlm", "kenlm.vcxproj", "{A5402E0B-6ED7-465C-9669-E4124A0CDDCB}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {0A9F6EFE-21FD-4252-841A-599B8661A62B}.Debug|Win32.ActiveCfg = Debug|Win32 - {0A9F6EFE-21FD-4252-841A-599B8661A62B}.Debug|Win32.Build.0 = Debug|Win32 - {0A9F6EFE-21FD-4252-841A-599B8661A62B}.Release|Win32.ActiveCfg = Release|Win32 - {0A9F6EFE-21FD-4252-841A-599B8661A62B}.Release|Win32.Build.0 = Release|Win32 - {A5402E0B-6ED7-465C-9669-E4124A0CDDCB}.Debug|Win32.ActiveCfg = Debug|Win32 - {A5402E0B-6ED7-465C-9669-E4124A0CDDCB}.Debug|Win32.Build.0 = Debug|Win32 - {A5402E0B-6ED7-465C-9669-E4124A0CDDCB}.Release|Win32.ActiveCfg = Release|Win32 - {A5402E0B-6ED7-465C-9669-E4124A0CDDCB}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/contrib/other-builds/query.vcxproj b/contrib/other-builds/query.vcxproj deleted file mode 100755 index b70d5002d8..0000000000 --- a/contrib/other-builds/query.vcxproj +++ /dev/null @@ -1,89 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - - - - - - - {0A9F6EFE-21FD-4252-841A-599B8661A62B} - Win32Proj - query - - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - true - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ../../ - - - Console - true - zdll.lib;$(SolutionDir)$(Configuration)\kenlm.lib;%(AdditionalDependencies) - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ../../ - - - Console - true - true - true - zdll.lib;$(SolutionDir)$(Configuration)\moses.lib;$(SolutionDir)$(Configuration)\kenlm.lib;$(SolutionDir)$(Configuration)\OnDiskPt.lib;%(AdditionalDependencies) - - - - - - \ No newline at end of file diff --git a/contrib/other-builds/score/.cproject b/contrib/other-builds/score/.cproject new file mode 100644 index 0000000000..a6d4e1b884 --- /dev/null +++ b/contrib/other-builds/score/.cproject @@ -0,0 +1,153 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/score/.project b/contrib/other-builds/score/.project new file mode 100644 index 0000000000..10e7131246 --- /dev/null +++ b/contrib/other-builds/score/.project @@ -0,0 +1,106 @@ + + + score + + + moses + util + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + DomainFeature.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/DomainFeature.cpp + + + DomainFeature.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/DomainFeature.h + + + ExtractionPhrasePair.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/ExtractionPhrasePair.cpp + + + ExtractionPhrasePair.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/ExtractionPhrasePair.h + + + InputFileStream.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/InputFileStream.cpp + + + InputFileStream.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/InputFileStream.h + + + InternalStructFeature.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/InternalStructFeature.cpp + + + InternalStructFeature.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/InternalStructFeature.h + + + OutputFileStream.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/OutputFileStream.cpp + + + OutputFileStream.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/OutputFileStream.h + + + ScoreFeature.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/ScoreFeature.cpp + + + ScoreFeature.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/ScoreFeature.h + + + score-main.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/score-main.cpp + + + tables-core.cpp + 1 + PARENT-3-PROJECT_LOC/phrase-extract/tables-core.cpp + + + tables-core.h + 1 + PARENT-3-PROJECT_LOC/phrase-extract/tables-core.h + + + diff --git a/contrib/other-builds/score/score.project b/contrib/other-builds/score/score.project new file mode 100644 index 0000000000..08e0b9414b --- /dev/null +++ b/contrib/other-builds/score/score.project @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + None + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + None + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/search.xcodeproj/project.pbxproj b/contrib/other-builds/search.xcodeproj/project.pbxproj deleted file mode 100644 index 820b064f91..0000000000 --- a/contrib/other-builds/search.xcodeproj/project.pbxproj +++ /dev/null @@ -1,284 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 1EBC53D1164C4AE200ADFA2C /* config.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC53BE164C4AE200ADFA2C /* config.hh */; }; - 1EBC53D2164C4AE200ADFA2C /* context.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC53BF164C4AE200ADFA2C /* context.hh */; }; - 1EBC53D3164C4AE200ADFA2C /* edge_generator.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBC53C0164C4AE200ADFA2C /* edge_generator.cc */; }; - 1EBC53D4164C4AE200ADFA2C /* edge_generator.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC53C1164C4AE200ADFA2C /* edge_generator.hh */; }; - 1EBC53D5164C4AE200ADFA2C /* edge.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC53C2164C4AE200ADFA2C /* edge.hh */; }; - 1EBC53D6164C4AE200ADFA2C /* final.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC53C3164C4AE200ADFA2C /* final.hh */; }; - 1EBC53D7164C4AE200ADFA2C /* header.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC53C4164C4AE200ADFA2C /* header.hh */; }; - 1EBC53D8164C4AE200ADFA2C /* Jamfile in Sources */ = {isa = PBXBuildFile; fileRef = 1EBC53C5164C4AE200ADFA2C /* Jamfile */; }; - 1EBC53D9164C4AE200ADFA2C /* note.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC53C6164C4AE200ADFA2C /* note.hh */; }; - 1EBC53DA164C4AE200ADFA2C /* rule.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBC53C7164C4AE200ADFA2C /* rule.cc */; }; - 1EBC53DB164C4AE200ADFA2C /* rule.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC53C8164C4AE200ADFA2C /* rule.hh */; }; - 1EBC53DC164C4AE200ADFA2C /* types.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC53C9164C4AE200ADFA2C /* types.hh */; }; - 1EBC53DD164C4AE200ADFA2C /* vertex_generator.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBC53CA164C4AE200ADFA2C /* vertex_generator.cc */; }; - 1EBC53DE164C4AE200ADFA2C /* vertex_generator.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC53CB164C4AE200ADFA2C /* vertex_generator.hh */; }; - 1EBC53DF164C4AE200ADFA2C /* vertex.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBC53CC164C4AE200ADFA2C /* vertex.cc */; }; - 1EBC53E0164C4AE200ADFA2C /* vertex.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC53CD164C4AE200ADFA2C /* vertex.hh */; }; - 1EBC53E2164C4AE200ADFA2C /* weights.cc in Sources */ = {isa = PBXBuildFile; fileRef = 1EBC53CF164C4AE200ADFA2C /* weights.cc */; }; - 1EBC53E3164C4AE200ADFA2C /* weights.hh in Headers */ = {isa = PBXBuildFile; fileRef = 1EBC53D0164C4AE200ADFA2C /* weights.hh */; }; -/* End PBXBuildFile section */ - -/* Begin PBXFileReference section */ - 1EBC53AE164C4A6200ADFA2C /* libsearch.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libsearch.a; sourceTree = BUILT_PRODUCTS_DIR; }; - 1EBC53BE164C4AE200ADFA2C /* config.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = config.hh; path = ../../search/config.hh; sourceTree = ""; }; - 1EBC53BF164C4AE200ADFA2C /* context.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = context.hh; path = ../../search/context.hh; sourceTree = ""; }; - 1EBC53C0164C4AE200ADFA2C /* edge_generator.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = edge_generator.cc; path = ../../search/edge_generator.cc; sourceTree = ""; }; - 1EBC53C1164C4AE200ADFA2C /* edge_generator.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = edge_generator.hh; path = ../../search/edge_generator.hh; sourceTree = ""; }; - 1EBC53C2164C4AE200ADFA2C /* edge.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = edge.hh; path = ../../search/edge.hh; sourceTree = ""; }; - 1EBC53C3164C4AE200ADFA2C /* final.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = final.hh; path = ../../search/final.hh; sourceTree = ""; }; - 1EBC53C4164C4AE200ADFA2C /* header.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = header.hh; path = ../../search/header.hh; sourceTree = ""; }; - 1EBC53C5164C4AE200ADFA2C /* Jamfile */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.jam; name = Jamfile; path = ../../search/Jamfile; sourceTree = ""; }; - 1EBC53C6164C4AE200ADFA2C /* note.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = note.hh; path = ../../search/note.hh; sourceTree = ""; }; - 1EBC53C7164C4AE200ADFA2C /* rule.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = rule.cc; path = ../../search/rule.cc; sourceTree = ""; }; - 1EBC53C8164C4AE200ADFA2C /* rule.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = rule.hh; path = ../../search/rule.hh; sourceTree = ""; }; - 1EBC53C9164C4AE200ADFA2C /* types.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = types.hh; path = ../../search/types.hh; sourceTree = ""; }; - 1EBC53CA164C4AE200ADFA2C /* vertex_generator.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = vertex_generator.cc; path = ../../search/vertex_generator.cc; sourceTree = ""; }; - 1EBC53CB164C4AE200ADFA2C /* vertex_generator.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = vertex_generator.hh; path = ../../search/vertex_generator.hh; sourceTree = ""; }; - 1EBC53CC164C4AE200ADFA2C /* vertex.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = vertex.cc; path = ../../search/vertex.cc; sourceTree = ""; }; - 1EBC53CD164C4AE200ADFA2C /* vertex.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = vertex.hh; path = ../../search/vertex.hh; sourceTree = ""; }; - 1EBC53CF164C4AE200ADFA2C /* weights.cc */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = weights.cc; path = ../../search/weights.cc; sourceTree = ""; }; - 1EBC53D0164C4AE200ADFA2C /* weights.hh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.h; name = weights.hh; path = ../../search/weights.hh; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 1EBC53AB164C4A6200ADFA2C /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 1EBC53A3164C4A6200ADFA2C = { - isa = PBXGroup; - children = ( - 1EBC53BE164C4AE200ADFA2C /* config.hh */, - 1EBC53BF164C4AE200ADFA2C /* context.hh */, - 1EBC53C0164C4AE200ADFA2C /* edge_generator.cc */, - 1EBC53C1164C4AE200ADFA2C /* edge_generator.hh */, - 1EBC53C2164C4AE200ADFA2C /* edge.hh */, - 1EBC53C3164C4AE200ADFA2C /* final.hh */, - 1EBC53C4164C4AE200ADFA2C /* header.hh */, - 1EBC53C5164C4AE200ADFA2C /* Jamfile */, - 1EBC53C6164C4AE200ADFA2C /* note.hh */, - 1EBC53C7164C4AE200ADFA2C /* rule.cc */, - 1EBC53C8164C4AE200ADFA2C /* rule.hh */, - 1EBC53C9164C4AE200ADFA2C /* types.hh */, - 1EBC53CA164C4AE200ADFA2C /* vertex_generator.cc */, - 1EBC53CB164C4AE200ADFA2C /* vertex_generator.hh */, - 1EBC53CC164C4AE200ADFA2C /* vertex.cc */, - 1EBC53CD164C4AE200ADFA2C /* vertex.hh */, - 1EBC53CF164C4AE200ADFA2C /* weights.cc */, - 1EBC53D0164C4AE200ADFA2C /* weights.hh */, - 1EBC53AF164C4A6200ADFA2C /* Products */, - ); - sourceTree = ""; - }; - 1EBC53AF164C4A6200ADFA2C /* Products */ = { - isa = PBXGroup; - children = ( - 1EBC53AE164C4A6200ADFA2C /* libsearch.a */, - ); - name = Products; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXHeadersBuildPhase section */ - 1EBC53AC164C4A6200ADFA2C /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EBC53D1164C4AE200ADFA2C /* config.hh in Headers */, - 1EBC53D2164C4AE200ADFA2C /* context.hh in Headers */, - 1EBC53D4164C4AE200ADFA2C /* edge_generator.hh in Headers */, - 1EBC53D5164C4AE200ADFA2C /* edge.hh in Headers */, - 1EBC53D6164C4AE200ADFA2C /* final.hh in Headers */, - 1EBC53D7164C4AE200ADFA2C /* header.hh in Headers */, - 1EBC53D9164C4AE200ADFA2C /* note.hh in Headers */, - 1EBC53DB164C4AE200ADFA2C /* rule.hh in Headers */, - 1EBC53DC164C4AE200ADFA2C /* types.hh in Headers */, - 1EBC53DE164C4AE200ADFA2C /* vertex_generator.hh in Headers */, - 1EBC53E0164C4AE200ADFA2C /* vertex.hh in Headers */, - 1EBC53E3164C4AE200ADFA2C /* weights.hh in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXHeadersBuildPhase section */ - -/* Begin PBXNativeTarget section */ - 1EBC53AD164C4A6200ADFA2C /* search */ = { - isa = PBXNativeTarget; - buildConfigurationList = 1EBC53B2164C4A6200ADFA2C /* Build configuration list for PBXNativeTarget "search" */; - buildPhases = ( - 1EBC53AA164C4A6200ADFA2C /* Sources */, - 1EBC53AB164C4A6200ADFA2C /* Frameworks */, - 1EBC53AC164C4A6200ADFA2C /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = search; - productName = search; - productReference = 1EBC53AE164C4A6200ADFA2C /* libsearch.a */; - productType = "com.apple.product-type.library.static"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 1EBC53A5164C4A6200ADFA2C /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0450; - ORGANIZATIONNAME = "Hieu Hoang"; - }; - buildConfigurationList = 1EBC53A8164C4A6200ADFA2C /* Build configuration list for PBXProject "search" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = 1EBC53A3164C4A6200ADFA2C; - productRefGroup = 1EBC53AF164C4A6200ADFA2C /* Products */; - projectDirPath = ""; - projectRoot = ""; - targets = ( - 1EBC53AD164C4A6200ADFA2C /* search */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXSourcesBuildPhase section */ - 1EBC53AA164C4A6200ADFA2C /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 1EBC53D3164C4AE200ADFA2C /* edge_generator.cc in Sources */, - 1EBC53D8164C4AE200ADFA2C /* Jamfile in Sources */, - 1EBC53DA164C4AE200ADFA2C /* rule.cc in Sources */, - 1EBC53DD164C4AE200ADFA2C /* vertex_generator.cc in Sources */, - 1EBC53DF164C4AE200ADFA2C /* vertex.cc in Sources */, - 1EBC53E2164C4AE200ADFA2C /* weights.cc in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 1EBC53B0164C4A6200ADFA2C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - ONLY_ACTIVE_ARCH = YES; - SDKROOT = macosx; - }; - name = Debug; - }; - 1EBC53B1164C4A6200ADFA2C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - COPY_PHASE_STRIP = YES; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_ENABLE_OBJC_EXCEPTIONS = YES; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - MACOSX_DEPLOYMENT_TARGET = 10.7; - SDKROOT = macosx; - }; - name = Release; - }; - 1EBC53B3164C4A6200ADFA2C /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - EXECUTABLE_PREFIX = lib; - GCC_PREPROCESSOR_DEFINITIONS = ( - "KENLM_MAX_ORDER=7", - LM_KEN, - ); - HEADER_SEARCH_PATHS = ../..; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = ""; - }; - name = Debug; - }; - 1EBC53B4164C4A6200ADFA2C /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - EXECUTABLE_PREFIX = lib; - GCC_PREPROCESSOR_DEFINITIONS = ( - "KENLM_MAX_ORDER=7", - LM_KEN, - ); - HEADER_SEARCH_PATHS = ../..; - PRODUCT_NAME = "$(TARGET_NAME)"; - SDKROOT = ""; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 1EBC53A8164C4A6200ADFA2C /* Build configuration list for PBXProject "search" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1EBC53B0164C4A6200ADFA2C /* Debug */, - 1EBC53B1164C4A6200ADFA2C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 1EBC53B2164C4A6200ADFA2C /* Build configuration list for PBXNativeTarget "search" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 1EBC53B3164C4A6200ADFA2C /* Debug */, - 1EBC53B4164C4A6200ADFA2C /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 1EBC53A5164C4A6200ADFA2C /* Project object */; -} diff --git a/contrib/other-builds/search/.cproject b/contrib/other-builds/search/.cproject index 44ae0e94eb..ad505c5695 100644 --- a/contrib/other-builds/search/.cproject +++ b/contrib/other-builds/search/.cproject @@ -20,29 +20,30 @@ - + - - - @@ -75,20 +76,20 @@ - + - - @@ -136,4 +137,3 @@ - diff --git a/contrib/other-builds/search/search.project b/contrib/other-builds/search/search.project new file mode 100644 index 0000000000..8be29fd1d8 --- /dev/null +++ b/contrib/other-builds/search/search.project @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/server/.cproject b/contrib/other-builds/server/.cproject new file mode 100644 index 0000000000..153b8c8e43 --- /dev/null +++ b/contrib/other-builds/server/.cproject @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/other-builds/server/.project b/contrib/other-builds/server/.project new file mode 100644 index 0000000000..fd9ccc2909 --- /dev/null +++ b/contrib/other-builds/server/.project @@ -0,0 +1,39 @@ + + + server + + + lm + moses + OnDiskPt + search + util + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.core.ccnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + mosesserver.cpp + 1 + PARENT-2-PROJECT_LOC/server/mosesserver.cpp + + + diff --git a/contrib/other-builds/util/.cproject b/contrib/other-builds/util/.cproject index 65b4e4fa75..e8b34d4e71 100644 --- a/contrib/other-builds/util/.cproject +++ b/contrib/other-builds/util/.cproject @@ -11,8 +11,7 @@ - - + @@ -20,31 +19,19 @@ - + - - - - - - - - - - - - - - - - @@ -82,7 +76,7 @@ - + @@ -99,16 +93,16 @@ - - @@ -137,10 +131,10 @@ - + - + diff --git a/contrib/other-builds/util/util.project b/contrib/other-builds/util/util.project new file mode 100644 index 0000000000..4bb27306e3 --- /dev/null +++ b/contrib/other-builds/util/util.project @@ -0,0 +1,156 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/contrib/picaro/README b/contrib/picaro/README new file mode 100644 index 0000000000..8a22ccd3f2 --- /dev/null +++ b/contrib/picaro/README @@ -0,0 +1,3 @@ +Use Matt Post's version: + https://github.com/mjpost/picaro + \ No newline at end of file diff --git a/contrib/python/README.md b/contrib/python/README.md index e6b38b4fb3..647daed595 100644 --- a/contrib/python/README.md +++ b/contrib/python/README.md @@ -89,8 +89,7 @@ for line in sys.stdin: If you want to add your changes you are going to have to recompile the cython code. -1. Compile the cython code using Cython 0.17.1 +1. Compile the cython code: - python setup.py build_ext -i --cython diff --git a/contrib/python/example.py b/contrib/python/example.py index 2a952eca1e..93eb60d73b 100644 --- a/contrib/python/example.py +++ b/contrib/python/example.py @@ -2,7 +2,7 @@ import sys if len(sys.argv) != 4: - print "Usage: %s table nscores tlimit < query > result" % (sys.argv[0]) + print("Usage: %s table nscores tlimit < query > result" % (sys.argv[0])) sys.exit(0) path = sys.argv[1] @@ -20,13 +20,17 @@ print result.source for e in result: if e.lhs: - print '\t%s -> %s ||| %s ||| %s' % (e.lhs, + print('\t%s -> %s ||| %s ||| %s' % ( + e.lhs, ' '.join(e.rhs), e.scores, - e.alignment) + e.alignment + ) + ) else: - print '\t%s ||| %s ||| %s' % (' '.join(e.rhs), + print('\t%s ||| %s ||| %s' % ( + ' '.join(e.rhs), e.scores, - e.alignment) - - + e.alignment + ) + ) diff --git a/contrib/python/moses/cdictree.pxd b/contrib/python/moses/cdictree.pxd index d3e805eaa1..03e9a728d5 100644 --- a/contrib/python/moses/cdictree.pxd +++ b/contrib/python/moses/cdictree.pxd @@ -16,14 +16,14 @@ cdef extern from 'PhraseDictionaryTree.h' namespace 'Moses': Scores fvalues cdef cppclass PhraseDictionaryTree: - PhraseDictionaryTree(unsigned nscores) + PhraseDictionaryTree() void NeedAlignmentInfo(bint value) void PrintWordAlignment(bint value) bint PrintWordAlignment() int Read(string& path) - void GetTargetCandidates(vector[string]& fs, + void GetTargetCandidates(vector[string]& fs, vector[StringTgtCand]& rv) - void GetTargetCandidates(vector[string]& fs, + void GetTargetCandidates(vector[string]& fs, vector[StringTgtCand]& rv, vector[string]& wa) diff --git a/contrib/python/moses/dictree.cpp b/contrib/python/moses/dictree.cpp index e95033e4b1..d9008f6e31 100644 --- a/contrib/python/moses/dictree.cpp +++ b/contrib/python/moses/dictree.cpp @@ -1,13 +1,26 @@ -/* Generated by Cython 0.17.1 on Thu Nov 15 18:03:51 2012 */ +/* Generated by Cython 0.20.1post0 (Debian 0.20.1+git90-g0e6e38e-1ubuntu2) on Mon Jun 2 14:32:44 2014 */ #define PY_SSIZE_T_CLEAN +#ifndef CYTHON_USE_PYLONG_INTERNALS +#ifdef PYLONG_BITS_IN_DIGIT +#define CYTHON_USE_PYLONG_INTERNALS 0 +#else +#include "pyconfig.h" +#ifdef PYLONG_BITS_IN_DIGIT +#define CYTHON_USE_PYLONG_INTERNALS 1 +#else +#define CYTHON_USE_PYLONG_INTERNALS 0 +#endif +#endif +#endif #include "Python.h" #ifndef Py_PYTHON_H #error Python headers needed to compile C extensions, please install development version of Python. #elif PY_VERSION_HEX < 0x02040000 #error Cython requires Python 2.4+. #else -#include /* For offsetof */ +#define CYTHON_ABI "0_20_1post0" +#include /* For offsetof */ #ifndef offsetof #define offsetof(type, member) ( (size_t) & ((type*)0) -> member ) #endif @@ -41,6 +54,9 @@ #define CYTHON_COMPILING_IN_PYPY 0 #define CYTHON_COMPILING_IN_CPYTHON 1 #endif +#if CYTHON_COMPILING_IN_PYPY +#define Py_OptimizeFlag 0 +#endif #if PY_VERSION_HEX < 0x02050000 typedef int Py_ssize_t; #define PY_SSIZE_T_MAX INT_MAX @@ -48,17 +64,20 @@ #define PY_FORMAT_SIZE_T "" #define CYTHON_FORMAT_SSIZE_T "" #define PyInt_FromSsize_t(z) PyInt_FromLong(z) - #define PyInt_AsSsize_t(o) __Pyx_PyInt_AsInt(o) + #define PyInt_AsSsize_t(o) __Pyx_PyInt_As_int(o) #define PyNumber_Index(o) ((PyNumber_Check(o) && !PyFloat_Check(o)) ? PyNumber_Int(o) : \ (PyErr_Format(PyExc_TypeError, \ "expected index value, got %.200s", Py_TYPE(o)->tp_name), \ (PyObject*)0)) - #define PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && !PyComplex_Check(o)) + #define __Pyx_PyIndex_Check(o) (PyNumber_Check(o) && !PyFloat_Check(o) && \ + !PyComplex_Check(o)) + #define PyIndex_Check __Pyx_PyIndex_Check #define PyErr_WarnEx(category, message, stacklevel) PyErr_Warn(category, message) #define __PYX_BUILD_PY_SSIZE_T "i" #else #define __PYX_BUILD_PY_SSIZE_T "n" #define CYTHON_FORMAT_SSIZE_T "z" + #define __Pyx_PyIndex_Check PyIndex_Check #endif #if PY_VERSION_HEX < 0x02060000 #define Py_REFCNT(ob) (((PyObject*)(ob))->ob_refcnt) @@ -97,13 +116,15 @@ #if PY_MAJOR_VERSION < 3 #define __Pyx_BUILTIN_MODULE_NAME "__builtin__" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ - PyCode_New(a, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + PyCode_New(a+k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #define __Pyx_DefaultClassType PyClass_Type #else #define __Pyx_BUILTIN_MODULE_NAME "builtins" #define __Pyx_PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) \ PyCode_New(a, k, l, s, f, code, c, n, v, fv, cell, fn, name, fline, lnos) + #define __Pyx_DefaultClassType PyType_Type #endif -#if PY_MAJOR_VERSION < 3 && PY_MINOR_VERSION < 6 +#if PY_VERSION_HEX < 0x02060000 #define PyUnicode_FromString(s) PyUnicode_Decode(s, strlen(s), "UTF-8", "strict") #endif #if PY_MAJOR_VERSION >= 3 @@ -113,19 +134,47 @@ #if (PY_VERSION_HEX < 0x02060000) || (PY_MAJOR_VERSION >= 3) #define Py_TPFLAGS_HAVE_NEWBUFFER 0 #endif +#if PY_VERSION_HEX < 0x02060000 + #define Py_TPFLAGS_HAVE_VERSION_TAG 0 +#endif +#if PY_VERSION_HEX < 0x02060000 && !defined(Py_TPFLAGS_IS_ABSTRACT) + #define Py_TPFLAGS_IS_ABSTRACT 0 +#endif +#if PY_VERSION_HEX < 0x030400a1 && !defined(Py_TPFLAGS_HAVE_FINALIZE) + #define Py_TPFLAGS_HAVE_FINALIZE 0 +#endif #if PY_VERSION_HEX > 0x03030000 && defined(PyUnicode_KIND) #define CYTHON_PEP393_ENABLED 1 #define __Pyx_PyUnicode_READY(op) (likely(PyUnicode_IS_READY(op)) ? \ 0 : _PyUnicode_Ready((PyObject *)(op))) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_LENGTH(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) PyUnicode_READ_CHAR(u, i) + #define __Pyx_PyUnicode_KIND(u) PyUnicode_KIND(u) + #define __Pyx_PyUnicode_DATA(u) PyUnicode_DATA(u) #define __Pyx_PyUnicode_READ(k, d, i) PyUnicode_READ(k, d, i) #else #define CYTHON_PEP393_ENABLED 0 #define __Pyx_PyUnicode_READY(op) (0) #define __Pyx_PyUnicode_GET_LENGTH(u) PyUnicode_GET_SIZE(u) #define __Pyx_PyUnicode_READ_CHAR(u, i) ((Py_UCS4)(PyUnicode_AS_UNICODE(u)[i])) - #define __Pyx_PyUnicode_READ(k, d, i) ((k=k), (Py_UCS4)(((Py_UNICODE*)d)[i])) + #define __Pyx_PyUnicode_KIND(u) (sizeof(Py_UNICODE)) + #define __Pyx_PyUnicode_DATA(u) ((void*)PyUnicode_AS_UNICODE(u)) + #define __Pyx_PyUnicode_READ(k, d, i) ((void)(k), (Py_UCS4)(((Py_UNICODE*)d)[i])) +#endif +#if CYTHON_COMPILING_IN_PYPY + #define __Pyx_PyUnicode_Concat(a, b) PyNumber_Add(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) PyNumber_Add(a, b) +#else + #define __Pyx_PyUnicode_Concat(a, b) PyUnicode_Concat(a, b) + #define __Pyx_PyUnicode_ConcatSafe(a, b) ((unlikely((a) == Py_None) || unlikely((b) == Py_None)) ? \ + PyNumber_Add(a, b) : __Pyx_PyUnicode_Concat(a, b)) +#endif +#define __Pyx_PyString_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : __Pyx_PyString_Format(a, b)) +#define __Pyx_PyUnicode_FormatSafe(a, b) ((unlikely((a) == Py_None)) ? PyNumber_Remainder(a, b) : PyUnicode_Format(a, b)) +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyString_Format(a, b) PyUnicode_Format(a, b) +#else + #define __Pyx_PyString_Format(a, b) PyString_Format(a, b) #endif #if PY_MAJOR_VERSION >= 3 #define PyBaseString_Type PyUnicode_Type @@ -152,6 +201,14 @@ #define PyBytes_Concat PyString_Concat #define PyBytes_ConcatAndDel PyString_ConcatAndDel #endif +#if PY_MAJOR_VERSION >= 3 + #define __Pyx_PyBaseString_Check(obj) PyUnicode_Check(obj) + #define __Pyx_PyBaseString_CheckExact(obj) PyUnicode_CheckExact(obj) +#else + #define __Pyx_PyBaseString_Check(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj) || \ + PyString_Check(obj) || PyUnicode_Check(obj)) + #define __Pyx_PyBaseString_CheckExact(obj) (PyString_CheckExact(obj) || PyUnicode_CheckExact(obj)) +#endif #if PY_VERSION_HEX < 0x02060000 #define PySet_Check(obj) PyObject_TypeCheck(obj, &PySet_Type) #define PyFrozenSet_Check(obj) PyObject_TypeCheck(obj, &PyFrozenSet_Type) @@ -175,11 +232,12 @@ #define PyInt_AsSsize_t PyLong_AsSsize_t #define PyInt_AsUnsignedLongMask PyLong_AsUnsignedLongMask #define PyInt_AsUnsignedLongLongMask PyLong_AsUnsignedLongLongMask + #define PyNumber_Int PyNumber_Long #endif #if PY_MAJOR_VERSION >= 3 #define PyBoolObject PyLongObject #endif -#if PY_VERSION_HEX < 0x03020000 +#if PY_VERSION_HEX < 0x030200A4 typedef long Py_hash_t; #define __Pyx_PyInt_FromHash_t PyInt_FromLong #define __Pyx_PyInt_AsHash_t PyInt_AsLong @@ -224,6 +282,46 @@ #define __Pyx_NAMESTR(n) (n) #define __Pyx_DOCSTR(n) (n) #endif +#ifndef CYTHON_INLINE + #if defined(__GNUC__) + #define CYTHON_INLINE __inline__ + #elif defined(_MSC_VER) + #define CYTHON_INLINE __inline + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_INLINE inline + #else + #define CYTHON_INLINE + #endif +#endif +#ifndef CYTHON_RESTRICT + #if defined(__GNUC__) + #define CYTHON_RESTRICT __restrict__ + #elif defined(_MSC_VER) && _MSC_VER >= 1400 + #define CYTHON_RESTRICT __restrict + #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + #define CYTHON_RESTRICT restrict + #else + #define CYTHON_RESTRICT + #endif +#endif +#ifdef NAN +#define __PYX_NAN() ((float) NAN) +#else +static CYTHON_INLINE float __PYX_NAN() { + /* Initialize NaN. The sign is irrelevant, an exponent with all bits 1 and + a nonzero mantissa means NaN. If the first bit in the mantissa is 1, it is + a quiet NaN. */ + float value; + memset(&value, 0xFF, sizeof(value)); + return value; +} +#endif +#ifdef __cplusplus +template +void __Pyx_call_destructor(T* x) { + x->~T(); +} +#endif #if PY_MAJOR_VERSION >= 3 @@ -245,7 +343,7 @@ #if defined(WIN32) || defined(MS_WINDOWS) #define _USE_MATH_DEFINES #endif -#include +#include #define __PYX_HAVE__moses__dictree #define __PYX_HAVE_API__moses__dictree #include "string.h" @@ -275,21 +373,6 @@ #define CYTHON_WITHOUT_ASSERTIONS #endif - -/* inline attribute */ -#ifndef CYTHON_INLINE - #if defined(__GNUC__) - #define CYTHON_INLINE __inline__ - #elif defined(_MSC_VER) - #define CYTHON_INLINE __inline - #elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L - #define CYTHON_INLINE inline - #else - #define CYTHON_INLINE - #endif -#endif - -/* unused attribute */ #ifndef CYTHON_UNUSED # if defined(__GNUC__) # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) @@ -303,46 +386,155 @@ # define CYTHON_UNUSED # endif #endif - -typedef struct {PyObject **p; char *s; const long n; const char* encoding; const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ - - -/* Type Conversion Predeclarations */ - -#define __Pyx_PyBytes_FromUString(s) PyBytes_FromString((char*)s) -#define __Pyx_PyBytes_AsUString(s) ((unsigned char*) PyBytes_AsString(s)) - +typedef struct {PyObject **p; char *s; const Py_ssize_t n; const char* encoding; + const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry; /*proto*/ + +#define __PYX_DEFAULT_STRING_ENCODING_IS_ASCII 0 +#define __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT 0 +#define __PYX_DEFAULT_STRING_ENCODING "" +#define __Pyx_PyObject_FromString __Pyx_PyBytes_FromString +#define __Pyx_PyObject_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#define __Pyx_fits_Py_ssize_t(v, type, is_signed) ( \ + (sizeof(type) < sizeof(Py_ssize_t)) || \ + (sizeof(type) > sizeof(Py_ssize_t) && \ + likely(v < (type)PY_SSIZE_T_MAX || \ + v == (type)PY_SSIZE_T_MAX) && \ + (!is_signed || likely(v > (type)PY_SSIZE_T_MIN || \ + v == (type)PY_SSIZE_T_MIN))) || \ + (sizeof(type) == sizeof(Py_ssize_t) && \ + (is_signed || likely(v < (type)PY_SSIZE_T_MAX || \ + v == (type)PY_SSIZE_T_MAX))) ) +static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject*); +static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject*, Py_ssize_t* length); +#define __Pyx_PyByteArray_FromString(s) PyByteArray_FromStringAndSize((const char*)s, strlen((const char*)s)) +#define __Pyx_PyByteArray_FromStringAndSize(s, l) PyByteArray_FromStringAndSize((const char*)s, l) +#define __Pyx_PyBytes_FromString PyBytes_FromString +#define __Pyx_PyBytes_FromStringAndSize PyBytes_FromStringAndSize +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char*); +#if PY_MAJOR_VERSION < 3 + #define __Pyx_PyStr_FromString __Pyx_PyBytes_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyBytes_FromStringAndSize +#else + #define __Pyx_PyStr_FromString __Pyx_PyUnicode_FromString + #define __Pyx_PyStr_FromStringAndSize __Pyx_PyUnicode_FromStringAndSize +#endif +#define __Pyx_PyObject_AsSString(s) ((signed char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_AsUString(s) ((unsigned char*) __Pyx_PyObject_AsString(s)) +#define __Pyx_PyObject_FromUString(s) __Pyx_PyObject_FromString((const char*)s) +#define __Pyx_PyBytes_FromUString(s) __Pyx_PyBytes_FromString((const char*)s) +#define __Pyx_PyByteArray_FromUString(s) __Pyx_PyByteArray_FromString((const char*)s) +#define __Pyx_PyStr_FromUString(s) __Pyx_PyStr_FromString((const char*)s) +#define __Pyx_PyUnicode_FromUString(s) __Pyx_PyUnicode_FromString((const char*)s) +#if PY_MAJOR_VERSION < 3 +static CYTHON_INLINE size_t __Pyx_Py_UNICODE_strlen(const Py_UNICODE *u) +{ + const Py_UNICODE *u_end = u; + while (*u_end++) ; + return u_end - u - 1; +} +#else +#define __Pyx_Py_UNICODE_strlen Py_UNICODE_strlen +#endif +#define __Pyx_PyUnicode_FromUnicode(u) PyUnicode_FromUnicode(u, __Pyx_Py_UNICODE_strlen(u)) +#define __Pyx_PyUnicode_FromUnicodeAndLength PyUnicode_FromUnicode +#define __Pyx_PyUnicode_AsUnicode PyUnicode_AsUnicode #define __Pyx_Owned_Py_None(b) (Py_INCREF(Py_None), Py_None) #define __Pyx_PyBool_FromLong(b) ((b) ? (Py_INCREF(Py_True), Py_True) : (Py_INCREF(Py_False), Py_False)) static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject*); static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x); - static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*); static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t); -static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*); - #if CYTHON_COMPILING_IN_CPYTHON #define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x)) #else #define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x) #endif #define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x)) +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII +static int __Pyx_sys_getdefaultencoding_not_ascii; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys = NULL; + PyObject* default_encoding = NULL; + PyObject* ascii_chars_u = NULL; + PyObject* ascii_chars_b = NULL; + sys = PyImport_ImportModule("sys"); + if (sys == NULL) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + if (default_encoding == NULL) goto bad; + if (strcmp(PyBytes_AsString(default_encoding), "ascii") == 0) { + __Pyx_sys_getdefaultencoding_not_ascii = 0; + } else { + const char* default_encoding_c = PyBytes_AS_STRING(default_encoding); + char ascii_chars[128]; + int c; + for (c = 0; c < 128; c++) { + ascii_chars[c] = c; + } + __Pyx_sys_getdefaultencoding_not_ascii = 1; + ascii_chars_u = PyUnicode_DecodeASCII(ascii_chars, 128, NULL); + if (ascii_chars_u == NULL) goto bad; + ascii_chars_b = PyUnicode_AsEncodedString(ascii_chars_u, default_encoding_c, NULL); + if (ascii_chars_b == NULL || strncmp(ascii_chars, PyBytes_AS_STRING(ascii_chars_b), 128) != 0) { + PyErr_Format( + PyExc_ValueError, + "This module compiled with c_string_encoding=ascii, but default encoding '%.200s' is not a superset of ascii.", + default_encoding_c); + goto bad; + } + } + Py_XDECREF(sys); + Py_XDECREF(default_encoding); + Py_XDECREF(ascii_chars_u); + Py_XDECREF(ascii_chars_b); + return 0; +bad: + Py_XDECREF(sys); + Py_XDECREF(default_encoding); + Py_XDECREF(ascii_chars_u); + Py_XDECREF(ascii_chars_b); + return -1; +} +#endif +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT && PY_MAJOR_VERSION >= 3 +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_DecodeUTF8(c_str, size, NULL) +#else +#define __Pyx_PyUnicode_FromStringAndSize(c_str, size) PyUnicode_Decode(c_str, size, __PYX_DEFAULT_STRING_ENCODING, NULL) +#if __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT +static char* __PYX_DEFAULT_STRING_ENCODING; +static int __Pyx_init_sys_getdefaultencoding_params(void) { + PyObject* sys = NULL; + PyObject* default_encoding = NULL; + char* default_encoding_c; + sys = PyImport_ImportModule("sys"); + if (sys == NULL) goto bad; + default_encoding = PyObject_CallMethod(sys, (char*) (const char*) "getdefaultencoding", NULL); + if (default_encoding == NULL) goto bad; + default_encoding_c = PyBytes_AS_STRING(default_encoding); + __PYX_DEFAULT_STRING_ENCODING = (char*) malloc(strlen(default_encoding_c)); + strcpy(__PYX_DEFAULT_STRING_ENCODING, default_encoding_c); + Py_DECREF(sys); + Py_DECREF(default_encoding); + return 0; +bad: + Py_XDECREF(sys); + Py_XDECREF(default_encoding); + return -1; +} +#endif +#endif + -#ifdef __GNUC__ - /* Test for GCC > 2.95 */ - #if __GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95)) - #define likely(x) __builtin_expect(!!(x), 1) - #define unlikely(x) __builtin_expect(!!(x), 0) - #else /* __GNUC__ > 2 ... */ - #define likely(x) (x) - #define unlikely(x) (x) - #endif /* __GNUC__ > 2 ... */ -#else /* __GNUC__ */ +/* Test for GCC > 2.95 */ +#if defined(__GNUC__) && (__GNUC__ > 2 || (__GNUC__ == 2 && (__GNUC_MINOR__ > 95))) + #define likely(x) __builtin_expect(!!(x), 1) + #define unlikely(x) __builtin_expect(!!(x), 0) +#else /* !__GNUC__ or GCC < 2.95 */ #define likely(x) (x) #define unlikely(x) (x) #endif /* __GNUC__ */ - + static PyObject *__pyx_m; +static PyObject *__pyx_d; static PyObject *__pyx_b; static PyObject *__pyx_empty_tuple; static PyObject *__pyx_empty_bytes; @@ -365,32 +557,32 @@ static const char *__pyx_f[] = { * ctypedef vector[const_str_pointer] Tokens * ctypedef float FValue # <<<<<<<<<<<<<< * ctypedef vector[FValue] Scores - * + * */ typedef float __pyx_t_5moses_8cdictree_FValue; /*--- Type declarations ---*/ +struct __pyx_obj_5moses_7dictree_Production; +struct __pyx_obj_5moses_7dictree_Alignment; struct __pyx_obj_5moses_7dictree_FValues; -struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__; +struct __pyx_obj_5moses_7dictree_TargetProduction; +struct __pyx_obj_5moses_7dictree_QueryResult; struct __pyx_obj_5moses_7dictree_DictionaryTree; -struct __pyx_obj_5moses_7dictree_Alignment; +struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree; +struct __pyx_obj_5moses_7dictree_OnDiskWrapper; +struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__; struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__; -struct __pyx_obj_5moses_7dictree_QueryResult; -struct __pyx_obj_5moses_7dictree_Production; -struct __pyx_obj_5moses_7dictree_TargetProduction; -struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr; +struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr; struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__; -struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query; +struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr; struct __pyx_obj_5moses_7dictree___pyx_scope_struct_5_query; -struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr; -struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree; struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr; -struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr; -struct __pyx_obj_5moses_7dictree_OnDiskWrapper; +struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query; +struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr; /* "cdictree.pxd":4 * from libcpp.vector cimport vector - * + * * ctypedef string* str_pointer # <<<<<<<<<<<<<< * ctypedef string* const_str_pointer "const str_pointer" * ctypedef vector[const_str_pointer] Tokens @@ -398,7 +590,7 @@ struct __pyx_obj_5moses_7dictree_OnDiskWrapper; typedef std::string *__pyx_t_5moses_8cdictree_str_pointer; /* "cdictree.pxd":5 - * + * * ctypedef string* str_pointer * ctypedef string* const_str_pointer "const str_pointer" # <<<<<<<<<<<<<< * ctypedef vector[const_str_pointer] Tokens @@ -419,7 +611,7 @@ typedef std::vector __pyx_t_5moses_8cdictree_Tokens; * ctypedef vector[const_str_pointer] Tokens * ctypedef float FValue * ctypedef vector[FValue] Scores # <<<<<<<<<<<<<< - * + * * cdef extern from 'PhraseDictionaryTree.h' namespace 'Moses': */ typedef std::vector<__pyx_t_5moses_8cdictree_FValue> __pyx_t_5moses_8cdictree_Scores; @@ -427,7 +619,7 @@ struct __pyx_opt_args_5moses_7dictree_20PhraseDictionaryTree_getTargetProduction /* "moses/dictree.pyx":252 * and os.path.isfile(stem + ".binphr.tgtvoc") - * + * * cdef TargetProduction getTargetProduction(self, cdictree.StringTgtCand& cand, wa = None, converter = None): # <<<<<<<<<<<<<< * """Converts a StringTgtCandidate (c++ object) and possibly a word-alignment info (string) to a TargetProduction (python object).""" * cdef list words = [cand.tokens[i].c_str() for i in xrange(cand.tokens.size())] @@ -438,49 +630,23 @@ struct __pyx_opt_args_5moses_7dictree_20PhraseDictionaryTree_getTargetProduction PyObject *converter; }; -/* "moses/dictree.pyx":125 - * return ' '.join('%d-%d' % (s, t) for s, t in self) - * - * cdef class FValues(list): # <<<<<<<<<<<<<< +/* "moses/dictree.pyx":23 + * raise TypeError('Cannot convert %s to string' % type(data)) + * + * cdef class Production(object): # <<<<<<<<<<<<<< * """ - * This represents a list of feature values (floats). - */ -struct __pyx_obj_5moses_7dictree_FValues { - PyListObject __pyx_base; -}; - - -/* "moses/dictree.pyx":50 - * return IndexError, 'Index %s out of range' % str(key) - * - * def __iter__(self): # <<<<<<<<<<<<<< - * for x in self.rhs: - * yield x - */ -struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__ { - PyObject_HEAD - struct __pyx_obj_5moses_7dictree_Production *__pyx_v_self; - PyObject *__pyx_v_x; - PyObject *__pyx_t_0; - Py_ssize_t __pyx_t_1; -}; - - -/* "moses/dictree.pyx":184 - * - * - * cdef class DictionaryTree(object): # <<<<<<<<<<<<<< - * - * @classmethod + * General class that represents a context-free production or a flat contiguous phrase. */ -struct __pyx_obj_5moses_7dictree_DictionaryTree { +struct __pyx_obj_5moses_7dictree_Production { PyObject_HEAD + PyObject *lhs; + PyObject *rhs; }; /* "moses/dictree.pyx":104 * return x >= y - * + * * cdef class Alignment(list): # <<<<<<<<<<<<<< * """ * This represents a list of alignment points (pairs of integers). @@ -490,49 +656,21 @@ struct __pyx_obj_5moses_7dictree_Alignment { }; -/* "moses/dictree.pyx":122 - * ValueError, 'Cannot figure out pairs from: %s' % type(alignment) - * - * def __str__(self): # <<<<<<<<<<<<<< +/* "moses/dictree.pyx":125 * return ' '.join('%d-%d' % (s, t) for s, t in self) - * - */ -struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__ { - PyObject_HEAD - struct __pyx_obj_5moses_7dictree_Alignment *__pyx_v_self; -}; - - -/* "moses/dictree.pyx":175 - * return repr((repr(self.rhs), repr(self.lhs), repr(self.scores), repr(self.alignment))) - * - * cdef class QueryResult(list): # <<<<<<<<<<<<<< - * - * cdef readonly Production source - */ -struct __pyx_obj_5moses_7dictree_QueryResult { - PyListObject __pyx_base; - struct __pyx_obj_5moses_7dictree_Production *source; -}; - - -/* "moses/dictree.pyx":23 - * raise TypeError('Cannot convert %s to string' % type(data)) - * - * cdef class Production(object): # <<<<<<<<<<<<<< + * + * cdef class FValues(list): # <<<<<<<<<<<<<< * """ - * General class that represents a context-free production or a flat contiguous phrase. + * This represents a list of feature values (floats). */ -struct __pyx_obj_5moses_7dictree_Production { - PyObject_HEAD - PyObject *lhs; - PyObject *rhs; +struct __pyx_obj_5moses_7dictree_FValues { + PyListObject __pyx_base; }; /* "moses/dictree.pyx":137 * return ' '.join(str(x) for x in self) - * + * * cdef class TargetProduction(Production): # <<<<<<<<<<<<<< * """This class specializes production making it the target side of a translation rule. * On top of lhs and rhs it comes with alignment information a tuple of real-valued features. @@ -544,84 +682,34 @@ struct __pyx_obj_5moses_7dictree_TargetProduction { }; -/* "moses/dictree.pyx":344 - * else: - * scores = tuple(ephr.GetScores()) - * results.append(TargetProduction(words[:-1], (converter(score) for score in scores), ephr.GetAlign(), words[-1])) # <<<<<<<<<<<<<< - * if cmp: - * results.sort(cmp=cmp, key=key) - */ -struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr { - PyObject_HEAD - struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query *__pyx_outer_scope; - PyObject *__pyx_v_score; - PyObject *__pyx_t_0; - Py_ssize_t __pyx_t_1; - PyObject *(*__pyx_t_2)(PyObject *); -}; - - -/* "moses/dictree.pyx":134 - * super(FValues, self).__init__(values) - * - * def __str__(self): # <<<<<<<<<<<<<< - * return ' '.join(str(x) for x in self) - * - */ -struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__ { - PyObject_HEAD - struct __pyx_obj_5moses_7dictree_FValues *__pyx_v_self; -}; - - -/* "moses/dictree.pyx":316 - * return Production(tokens[:-1], tokens[-1]) - * - * def query(self, line, converter = None, cmp = None, key = None): # <<<<<<<<<<<<<< - * """ - * Returns a list of target productions that translate a given source production - */ -struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query { - PyObject_HEAD - PyObject *__pyx_v_converter; - PyObject *__pyx_v_scores; -}; - - -/* "moses/dictree.pyx":258 - * return TargetProduction(words, scores, wa) - * - * def query(self, line, converter = lambda x: log(x), cmp = lambda x, y: fsign(y.scores[2] - x.scores[2]), key = None): # <<<<<<<<<<<<<< - * """ - * Returns a list of target productions that translate a given source production +/* "moses/dictree.pyx":175 + * return repr((repr(self.rhs), repr(self.lhs), repr(self.scores), repr(self.alignment))) + * + * cdef class QueryResult(list): # <<<<<<<<<<<<<< + * + * cdef readonly Production source */ -struct __pyx_obj_5moses_7dictree___pyx_scope_struct_5_query { - PyObject_HEAD - std::vector __pyx_v_fphrase; +struct __pyx_obj_5moses_7dictree_QueryResult { + PyListObject __pyx_base; + struct __pyx_obj_5moses_7dictree_Production *source; }; -/* "moses/dictree.pyx":123 - * - * def __str__(self): - * return ' '.join('%d-%d' % (s, t) for s, t in self) # <<<<<<<<<<<<<< - * - * cdef class FValues(list): +/* "moses/dictree.pyx":184 + * + * + * cdef class DictionaryTree(object): # <<<<<<<<<<<<<< + * + * @classmethod */ -struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr { +struct __pyx_obj_5moses_7dictree_DictionaryTree { PyObject_HEAD - struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__ *__pyx_outer_scope; - PyObject *__pyx_v_s; - PyObject *__pyx_v_t; - PyObject *__pyx_t_0; - Py_ssize_t __pyx_t_1; - PyObject *(*__pyx_t_2)(PyObject *); }; /* "moses/dictree.pyx":202 * raise NotImplementedError - * + * * cdef class PhraseDictionaryTree(DictionaryTree): # <<<<<<<<<<<<<< * """This class encapsulates a Moses::PhraseDictionaryTree for operations over * binary phrase tables.""" @@ -638,26 +726,88 @@ struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree { }; -/* "moses/dictree.pyx":271 - * cdef vector[cdictree.StringTgtCand]* rv = new vector[cdictree.StringTgtCand]() - * cdef vector[string]* wa = NULL - * cdef Production source = Production(f.c_str() for f in fphrase) # <<<<<<<<<<<<<< - * cdef QueryResult results = QueryResult(source) - * +/* "moses/dictree.pyx":290 + * return results + * + * cdef class OnDiskWrapper(DictionaryTree): # <<<<<<<<<<<<<< + * + * cdef condiskpt.OnDiskWrapper *wrapper */ -struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr { +struct __pyx_obj_5moses_7dictree_OnDiskWrapper { + struct __pyx_obj_5moses_7dictree_DictionaryTree __pyx_base; + struct __pyx_vtabstruct_5moses_7dictree_OnDiskWrapper *__pyx_vtab; + OnDiskPt::OnDiskWrapper *wrapper; + OnDiskPt::OnDiskQuery *finder; + PyObject *delimiters; + unsigned int tableLimit; +}; + + +/* "moses/dictree.pyx":50 + * return IndexError, 'Index %s out of range' % str(key) + * + * def __iter__(self): # <<<<<<<<<<<<<< + * for x in self.rhs: + * yield x + */ +struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__ { PyObject_HEAD - struct __pyx_obj_5moses_7dictree___pyx_scope_struct_5_query *__pyx_outer_scope; - std::string __pyx_v_f; - std::vector::iterator __pyx_t_0; + struct __pyx_obj_5moses_7dictree_Production *__pyx_v_self; + PyObject *__pyx_v_x; + PyObject *__pyx_t_0; + Py_ssize_t __pyx_t_1; +}; + + +/* "moses/dictree.pyx":122 + * ValueError, 'Cannot figure out pairs from: %s' % type(alignment) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return ' '.join('%d-%d' % (s, t) for s, t in self) + * + */ +struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__ { + PyObject_HEAD + struct __pyx_obj_5moses_7dictree_Alignment *__pyx_v_self; +}; + + +/* "moses/dictree.pyx":123 + * + * def __str__(self): + * return ' '.join('%d-%d' % (s, t) for s, t in self) # <<<<<<<<<<<<<< + * + * cdef class FValues(list): + */ +struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr { + PyObject_HEAD + struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__ *__pyx_outer_scope; + PyObject *__pyx_v_s; + PyObject *__pyx_v_t; + PyObject *__pyx_t_0; + Py_ssize_t __pyx_t_1; + PyObject *(*__pyx_t_2)(PyObject *); +}; + + +/* "moses/dictree.pyx":134 + * super(FValues, self).__init__(values) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return ' '.join(str(x) for x in self) + * + */ +struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__ { + PyObject_HEAD + struct __pyx_obj_5moses_7dictree_FValues *__pyx_v_self; }; /* "moses/dictree.pyx":135 - * + * * def __str__(self): * return ' '.join(str(x) for x in self) # <<<<<<<<<<<<<< - * + * * cdef class TargetProduction(Production): */ struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr { @@ -670,27 +820,68 @@ struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr { }; -/* "moses/dictree.pyx":290 - * return results - * - * cdef class OnDiskWrapper(DictionaryTree): # <<<<<<<<<<<<<< - * - * cdef condiskpt.OnDiskWrapper *wrapper +/* "moses/dictree.pyx":258 + * return TargetProduction(words, scores, wa) + * + * def query(self, line, converter = lambda x: log(x), cmp = lambda x, y: fsign(y.scores[2] - x.scores[2]), key = None): # <<<<<<<<<<<<<< + * """ + * Returns a list of target productions that translate a given source production */ -struct __pyx_obj_5moses_7dictree_OnDiskWrapper { - struct __pyx_obj_5moses_7dictree_DictionaryTree __pyx_base; - struct __pyx_vtabstruct_5moses_7dictree_OnDiskWrapper *__pyx_vtab; - OnDiskPt::OnDiskWrapper *wrapper; - OnDiskPt::OnDiskQuery *finder; - PyObject *delimiters; - unsigned int tableLimit; +struct __pyx_obj_5moses_7dictree___pyx_scope_struct_5_query { + PyObject_HEAD + std::vector __pyx_v_fphrase; +}; + + +/* "moses/dictree.pyx":271 + * cdef vector[cdictree.StringTgtCand]* rv = new vector[cdictree.StringTgtCand]() + * cdef vector[string]* wa = NULL + * cdef Production source = Production(f.c_str() for f in fphrase) # <<<<<<<<<<<<<< + * cdef QueryResult results = QueryResult(source) + * + */ +struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr { + PyObject_HEAD + struct __pyx_obj_5moses_7dictree___pyx_scope_struct_5_query *__pyx_outer_scope; + std::string __pyx_v_f; + std::vector::iterator __pyx_t_0; +}; + + +/* "moses/dictree.pyx":316 + * return Production(tokens[:-1], tokens[-1]) + * + * def query(self, line, converter = None, cmp = None, key = None): # <<<<<<<<<<<<<< + * """ + * Returns a list of target productions that translate a given source production + */ +struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query { + PyObject_HEAD + PyObject *__pyx_v_converter; + PyObject *__pyx_v_scores; +}; + + +/* "moses/dictree.pyx":344 + * else: + * scores = tuple(ephr.GetScores()) + * results.append(TargetProduction(words[:-1], (converter(score) for score in scores), ephr.GetAlign(), words[-1])) # <<<<<<<<<<<<<< + * if cmp: + * results.sort(cmp=cmp, key=key) + */ +struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr { + PyObject_HEAD + struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query *__pyx_outer_scope; + PyObject *__pyx_v_score; + PyObject *__pyx_t_0; + Py_ssize_t __pyx_t_1; }; /* "moses/dictree.pyx":202 * raise NotImplementedError - * + * * cdef class PhraseDictionaryTree(DictionaryTree): # <<<<<<<<<<<<<< * """This class encapsulates a Moses::PhraseDictionaryTree for operations over * binary phrase tables.""" @@ -704,9 +895,9 @@ static struct __pyx_vtabstruct_5moses_7dictree_PhraseDictionaryTree *__pyx_vtabp /* "moses/dictree.pyx":290 * return results - * + * * cdef class OnDiskWrapper(DictionaryTree): # <<<<<<<<<<<<<< - * + * * cdef condiskpt.OnDiskWrapper *wrapper */ @@ -765,15 +956,65 @@ static struct __pyx_vtabstruct_5moses_7dictree_OnDiskWrapper *__pyx_vtabptr_5mos #define __Pyx_XGOTREF(r) #define __Pyx_XGIVEREF(r) #endif /* CYTHON_REFNANNY */ +#define __Pyx_XDECREF_SET(r, v) do { \ + PyObject *tmp = (PyObject *) r; \ + r = v; __Pyx_XDECREF(tmp); \ + } while (0) +#define __Pyx_DECREF_SET(r, v) do { \ + PyObject *tmp = (PyObject *) r; \ + r = v; __Pyx_DECREF(tmp); \ + } while (0) #define __Pyx_CLEAR(r) do { PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);} while(0) #define __Pyx_XCLEAR(r) do { if((r) != NULL) {PyObject* tmp = ((PyObject*)(r)); r = NULL; __Pyx_DECREF(tmp);}} while(0) -static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name); /*proto*/ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetAttrStr(PyObject* obj, PyObject* attr_name) { + PyTypeObject* tp = Py_TYPE(obj); + if (likely(tp->tp_getattro)) + return tp->tp_getattro(obj, attr_name); +#if PY_MAJOR_VERSION < 3 + if (likely(tp->tp_getattr)) + return tp->tp_getattr(obj, PyString_AS_STRING(attr_name)); +#endif + return PyObject_GetAttr(obj, attr_name); +} +#else +#define __Pyx_PyObject_GetAttrStr(o,n) PyObject_GetAttr(o,n) +#endif + +static PyObject *__Pyx_GetBuiltinName(PyObject *name); /*proto*/ + +#define __Pyx_GetItemInt(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ + __Pyx_GetItemInt_Fast(o, (Py_ssize_t)i, is_list, wraparound, boundscheck) : \ + (is_list ? (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL) : \ + __Pyx_GetItemInt_Generic(o, to_py_func(i)))) +#define __Pyx_GetItemInt_List(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ + __Pyx_GetItemInt_List_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ + (PyErr_SetString(PyExc_IndexError, "list index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +#define __Pyx_GetItemInt_Tuple(o, i, type, is_signed, to_py_func, is_list, wraparound, boundscheck) \ + (__Pyx_fits_Py_ssize_t(i, type, is_signed) ? \ + __Pyx_GetItemInt_Tuple_Fast(o, (Py_ssize_t)i, wraparound, boundscheck) : \ + (PyErr_SetString(PyExc_IndexError, "tuple index out of range"), (PyObject*)NULL)) +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j); +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck); + +static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name); /*proto*/ -static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ -static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw); /*proto*/ +#else +#define __Pyx_PyObject_Call(func, arg, kw) PyObject_Call(func, arg, kw) +#endif -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ +static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, + Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/ static void __Pyx_RaiseDoubleKeywordsError(const char* func_name, PyObject* kw_name); /*proto*/ @@ -781,14 +1022,33 @@ static int __Pyx_ParseOptionalKeywords(PyObject *kwds, PyObject **argnames[], \ PyObject *kwds2, PyObject *values[], Py_ssize_t num_pos_args, \ const char* function_name); /*proto*/ -static void __Pyx_RaiseArgtupleInvalid(const char* func_name, int exact, - Py_ssize_t num_min, Py_ssize_t num_max, Py_ssize_t num_found); /*proto*/ +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb); /*proto*/ +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ + +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause); /*proto*/ static CYTHON_INLINE int __Pyx_PySequence_Contains(PyObject* item, PyObject* seq, int eq) { int result = PySequence_Contains(seq, item); return unlikely(result < 0) ? result : (result == (eq == Py_EQ)); } +#if PY_MAJOR_VERSION < 3 +#define __Pyx_PyString_Join __Pyx_PyBytes_Join +#define __Pyx_PyBaseString_Join(s, v) (PyUnicode_CheckExact(s) ? PyUnicode_Join(s, v) : __Pyx_PyBytes_Join(s, v)) +#else +#define __Pyx_PyString_Join PyUnicode_Join +#define __Pyx_PyBaseString_Join PyUnicode_Join +#endif +#if CYTHON_COMPILING_IN_CPYTHON + #if PY_MAJOR_VERSION < 3 + #define __Pyx_PyBytes_Join _PyString_Join + #else + #define __Pyx_PyBytes_Join _PyBytes_Join + #endif +#else +static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values); /*proto*/ +#endif + static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected); static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index); @@ -797,101 +1057,31 @@ static CYTHON_INLINE int __Pyx_IterFinish(void); /*proto*/ static int __Pyx_IternextUnpackEndCheck(PyObject *retval, Py_ssize_t expected); /*proto*/ -static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); - -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { - PyObject *r; - if (!j) return NULL; - r = PyObject_GetItem(o, j); - Py_DECREF(j); - return r; -} -#define __Pyx_GetItemInt_List(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_List_Fast(o, i) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i) { -#if CYTHON_COMPILING_IN_CPYTHON - if (likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { - PyObject *r = PyList_GET_ITEM(o, i); - Py_INCREF(r); - return r; - } - else if ((-PyList_GET_SIZE(o) <= i) & (i < 0)) { - PyObject *r = PyList_GET_ITEM(o, PyList_GET_SIZE(o) + i); - Py_INCREF(r); - return r; - } - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -#else - return PySequence_GetItem(o, i); -#endif -} -#define __Pyx_GetItemInt_Tuple(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_Tuple_Fast(o, i) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i) { #if CYTHON_COMPILING_IN_CPYTHON - if (likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, i); - Py_INCREF(r); - return r; - } - else if ((-PyTuple_GET_SIZE(o) <= i) & (i < 0)) { - PyObject *r = PyTuple_GET_ITEM(o, PyTuple_GET_SIZE(o) + i); - Py_INCREF(r); - return r; +static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { + PyListObject* L = (PyListObject*) list; + Py_ssize_t len = Py_SIZE(list); + if (likely(L->allocated > len) & likely(len > (L->allocated >> 1))) { + Py_INCREF(x); + PyList_SET_ITEM(list, len, x); + Py_SIZE(list) = len+1; + return 0; } - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -#else - return PySequence_GetItem(o, i); -#endif + return PyList_Append(list, x); } -#define __Pyx_GetItemInt(o, i, size, to_py_func) (((size) <= sizeof(Py_ssize_t)) ? \ - __Pyx_GetItemInt_Fast(o, i) : \ - __Pyx_GetItemInt_Generic(o, to_py_func(i))) -static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i) { -#if CYTHON_COMPILING_IN_CPYTHON - if (PyList_CheckExact(o)) { - Py_ssize_t n = (likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); - if (likely((n >= 0) & (n < PyList_GET_SIZE(o)))) { - PyObject *r = PyList_GET_ITEM(o, n); - Py_INCREF(r); - return r; - } - } - else if (PyTuple_CheckExact(o)) { - Py_ssize_t n = (likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); - if (likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { - PyObject *r = PyTuple_GET_ITEM(o, n); - Py_INCREF(r); - return r; - } - } else { /* inlined PySequence_GetItem() */ - PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; - if (likely(m && m->sq_item)) { - if (unlikely(i < 0) && likely(m->sq_length)) { - Py_ssize_t l = m->sq_length(o); - if (unlikely(l < 0)) return NULL; - i += l; - } - return m->sq_item(o, i); - } - } #else - if (PySequence_Check(o)) { - return PySequence_GetItem(o, i); - } +#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) #endif - return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); -} + +static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname); static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type); /*proto*/ -static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, +static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact); /*proto*/ #if CYTHON_COMPILING_IN_CPYTHON -static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { +static CYTHON_INLINE int __Pyx_ListComp_Append(PyObject* list, PyObject* x) { PyListObject* L = (PyListObject*) list; Py_ssize_t len = Py_SIZE(list); if (likely(L->allocated > len)) { @@ -903,31 +1093,51 @@ static CYTHON_INLINE int __Pyx_PyList_Append(PyObject* list, PyObject* x) { return PyList_Append(list, x); } #else -#define __Pyx_PyList_Append(L,x) PyList_Append(L,x) +#define __Pyx_ListComp_Append(L,x) PyList_Append(L,x) #endif -static CYTHON_INLINE PyObject* __Pyx_PyObject_Append(PyObject* L, PyObject* x) { - if (likely(PyList_CheckExact(L))) { - if (unlikely(PyList_Append(L, x) < 0)) return NULL; - Py_INCREF(Py_None); - return Py_None; /* this is just to have an accurate signature */ - } else { - PyObject *r, *m; - m = __Pyx_GetAttrString(L, "append"); - if (!m) return NULL; - r = PyObject_CallFunctionObjArgs(m, x, NULL); - Py_DECREF(m); - return r; - } +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( + PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** py_start, PyObject** py_stop, PyObject** py_slice, + int has_cstart, int has_cstop, int wraparound); + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); +static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice(PyObject* src, Py_ssize_t start, Py_ssize_t stop); +#else +#define __Pyx_PyList_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) +#define __Pyx_PyTuple_GetSlice(seq, start, stop) PySequence_GetSlice(seq, start, stop) +#endif + +static PyObject* __Pyx_PyObject_CallMethodTuple(PyObject* obj, PyObject* method_name, PyObject* args) { + PyObject *method, *result = NULL; + if (unlikely(!args)) return NULL; + method = __Pyx_PyObject_GetAttrStr(obj, method_name); + if (unlikely(!method)) goto bad; + result = __Pyx_PyObject_Call(method, args, NULL); + Py_DECREF(method); +bad: + Py_DECREF(args); + return result; } +#define __Pyx_PyObject_CallMethod3(obj, name, arg1, arg2, arg3) \ + __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(3, arg1, arg2, arg3)) +#define __Pyx_PyObject_CallMethod2(obj, name, arg1, arg2) \ + __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(2, arg1, arg2)) +#define __Pyx_PyObject_CallMethod1(obj, name, arg1) \ + __Pyx_PyObject_CallMethodTuple(obj, name, PyTuple_Pack(1, arg1)) +#define __Pyx_PyObject_CallMethod0(obj, name) \ + __Pyx_PyObject_CallMethodTuple(obj, name, (Py_INCREF(__pyx_empty_tuple), __pyx_empty_tuple)) -static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse); +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x); /*proto*/ -static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_dealloc); +#include -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level); /*proto*/ +static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ + +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name); /*proto*/ -static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name); +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type); #define __Pyx_CyFunction_USED 1 #include @@ -944,33 +1154,56 @@ static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name); ((__pyx_CyFunctionObject *) (f))->defaults_getter = (g) typedef struct { PyCFunctionObject func; - int flags; PyObject *func_dict; PyObject *func_weakreflist; PyObject *func_name; + PyObject *func_qualname; PyObject *func_doc; + PyObject *func_globals; PyObject *func_code; PyObject *func_closure; PyObject *func_classobj; /* No-args super() class cell */ void *defaults; int defaults_pyobjects; - PyObject *defaults_tuple; /* Const defaults tuple */ + int flags; + PyObject *defaults_tuple; /* Const defaults tuple */ + PyObject *defaults_kwdict; /* Const kwonly defaults dict */ PyObject *(*defaults_getter)(PyObject *); + PyObject *func_annotations; /* function annotations dict */ } __pyx_CyFunctionObject; static PyTypeObject *__pyx_CyFunctionType = 0; -#define __Pyx_CyFunction_NewEx(ml, flags, self, module, code) \ - __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, self, module, code) -static PyObject *__Pyx_CyFunction_New(PyTypeObject *, - PyMethodDef *ml, int flags, - PyObject *self, PyObject *module, +#define __Pyx_CyFunction_NewEx(ml, flags, qualname, self, module, globals, code) \ + __Pyx_CyFunction_New(__pyx_CyFunctionType, ml, flags, qualname, self, module, globals, code) +static PyObject *__Pyx_CyFunction_New(PyTypeObject *, PyMethodDef *ml, + int flags, PyObject* qualname, + PyObject *self, + PyObject *module, PyObject *globals, PyObject* code); static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *m, size_t size, int pyobjects); static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *m, PyObject *tuple); +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *m, + PyObject *dict); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *m, + PyObject *dict); static int __Pyx_CyFunction_init(void); +static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name); /*proto*/ + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value); + +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level); /*proto*/ + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value); + +static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *); + +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value); + +static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *); + #ifndef __Pyx_CppExn2PyErr #include #include @@ -1015,39 +1248,11 @@ static void __Pyx_CppExn2PyErr() { #include "descrobject.h" static PyObject* __Pyx_Method_ClassMethod(PyObject *method); /*proto*/ -static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject *); - -static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject *); +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *); -static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject *); +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *); -static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject *); - -static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject *); - -static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject *); - -static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject *); - -static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject *); - -static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject *); - -static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject *); - -static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject *); - -static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject *); - -static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject *); - -static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject *); - -static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject *); - -static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject *); - -static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ +static CYTHON_INLINE void __Pyx_ExceptionSwap(PyObject **type, PyObject **value, PyObject **tb); /*proto*/ #define __Pyx_Generator_USED #include @@ -1064,7 +1269,7 @@ typedef struct { PyObject *classobj; PyObject *yieldfrom; int resume_label; - char is_running; // using T_BOOL for property below requires char value + char is_running; } __pyx_GeneratorObject; static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, PyObject *closure); @@ -1078,8 +1283,6 @@ static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue); static int __Pyx_check_binary_version(void); -static int __Pyx_SetVtable(PyObject *dict, void *vtable); /*proto*/ - typedef struct { int code_line; PyCodeObject* code_object; @@ -1153,6 +1356,9 @@ static PyObject *__pyx_builtin_ValueError; static PyObject *__pyx_builtin_NotImplementedError; static PyObject *__pyx_builtin_xrange; static PyObject *__pyx_builtin_range; +static PyObject *__pyx_lambda_funcdef_5moses_7dictree_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_r); /* proto */ +static PyObject *__pyx_lambda_funcdef_5moses_7dictree_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */ +static PyObject *__pyx_lambda_funcdef_5moses_7dictree_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */ static PyObject *__pyx_pf_5moses_7dictree_fsign(CYTHON_UNUSED PyObject *__pyx_self, float __pyx_v_x); /* proto */ static int __pyx_pf_5moses_7dictree_10Production___init__(struct __pyx_obj_5moses_7dictree_Production *__pyx_v_self, PyObject *__pyx_v_rhs, PyObject *__pyx_v_lhs); /* proto */ static Py_ssize_t __pyx_pf_5moses_7dictree_10Production_2__len__(struct __pyx_obj_5moses_7dictree_Production *__pyx_v_self); /* proto */ @@ -1174,7 +1380,6 @@ static int __pyx_pf_5moses_7dictree_7FValues___init__(struct __pyx_obj_5moses_7d static PyObject *__pyx_pf_5moses_7dictree_7FValues_7__str___genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_5moses_7dictree_7FValues_2__str__(struct __pyx_obj_5moses_7dictree_FValues *__pyx_v_self); /* proto */ static int __pyx_pf_5moses_7dictree_16TargetProduction___init__(struct __pyx_obj_5moses_7dictree_TargetProduction *__pyx_v_self, PyObject *__pyx_v_rhs, PyObject *__pyx_v_scores, PyObject *__pyx_v_alignment, PyObject *__pyx_v_lhs); /* proto */ -static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_r); /* proto */ static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_2desc(PyObject *__pyx_v_x, PyObject *__pyx_v_y, PyObject *__pyx_v_key); /* proto */ static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_4__str__(struct __pyx_obj_5moses_7dictree_TargetProduction *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_6__repr__(struct __pyx_obj_5moses_7dictree_TargetProduction *__pyx_v_self); /* proto */ @@ -1185,11 +1390,9 @@ static PyObject *__pyx_pf_5moses_7dictree_11QueryResult_6source___get__(struct _ static PyObject *__pyx_pf_5moses_7dictree_14DictionaryTree_canLoad(CYTHON_UNUSED PyObject *__pyx_v_cls, CYTHON_UNUSED PyObject *__pyx_v_path, CYTHON_UNUSED int __pyx_v_wa); /* proto */ static PyObject *__pyx_pf_5moses_7dictree_14DictionaryTree_2query(CYTHON_UNUSED struct __pyx_obj_5moses_7dictree_DictionaryTree *__pyx_v_self, CYTHON_UNUSED PyObject *__pyx_v_line, CYTHON_UNUSED PyObject *__pyx_v_converter, CYTHON_UNUSED PyObject *__pyx_v_cmp, CYTHON_UNUSED PyObject *__pyx_v_key); /* proto */ static int __pyx_pf_5moses_7dictree_20PhraseDictionaryTree___cinit__(struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *__pyx_v_self, PyObject *__pyx_v_path, unsigned int __pyx_v_tableLimit, unsigned int __pyx_v_nscores, int __pyx_v_wa, PyObject *__pyx_v_delimiters); /* proto */ -static void __pyx_pf_5moses_7dictree_20PhraseDictionaryTree_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *__pyx_v_self); /* proto */ +static void __pyx_pf_5moses_7dictree_20PhraseDictionaryTree_2__dealloc__(struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4canLoad(CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_stem, int __pyx_v_wa); /* proto */ -static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x); /* proto */ -static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y); /* proto */ -static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_5query_2genexpr(PyObject *__pyx_self); /* proto */ +static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_5query_genexpr(PyObject *__pyx_self); /* proto */ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *__pyx_v_self, PyObject *__pyx_v_line, PyObject *__pyx_v_converter, PyObject *__pyx_v_cmp, PyObject *__pyx_v_key); /* proto */ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4path___get__(struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_7nscores___get__(struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *__pyx_v_self); /* proto */ @@ -1203,176 +1406,433 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_4query(struct __pyx_ob static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_10delimiters___get__(struct __pyx_obj_5moses_7dictree_OnDiskWrapper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_10tableLimit___get__(struct __pyx_obj_5moses_7dictree_OnDiskWrapper *__pyx_v_self); /* proto */ static PyObject *__pyx_pf_5moses_7dictree_2load(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path, PyObject *__pyx_v_nscores, PyObject *__pyx_v_limit); /* proto */ -static char __pyx_k_1[] = "UTF-8"; -static char __pyx_k_3[] = "Cannot convert %s to string"; -static char __pyx_k_4[] = "Index %s out of range"; -static char __pyx_k_5[] = "%s -> %s"; -static char __pyx_k_6[] = " "; -static char __pyx_k_8[] = "-"; -static char __pyx_k_10[] = "Cannot figure out pairs from: %s"; -static char __pyx_k_11[] = "%d-%d"; -static char __pyx_k_14[] = " ||| "; -static char __pyx_k_16[] = " \t"; -static char __pyx_k_17[] = "'%s' doesn't seem a valid binary table."; -static char __pyx_k_18[] = ".binphr.idx"; -static char __pyx_k_19[] = ".binphr.srctree.wa"; -static char __pyx_k_20[] = ".binphr.srcvoc"; -static char __pyx_k_21[] = ".binphr.tgtdata.wa"; -static char __pyx_k_22[] = ".binphr.tgtvoc"; -static char __pyx_k_23[] = ".binphr.srctree"; -static char __pyx_k_24[] = ".binphr.tgtdata"; -static char __pyx_k_27[] = "/Misc.dat"; -static char __pyx_k_28[] = "/Source.dat"; -static char __pyx_k_29[] = "/TargetColl.dat"; -static char __pyx_k_30[] = "/TargetInd.dat"; -static char __pyx_k_31[] = "/Vocab.dat"; -static char __pyx_k_32[] = "%s does not seem to be a valid table"; -static char __pyx_k_33[] = "moses.dictree"; -static char __pyx_k_36[] = "/media/Data/tools/moses/mosesdecoder/contrib/python/moses/dictree.pyx"; -static char __pyx_k__x[] = "x"; -static char __pyx_k__y[] = "y"; -static char __pyx_k__os[] = "os"; -static char __pyx_k__wa[] = "wa"; -static char __pyx_k__cmp[] = "cmp"; -static char __pyx_k__key[] = "key"; -static char __pyx_k__lhs[] = "lhs"; -static char __pyx_k__log[] = "log"; -static char __pyx_k__rhs[] = "rhs"; -static char __pyx_k__desc[] = "desc"; -static char __pyx_k__join[] = "join"; -static char __pyx_k__line[] = "line"; -static char __pyx_k__load[] = "load"; -static char __pyx_k__math[] = "math"; -static char __pyx_k__path[] = "path"; -static char __pyx_k__sort[] = "sort"; -static char __pyx_k__stem[] = "stem"; -static char __pyx_k__chain[] = "chain"; -static char __pyx_k__limit[] = "limit"; -static char __pyx_k__range[] = "range"; -static char __pyx_k__split[] = "split"; -static char __pyx_k__super[] = "super"; -static char __pyx_k__encode[] = "encode"; -static char __pyx_k__extend[] = "extend"; -static char __pyx_k__isfile[] = "isfile"; -static char __pyx_k__scores[] = "scores"; -static char __pyx_k__source[] = "source"; -static char __pyx_k__values[] = "values"; -static char __pyx_k__xrange[] = "xrange"; -static char __pyx_k__canLoad[] = "canLoad"; -static char __pyx_k__nscores[] = "nscores"; -static char __pyx_k__targets[] = "targets"; -static char __pyx_k____init__[] = "__init__"; -static char __pyx_k____main__[] = "__main__"; -static char __pyx_k____test__[] = "__test__"; -static char __pyx_k__as_tuple[] = "as_tuple"; -static char __pyx_k__reversed[] = "reversed"; -static char __pyx_k__TypeError[] = "TypeError"; -static char __pyx_k__alignment[] = "alignment"; -static char __pyx_k__converter[] = "converter"; -static char __pyx_k__itertools[] = "itertools"; -static char __pyx_k__lhs_first[] = "lhs_first"; -static char __pyx_k__IndexError[] = "IndexError"; -static char __pyx_k__ValueError[] = "ValueError"; -static char __pyx_k__delimiters[] = "delimiters"; -static char __pyx_k__tableLimit[] = "tableLimit"; -static char __pyx_k__staticmethod[] = "staticmethod"; -static char __pyx_k__NotImplementedError[] = "NotImplementedError"; -static PyObject *__pyx_kp_s_1; -static PyObject *__pyx_kp_s_10; -static PyObject *__pyx_kp_s_11; -static PyObject *__pyx_kp_s_14; -static PyObject *__pyx_kp_s_16; -static PyObject *__pyx_kp_s_17; -static PyObject *__pyx_kp_s_18; -static PyObject *__pyx_kp_s_19; -static PyObject *__pyx_kp_s_20; -static PyObject *__pyx_kp_s_21; -static PyObject *__pyx_kp_s_22; -static PyObject *__pyx_kp_s_23; -static PyObject *__pyx_kp_s_24; -static PyObject *__pyx_kp_s_27; -static PyObject *__pyx_kp_s_28; -static PyObject *__pyx_kp_s_29; -static PyObject *__pyx_kp_s_3; -static PyObject *__pyx_kp_s_30; -static PyObject *__pyx_kp_s_31; -static PyObject *__pyx_kp_s_32; -static PyObject *__pyx_n_s_33; -static PyObject *__pyx_kp_s_36; -static PyObject *__pyx_kp_s_4; -static PyObject *__pyx_kp_s_5; -static PyObject *__pyx_kp_s_6; -static PyObject *__pyx_kp_s_8; -static PyObject *__pyx_n_s__IndexError; -static PyObject *__pyx_n_s__NotImplementedError; -static PyObject *__pyx_n_s__TypeError; -static PyObject *__pyx_n_s__ValueError; -static PyObject *__pyx_n_s____init__; -static PyObject *__pyx_n_s____main__; -static PyObject *__pyx_n_s____test__; -static PyObject *__pyx_n_s__alignment; -static PyObject *__pyx_n_s__as_tuple; -static PyObject *__pyx_n_s__canLoad; -static PyObject *__pyx_n_s__chain; -static PyObject *__pyx_n_s__cmp; -static PyObject *__pyx_n_s__converter; -static PyObject *__pyx_n_s__delimiters; -static PyObject *__pyx_n_s__desc; -static PyObject *__pyx_n_s__encode; -static PyObject *__pyx_n_s__extend; -static PyObject *__pyx_n_s__isfile; -static PyObject *__pyx_n_s__itertools; -static PyObject *__pyx_n_s__join; -static PyObject *__pyx_n_s__key; -static PyObject *__pyx_n_s__lhs; -static PyObject *__pyx_n_s__lhs_first; -static PyObject *__pyx_n_s__limit; -static PyObject *__pyx_n_s__line; -static PyObject *__pyx_n_s__load; -static PyObject *__pyx_n_s__log; -static PyObject *__pyx_n_s__math; -static PyObject *__pyx_n_s__nscores; -static PyObject *__pyx_n_s__os; -static PyObject *__pyx_n_s__path; -static PyObject *__pyx_n_s__range; -static PyObject *__pyx_n_s__reversed; -static PyObject *__pyx_n_s__rhs; -static PyObject *__pyx_n_s__scores; -static PyObject *__pyx_n_s__sort; -static PyObject *__pyx_n_s__source; -static PyObject *__pyx_n_s__split; -static PyObject *__pyx_n_s__staticmethod; -static PyObject *__pyx_n_s__stem; -static PyObject *__pyx_n_s__super; -static PyObject *__pyx_n_s__tableLimit; -static PyObject *__pyx_n_s__targets; -static PyObject *__pyx_n_s__values; -static PyObject *__pyx_n_s__wa; -static PyObject *__pyx_n_s__x; -static PyObject *__pyx_n_s__xrange; -static PyObject *__pyx_n_s__y; +static PyObject *__pyx_tp_new_5moses_7dictree_Production(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_5moses_7dictree_Alignment(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_5moses_7dictree_FValues(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_5moses_7dictree_TargetProduction(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_5moses_7dictree_QueryResult(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_5moses_7dictree_DictionaryTree(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_5moses_7dictree_PhraseDictionaryTree(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_5moses_7dictree_OnDiskWrapper(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct____iter__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct_1___str__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct_2_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct_3___str__(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct_4_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct_5_query(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct_6_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct_7_query(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct_8_genexpr(PyTypeObject *t, PyObject *a, PyObject *k); /*proto*/ +static char __pyx_k_x[] = "x"; +static char __pyx_k_y[] = "y"; +static char __pyx_k__2[] = " "; +static char __pyx_k__3[] = "-"; +static char __pyx_k__7[] = " ||| "; +static char __pyx_k__9[] = " \t"; +static char __pyx_k_os[] = "os"; +static char __pyx_k_wa[] = "wa"; +static char __pyx_k_cmp[] = "cmp"; +static char __pyx_k_d_d[] = "%d-%d"; +static char __pyx_k_key[] = "key"; +static char __pyx_k_lhs[] = "lhs"; +static char __pyx_k_log[] = "log"; +static char __pyx_k_rhs[] = "rhs"; +static char __pyx_k_s_s[] = "%s -> %s"; +static char __pyx_k_args[] = "args"; +static char __pyx_k_desc[] = "desc"; +static char __pyx_k_init[] = "__init__"; +static char __pyx_k_join[] = "join"; +static char __pyx_k_line[] = "line"; +static char __pyx_k_load[] = "load"; +static char __pyx_k_main[] = "__main__"; +static char __pyx_k_math[] = "math"; +static char __pyx_k_path[] = "path"; +static char __pyx_k_send[] = "send"; +static char __pyx_k_sort[] = "sort"; +static char __pyx_k_stem[] = "stem"; +static char __pyx_k_test[] = "__test__"; +static char __pyx_k_UTF_8[] = "UTF-8"; +static char __pyx_k_chain[] = "chain"; +static char __pyx_k_close[] = "close"; +static char __pyx_k_limit[] = "limit"; +static char __pyx_k_range[] = "range"; +static char __pyx_k_split[] = "split"; +static char __pyx_k_super[] = "super"; +static char __pyx_k_throw[] = "throw"; +static char __pyx_k_append[] = "append"; +static char __pyx_k_encode[] = "encode"; +static char __pyx_k_extend[] = "extend"; +static char __pyx_k_import[] = "__import__"; +static char __pyx_k_isfile[] = "isfile"; +static char __pyx_k_scores[] = "scores"; +static char __pyx_k_source[] = "source"; +static char __pyx_k_values[] = "values"; +static char __pyx_k_xrange[] = "xrange"; +static char __pyx_k_canLoad[] = "canLoad"; +static char __pyx_k_nscores[] = "nscores"; +static char __pyx_k_targets[] = "targets"; +static char __pyx_k_Misc_dat[] = "/Misc.dat"; +static char __pyx_k_as_tuple[] = "as_tuple"; +static char __pyx_k_reversed[] = "reversed"; +static char __pyx_k_TypeError[] = "TypeError"; +static char __pyx_k_Vocab_dat[] = "/Vocab.dat"; +static char __pyx_k_alignment[] = "alignment"; +static char __pyx_k_converter[] = "converter"; +static char __pyx_k_itertools[] = "itertools"; +static char __pyx_k_lhs_first[] = "lhs_first"; +static char __pyx_k_IndexError[] = "IndexError"; +static char __pyx_k_Source_dat[] = "/Source.dat"; +static char __pyx_k_ValueError[] = "ValueError"; +static char __pyx_k_binphr_idx[] = ".binphr.idx"; +static char __pyx_k_delimiters[] = "delimiters"; +static char __pyx_k_pyx_vtable[] = "__pyx_vtable__"; +static char __pyx_k_tableLimit[] = "tableLimit"; +static char __pyx_k_staticmethod[] = "staticmethod"; +static char __pyx_k_TargetInd_dat[] = "/TargetInd.dat"; +static char __pyx_k_binphr_srcvoc[] = ".binphr.srcvoc"; +static char __pyx_k_binphr_tgtvoc[] = ".binphr.tgtvoc"; +static char __pyx_k_moses_dictree[] = "moses.dictree"; +static char __pyx_k_TargetColl_dat[] = "/TargetColl.dat"; +static char __pyx_k_binphr_srctree[] = ".binphr.srctree"; +static char __pyx_k_binphr_tgtdata[] = ".binphr.tgtdata"; +static char __pyx_k_binphr_srctree_wa[] = ".binphr.srctree.wa"; +static char __pyx_k_binphr_tgtdata_wa[] = ".binphr.tgtdata.wa"; +static char __pyx_k_desc_locals_lambda[] = "desc.."; +static char __pyx_k_NotImplementedError[] = "NotImplementedError"; +static char __pyx_k_query_locals_lambda[] = "query.."; +static char __pyx_k_Index_s_out_of_range[] = "Index %s out of range"; +static char __pyx_k_Cannot_convert_s_to_string[] = "Cannot convert %s to string"; +static char __pyx_k_Cannot_figure_out_pairs_from_s[] = "Cannot figure out pairs from: %s"; +static char __pyx_k_home_proycon_work_mosesdecoder[] = "/home/proycon/work/mosesdecoder/contrib/python/moses/dictree.pyx"; +static char __pyx_k_s_does_not_seem_to_be_a_valid_t[] = "%s does not seem to be a valid table"; +static char __pyx_k_s_doesn_t_seem_a_valid_binary_t[] = "'%s' doesn't seem a valid binary table."; +static PyObject *__pyx_kp_s_Cannot_convert_s_to_string; +static PyObject *__pyx_kp_s_Cannot_figure_out_pairs_from_s; +static PyObject *__pyx_n_s_IndexError; +static PyObject *__pyx_kp_s_Index_s_out_of_range; +static PyObject *__pyx_kp_s_Misc_dat; +static PyObject *__pyx_n_s_NotImplementedError; +static PyObject *__pyx_kp_s_Source_dat; +static PyObject *__pyx_kp_s_TargetColl_dat; +static PyObject *__pyx_kp_s_TargetInd_dat; +static PyObject *__pyx_n_s_TypeError; +static PyObject *__pyx_kp_s_UTF_8; +static PyObject *__pyx_n_s_ValueError; +static PyObject *__pyx_kp_s_Vocab_dat; +static PyObject *__pyx_kp_s__2; +static PyObject *__pyx_kp_s__3; +static PyObject *__pyx_kp_s__7; +static PyObject *__pyx_kp_s__9; +static PyObject *__pyx_n_s_alignment; +static PyObject *__pyx_n_s_append; +static PyObject *__pyx_n_s_args; +static PyObject *__pyx_n_s_as_tuple; +static PyObject *__pyx_kp_s_binphr_idx; +static PyObject *__pyx_kp_s_binphr_srctree; +static PyObject *__pyx_kp_s_binphr_srctree_wa; +static PyObject *__pyx_kp_s_binphr_srcvoc; +static PyObject *__pyx_kp_s_binphr_tgtdata; +static PyObject *__pyx_kp_s_binphr_tgtdata_wa; +static PyObject *__pyx_kp_s_binphr_tgtvoc; +static PyObject *__pyx_n_s_canLoad; +static PyObject *__pyx_n_s_chain; +static PyObject *__pyx_n_s_close; +static PyObject *__pyx_n_s_cmp; +static PyObject *__pyx_n_s_converter; +static PyObject *__pyx_kp_s_d_d; +static PyObject *__pyx_n_s_delimiters; +static PyObject *__pyx_n_s_desc; +static PyObject *__pyx_n_s_desc_locals_lambda; +static PyObject *__pyx_n_s_encode; +static PyObject *__pyx_n_s_extend; +static PyObject *__pyx_kp_s_home_proycon_work_mosesdecoder; +static PyObject *__pyx_n_s_import; +static PyObject *__pyx_n_s_init; +static PyObject *__pyx_n_s_isfile; +static PyObject *__pyx_n_s_itertools; +static PyObject *__pyx_n_s_join; +static PyObject *__pyx_n_s_key; +static PyObject *__pyx_n_s_lhs; +static PyObject *__pyx_n_s_lhs_first; +static PyObject *__pyx_n_s_limit; +static PyObject *__pyx_n_s_line; +static PyObject *__pyx_n_s_load; +static PyObject *__pyx_n_s_log; +static PyObject *__pyx_n_s_main; +static PyObject *__pyx_n_s_math; +static PyObject *__pyx_n_s_moses_dictree; +static PyObject *__pyx_n_s_nscores; +static PyObject *__pyx_n_s_os; +static PyObject *__pyx_n_s_path; +static PyObject *__pyx_n_s_pyx_vtable; +static PyObject *__pyx_n_s_query_locals_lambda; +static PyObject *__pyx_n_s_range; +static PyObject *__pyx_n_s_reversed; +static PyObject *__pyx_n_s_rhs; +static PyObject *__pyx_kp_s_s_does_not_seem_to_be_a_valid_t; +static PyObject *__pyx_kp_s_s_doesn_t_seem_a_valid_binary_t; +static PyObject *__pyx_kp_s_s_s; +static PyObject *__pyx_n_s_scores; +static PyObject *__pyx_n_s_send; +static PyObject *__pyx_n_s_sort; +static PyObject *__pyx_n_s_source; +static PyObject *__pyx_n_s_split; +static PyObject *__pyx_n_s_staticmethod; +static PyObject *__pyx_n_s_stem; +static PyObject *__pyx_n_s_super; +static PyObject *__pyx_n_s_tableLimit; +static PyObject *__pyx_n_s_targets; +static PyObject *__pyx_n_s_test; +static PyObject *__pyx_n_s_throw; +static PyObject *__pyx_n_s_values; +static PyObject *__pyx_n_s_wa; +static PyObject *__pyx_n_s_x; +static PyObject *__pyx_n_s_xrange; +static PyObject *__pyx_n_s_y; static PyObject *__pyx_int_0; static PyObject *__pyx_int_1; static PyObject *__pyx_int_2; static PyObject *__pyx_int_3; static PyObject *__pyx_int_4; static PyObject *__pyx_int_5; -static PyObject *__pyx_k_7; -static PyObject *__pyx_k_12; -static PyObject *__pyx_k_13; -static PyObject *__pyx_k_15; -static PyObject *__pyx_k_25; -static PyObject *__pyx_k_26; -static PyObject *__pyx_k_tuple_2; -static PyObject *__pyx_k_tuple_9; -static PyObject *__pyx_k_tuple_34; -static PyObject *__pyx_k_tuple_37; -static PyObject *__pyx_k_codeobj_35; -static PyObject *__pyx_k_codeobj_38; +static PyObject *__pyx_k__5; +static PyObject *__pyx_k__6; +static PyObject *__pyx_k__8; +static PyObject *__pyx_k__10; +static PyObject *__pyx_k__11; +static PyObject *__pyx_tuple_; +static PyObject *__pyx_tuple__4; +static PyObject *__pyx_tuple__12; +static PyObject *__pyx_tuple__14; +static PyObject *__pyx_codeobj__13; +static PyObject *__pyx_codeobj__15; + +/* "moses/dictree.pyx":156 + * + * @staticmethod + * def desc(x, y, key = lambda r: r.scores[0]): # <<<<<<<<<<<<<< + * """Returns the sign of key(y) - key(x). + * Can only be used if scores is not an empty vector as + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_5moses_7dictree_4lambda1(PyObject *__pyx_self, PyObject *__pyx_v_r); /*proto*/ +static PyMethodDef __pyx_mdef_5moses_7dictree_4lambda1 = {__Pyx_NAMESTR("lambda1"), (PyCFunction)__pyx_pw_5moses_7dictree_4lambda1, METH_O, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pw_5moses_7dictree_4lambda1(PyObject *__pyx_self, PyObject *__pyx_v_r) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0); + __pyx_r = __pyx_lambda_funcdef_5moses_7dictree_lambda1(__pyx_self, ((PyObject *)__pyx_v_r)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_lambda_funcdef_5moses_7dictree_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_r) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lambda1", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_r, __pyx_n_s_scores); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_AddTraceback("moses.dictree.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* "moses/dictree.pyx":258 + * return TargetProduction(words, scores, wa) + * + * def query(self, line, converter = lambda x: log(x), cmp = lambda x, y: fsign(y.scores[2] - x.scores[2]), key = None): # <<<<<<<<<<<<<< + * """ + * Returns a list of target productions that translate a given source production + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_5moses_7dictree_5lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/ +static PyMethodDef __pyx_mdef_5moses_7dictree_5lambda2 = {__Pyx_NAMESTR("lambda2"), (PyCFunction)__pyx_pw_5moses_7dictree_5lambda2, METH_O, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pw_5moses_7dictree_5lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x) { + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0); + __pyx_r = __pyx_lambda_funcdef_5moses_7dictree_lambda2(__pyx_self, ((PyObject *)__pyx_v_x)); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_lambda_funcdef_5moses_7dictree_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lambda2", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_log); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_x); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_x); + __Pyx_GIVEREF(__pyx_v_x); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("moses.dictree.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +/* Python wrapper */ +static PyObject *__pyx_pw_5moses_7dictree_6lambda3(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +static PyMethodDef __pyx_mdef_5moses_7dictree_6lambda3 = {__Pyx_NAMESTR("lambda3"), (PyCFunction)__pyx_pw_5moses_7dictree_6lambda3, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; +static PyObject *__pyx_pw_5moses_7dictree_6lambda3(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { + PyObject *__pyx_v_x = 0; + PyObject *__pyx_v_y = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + PyObject *__pyx_r = 0; + __Pyx_RefNannyDeclarations + __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0); + { + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,0}; + PyObject* values[2] = {0,0}; + if (unlikely(__pyx_kwds)) { + Py_ssize_t kw_args; + const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); + switch (pos_args) { + case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + case 0: break; + default: goto __pyx_L5_argtuple_error; + } + kw_args = PyDict_Size(__pyx_kwds); + switch (pos_args) { + case 0: + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; + else goto __pyx_L5_argtuple_error; + case 1: + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; + else { + __Pyx_RaiseArgtupleInvalid("lambda3", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } + if (unlikely(kw_args > 0)) { + if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda3") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + } + } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { + goto __pyx_L5_argtuple_error; + } else { + values[0] = PyTuple_GET_ITEM(__pyx_args, 0); + values[1] = PyTuple_GET_ITEM(__pyx_args, 1); + } + __pyx_v_x = values[0]; + __pyx_v_y = values[1]; + } + goto __pyx_L4_argument_unpacking_done; + __pyx_L5_argtuple_error:; + __Pyx_RaiseArgtupleInvalid("lambda3", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_L3_error:; + __Pyx_AddTraceback("moses.dictree.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __Pyx_RefNannyFinishContext(); + return NULL; + __pyx_L4_argument_unpacking_done:; + __pyx_r = __pyx_lambda_funcdef_5moses_7dictree_lambda3(__pyx_self, __pyx_v_x, __pyx_v_y); + + /* function exit code */ + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} + +static PyObject *__pyx_lambda_funcdef_5moses_7dictree_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y) { + PyObject *__pyx_r = NULL; + __Pyx_RefNannyDeclarations + PyObject *__pyx_t_1 = NULL; + PyObject *__pyx_t_2 = NULL; + PyObject *__pyx_t_3 = NULL; + float __pyx_t_4; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; + __Pyx_RefNannySetupContext("lambda3", 0); + __Pyx_XDECREF(__pyx_r); + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_y, __pyx_n_s_scores); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_2 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_x, __pyx_n_s_scores); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 2, long, 1, __Pyx_PyInt_From_long, 0, 0, 1); if (unlikely(__pyx_t_3 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5moses_7dictree_fsign(__pyx_t_4, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; + goto __pyx_L0; + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_2); + __Pyx_XDECREF(__pyx_t_3); + __Pyx_AddTraceback("moses.dictree.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename); + __pyx_r = NULL; + __pyx_L0:; + __Pyx_XGIVEREF(__pyx_r); + __Pyx_RefNannyFinishContext(); + return __pyx_r; +} /* "moses/dictree.pyx":12 * from math import log - * + * * cpdef int fsign(float x): # <<<<<<<<<<<<<< * """Simply returns the sign of float x (zero is assumed +), it's defined here just so one gains a little bit with static typing""" * return 1 if x >= 0 else -1 @@ -1382,17 +1842,17 @@ static PyObject *__pyx_pw_5moses_7dictree_1fsign(PyObject *__pyx_self, PyObject static int __pyx_f_5moses_7dictree_fsign(float __pyx_v_x, CYTHON_UNUSED int __pyx_skip_dispatch) { int __pyx_r; __Pyx_RefNannyDeclarations - long __pyx_t_1; + int __pyx_t_1; __Pyx_RefNannySetupContext("fsign", 0); /* "moses/dictree.pyx":14 * cpdef int fsign(float x): * """Simply returns the sign of float x (zero is assumed +), it's defined here just so one gains a little bit with static typing""" * return 1 if x >= 0 else -1 # <<<<<<<<<<<<<< - * + * * cdef bytes as_str(data): */ - if ((__pyx_v_x >= 0.0)) { + if (((__pyx_v_x >= 0.0) != 0)) { __pyx_t_1 = 1; } else { __pyx_t_1 = -1; @@ -1400,7 +1860,15 @@ static int __pyx_f_5moses_7dictree_fsign(float __pyx_v_x, CYTHON_UNUSED int __py __pyx_r = __pyx_t_1; goto __pyx_L0; - __pyx_r = 0; + /* "moses/dictree.pyx":12 + * from math import log + * + * cpdef int fsign(float x): # <<<<<<<<<<<<<< + * """Simply returns the sign of float x (zero is assumed +), it's defined here just so one gains a little bit with static typing""" + * return 1 if x >= 0 else -1 + */ + + /* function exit code */ __pyx_L0:; __Pyx_RefNannyFinishContext(); return __pyx_r; @@ -1411,6 +1879,9 @@ static PyObject *__pyx_pw_5moses_7dictree_1fsign(PyObject *__pyx_self, PyObject static char __pyx_doc_5moses_7dictree_fsign[] = "Simply returns the sign of float x (zero is assumed +), it's defined here just so one gains a little bit with static typing"; static PyObject *__pyx_pw_5moses_7dictree_1fsign(PyObject *__pyx_self, PyObject *__pyx_arg_x) { float __pyx_v_x; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("fsign (wrapper)", 0); @@ -1424,18 +1895,12 @@ static PyObject *__pyx_pw_5moses_7dictree_1fsign(PyObject *__pyx_self, PyObject return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_5moses_7dictree_fsign(__pyx_self, ((float)__pyx_v_x)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":12 - * from math import log - * - * cpdef int fsign(float x): # <<<<<<<<<<<<<< - * """Simply returns the sign of float x (zero is assumed +), it's defined here just so one gains a little bit with static typing""" - * return 1 if x >= 0 else -1 - */ - static PyObject *__pyx_pf_5moses_7dictree_fsign(CYTHON_UNUSED PyObject *__pyx_self, float __pyx_v_x) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -1445,14 +1910,13 @@ static PyObject *__pyx_pf_5moses_7dictree_fsign(CYTHON_UNUSED PyObject *__pyx_se int __pyx_clineno = 0; __Pyx_RefNannySetupContext("fsign", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyInt_FromLong(__pyx_f_5moses_7dictree_fsign(__pyx_v_x, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5moses_7dictree_fsign(__pyx_v_x, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("moses.dictree.fsign", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -1465,7 +1929,7 @@ static PyObject *__pyx_pf_5moses_7dictree_fsign(CYTHON_UNUSED PyObject *__pyx_se /* "moses/dictree.pyx":16 * return 1 if x >= 0 else -1 - * + * * cdef bytes as_str(data): # <<<<<<<<<<<<<< * if isinstance(data, bytes): * return data @@ -1474,25 +1938,24 @@ static PyObject *__pyx_pf_5moses_7dictree_fsign(CYTHON_UNUSED PyObject *__pyx_se static PyObject *__pyx_f_5moses_7dictree_as_str(PyObject *__pyx_v_data) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; + int __pyx_t_1; int __pyx_t_2; PyObject *__pyx_t_3 = NULL; + PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("as_str", 0); /* "moses/dictree.pyx":17 - * + * * cdef bytes as_str(data): * if isinstance(data, bytes): # <<<<<<<<<<<<<< * return data * elif isinstance(data, unicode): */ - __pyx_t_1 = ((PyObject *)((PyObject*)(&PyBytes_Type))); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_data, __pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = PyBytes_Check(__pyx_v_data); + __pyx_t_2 = (__pyx_t_1 != 0); if (__pyx_t_2) { /* "moses/dictree.pyx":18 @@ -1502,12 +1965,11 @@ static PyObject *__pyx_f_5moses_7dictree_as_str(PyObject *__pyx_v_data) { * elif isinstance(data, unicode): * return data.encode('UTF-8') */ - __Pyx_XDECREF(((PyObject *)__pyx_r)); - if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_data)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_XDECREF(__pyx_r); + if (!(likely(PyBytes_CheckExact(__pyx_v_data))||((__pyx_v_data) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_data)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 18; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_INCREF(__pyx_v_data); __pyx_r = ((PyObject*)__pyx_v_data); goto __pyx_L0; - goto __pyx_L3; } /* "moses/dictree.pyx":19 @@ -1517,59 +1979,62 @@ static PyObject *__pyx_f_5moses_7dictree_as_str(PyObject *__pyx_v_data) { * return data.encode('UTF-8') * raise TypeError('Cannot convert %s to string' % type(data)) */ - __pyx_t_1 = ((PyObject *)((PyObject*)(&PyUnicode_Type))); - __Pyx_INCREF(__pyx_t_1); - __pyx_t_2 = __Pyx_TypeCheck(__pyx_v_data, __pyx_t_1); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (__pyx_t_2) { + __pyx_t_2 = PyUnicode_Check(__pyx_v_data); + __pyx_t_1 = (__pyx_t_2 != 0); + if (__pyx_t_1) { /* "moses/dictree.pyx":20 * return data * elif isinstance(data, unicode): * return data.encode('UTF-8') # <<<<<<<<<<<<<< * raise TypeError('Cannot convert %s to string' % type(data)) - * + * */ - __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_data, __pyx_n_s__encode); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_k_tuple_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_XDECREF(__pyx_r); + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_data, __pyx_n_s_encode); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (!(likely(PyBytes_CheckExact(__pyx_t_3))||((__pyx_t_3) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_t_3)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = ((PyObject*)__pyx_t_3); - __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_tuple_, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (!(likely(PyBytes_CheckExact(__pyx_t_4))||((__pyx_t_4) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_t_4)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_r = ((PyObject*)__pyx_t_4); + __pyx_t_4 = 0; goto __pyx_L0; - goto __pyx_L3; } - __pyx_L3:; /* "moses/dictree.pyx":21 * elif isinstance(data, unicode): * return data.encode('UTF-8') * raise TypeError('Cannot convert %s to string' % type(data)) # <<<<<<<<<<<<<< - * + * * cdef class Production(object): */ - __pyx_t_3 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_3), ((PyObject *)Py_TYPE(__pyx_v_data))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_t_3)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_3)); - __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Call(__pyx_builtin_TypeError, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_convert_s_to_string, ((PyObject *)Py_TYPE(__pyx_v_data))); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __Pyx_Raise(__pyx_t_3, 0, 0, 0); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_TypeError, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_Raise(__pyx_t_4, 0, 0, 0); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = ((PyObject*)Py_None); __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":16 + * return 1 if x >= 0 else -1 + * + * cdef bytes as_str(data): # <<<<<<<<<<<<<< + * if isinstance(data, bytes): + * return data + */ + + /* function exit code */ __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("moses.dictree.as_str", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = 0; __pyx_L0:; @@ -1578,8 +2043,16 @@ static PyObject *__pyx_f_5moses_7dictree_as_str(PyObject *__pyx_v_data) { return __pyx_r; } -/* Python wrapper */ -static int __pyx_pw_5moses_7dictree_10Production_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +/* "moses/dictree.pyx":33 + * cdef readonly tuple rhs + * + * def __init__(self, rhs, lhs = None): # <<<<<<<<<<<<<< + * """ + * :rhs right-hand side of the production (or the flat contiguous phrase) - sequence of strings + */ + +/* Python wrapper */ +static int __pyx_pw_5moses_7dictree_10Production_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5moses_7dictree_10Production___init__[] = "\n :rhs right-hand side of the production (or the flat contiguous phrase) - sequence of strings\n :lhs left-hand side nonterminal (or None in the case of flat contiguous phrases)\n "; #if CYTHON_COMPILING_IN_CPYTHON struct wrapperbase __pyx_wrapperbase_5moses_7dictree_10Production___init__; @@ -1587,20 +2060,15 @@ struct wrapperbase __pyx_wrapperbase_5moses_7dictree_10Production___init__; static int __pyx_pw_5moses_7dictree_10Production_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_rhs = 0; PyObject *__pyx_v_lhs = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__rhs,&__pyx_n_s__lhs,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rhs,&__pyx_n_s_lhs,0}; PyObject* values[2] = {0,0}; - - /* "moses/dictree.pyx":33 - * cdef readonly tuple rhs - * - * def __init__(self, rhs, lhs = None): # <<<<<<<<<<<<<< - * """ - * :rhs right-hand side of the production (or the flat contiguous phrase) - sequence of strings - */ values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -1614,11 +2082,11 @@ static int __pyx_pw_5moses_7dictree_10Production_1__init__(PyObject *__pyx_v_sel kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rhs)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lhs); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lhs); if (value) { values[1] = value; kw_args--; } } } @@ -1645,6 +2113,8 @@ static int __pyx_pw_5moses_7dictree_10Production_1__init__(PyObject *__pyx_v_sel return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_5moses_7dictree_10Production___init__(((struct __pyx_obj_5moses_7dictree_Production *)__pyx_v_self), __pyx_v_rhs, __pyx_v_lhs); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -1664,19 +2134,19 @@ static int __pyx_pf_5moses_7dictree_10Production___init__(struct __pyx_obj_5mose * """ * self.rhs = tuple(rhs) # <<<<<<<<<<<<<< * self.lhs = lhs - * + * */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_rhs); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_rhs); __Pyx_GIVEREF(__pyx_v_rhs); - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 38; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->rhs); - __Pyx_DECREF(((PyObject *)__pyx_v_self->rhs)); + __Pyx_DECREF(__pyx_v_self->rhs); __pyx_v_self->rhs = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; @@ -1684,16 +2154,27 @@ static int __pyx_pf_5moses_7dictree_10Production___init__(struct __pyx_obj_5mose * """ * self.rhs = tuple(rhs) * self.lhs = lhs # <<<<<<<<<<<<<< - * + * * def __len__(self): */ - if (!(likely(PyBytes_CheckExact(__pyx_v_lhs))||((__pyx_v_lhs) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_lhs)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_INCREF(__pyx_v_lhs); - __Pyx_GIVEREF(__pyx_v_lhs); + if (!(likely(PyBytes_CheckExact(__pyx_v_lhs))||((__pyx_v_lhs) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_lhs)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 39; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_v_lhs; + __Pyx_INCREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->lhs); - __Pyx_DECREF(((PyObject *)__pyx_v_self->lhs)); - __pyx_v_self->lhs = ((PyObject*)__pyx_v_lhs); + __Pyx_DECREF(__pyx_v_self->lhs); + __pyx_v_self->lhs = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; + + /* "moses/dictree.pyx":33 + * cdef readonly tuple rhs + * + * def __init__(self, rhs, lhs = None): # <<<<<<<<<<<<<< + * """ + * :rhs right-hand side of the production (or the flat contiguous phrase) - sequence of strings + */ + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -1706,6 +2187,14 @@ static int __pyx_pf_5moses_7dictree_10Production___init__(struct __pyx_obj_5mose return __pyx_r; } +/* "moses/dictree.pyx":41 + * self.lhs = lhs + * + * def __len__(self): # <<<<<<<<<<<<<< + * return len(self.rhs) + * + */ + /* Python wrapper */ static Py_ssize_t __pyx_pw_5moses_7dictree_10Production_3__len__(PyObject *__pyx_v_self); /*proto*/ static Py_ssize_t __pyx_pw_5moses_7dictree_10Production_3__len__(PyObject *__pyx_v_self) { @@ -1713,18 +2202,12 @@ static Py_ssize_t __pyx_pw_5moses_7dictree_10Production_3__len__(PyObject *__pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__len__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_10Production_2__len__(((struct __pyx_obj_5moses_7dictree_Production *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":41 - * self.lhs = lhs - * - * def __len__(self): # <<<<<<<<<<<<<< - * return len(self.rhs) - * - */ - static Py_ssize_t __pyx_pf_5moses_7dictree_10Production_2__len__(struct __pyx_obj_5moses_7dictree_Production *__pyx_v_self) { Py_ssize_t __pyx_r; __Pyx_RefNannyDeclarations @@ -1736,13 +2219,13 @@ static Py_ssize_t __pyx_pf_5moses_7dictree_10Production_2__len__(struct __pyx_ob __Pyx_RefNannySetupContext("__len__", 0); /* "moses/dictree.pyx":42 - * + * * def __len__(self): * return len(self.rhs) # <<<<<<<<<<<<<< - * + * * def __getitem__(self, key): */ - __pyx_t_1 = ((PyObject *)__pyx_v_self->rhs); + __pyx_t_1 = __pyx_v_self->rhs; __Pyx_INCREF(__pyx_t_1); if (unlikely(__pyx_t_1 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); @@ -1753,8 +2236,15 @@ static Py_ssize_t __pyx_pf_5moses_7dictree_10Production_2__len__(struct __pyx_ob __pyx_r = __pyx_t_2; goto __pyx_L0; - __pyx_r = 0; - goto __pyx_L0; + /* "moses/dictree.pyx":41 + * self.lhs = lhs + * + * def __len__(self): # <<<<<<<<<<<<<< + * return len(self.rhs) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("moses.dictree.Production.__len__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -1764,6 +2254,14 @@ static Py_ssize_t __pyx_pf_5moses_7dictree_10Production_2__len__(struct __pyx_ob return __pyx_r; } +/* "moses/dictree.pyx":44 + * return len(self.rhs) + * + * def __getitem__(self, key): # <<<<<<<<<<<<<< + * if 0 <= key < len(self.rhs): + * return self.rhs[key] + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_10Production_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_10Production_5__getitem__(PyObject *__pyx_v_self, PyObject *__pyx_v_key) { @@ -1771,18 +2269,12 @@ static PyObject *__pyx_pw_5moses_7dictree_10Production_5__getitem__(PyObject *__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__getitem__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_10Production_4__getitem__(((struct __pyx_obj_5moses_7dictree_Production *)__pyx_v_self), ((PyObject *)__pyx_v_key)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":44 - * return len(self.rhs) - * - * def __getitem__(self, key): # <<<<<<<<<<<<<< - * if 0 <= key < len(self.rhs): - * return self.rhs[key] - */ - static PyObject *__pyx_pf_5moses_7dictree_10Production_4__getitem__(struct __pyx_obj_5moses_7dictree_Production *__pyx_v_self, PyObject *__pyx_v_key) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -1796,7 +2288,7 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_4__getitem__(struct __pyx __Pyx_RefNannySetupContext("__getitem__", 0); /* "moses/dictree.pyx":45 - * + * * def __getitem__(self, key): * if 0 <= key < len(self.rhs): # <<<<<<<<<<<<<< * return self.rhs[key] @@ -1805,7 +2297,7 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_4__getitem__(struct __pyx __pyx_t_1 = PyObject_RichCompare(__pyx_int_0, __pyx_v_key, Py_LE); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 45; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_PyObject_IsTrue(__pyx_t_1)) { __Pyx_DECREF(__pyx_t_1); - __pyx_t_2 = ((PyObject *)__pyx_v_self->rhs); + __pyx_t_2 = __pyx_v_self->rhs; __Pyx_INCREF(__pyx_t_2); if (unlikely(__pyx_t_2 == Py_None)) { PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()"); @@ -1830,16 +2322,15 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_4__getitem__(struct __pyx * return IndexError, 'Index %s out of range' % str(key) */ __Pyx_XDECREF(__pyx_r); - if (unlikely(((PyObject *)__pyx_v_self->rhs) == Py_None)) { + if (unlikely(__pyx_v_self->rhs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = PyObject_GetItem(((PyObject *)__pyx_v_self->rhs), __pyx_v_key); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyObject_GetItem(__pyx_v_self->rhs, __pyx_v_key); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 46; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - goto __pyx_L3; } /*else*/ { @@ -1847,7 +2338,7 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_4__getitem__(struct __pyx * return self.rhs[key] * else: * return IndexError, 'Index %s out of range' % str(key) # <<<<<<<<<<<<<< - * + * * def __iter__(self): */ __Pyx_XDECREF(__pyx_r); @@ -1856,28 +2347,34 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_4__getitem__(struct __pyx __Pyx_INCREF(__pyx_v_key); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_key); __Pyx_GIVEREF(__pyx_v_key); - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_4), __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_Index_s_out_of_range, __pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_INCREF(__pyx_builtin_IndexError); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_builtin_IndexError); __Pyx_GIVEREF(__pyx_builtin_IndexError); - PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = ((PyObject *)__pyx_t_2); + __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } - __pyx_L3:; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":44 + * return len(self.rhs) + * + * def __getitem__(self, key): # <<<<<<<<<<<<<< + * if 0 <= key < len(self.rhs): + * return self.rhs[key] + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -1890,6 +2387,14 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_4__getitem__(struct __pyx } static PyObject *__pyx_gb_5moses_7dictree_10Production_8generator(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +/* "moses/dictree.pyx":50 + * return IndexError, 'Index %s out of range' % str(key) + * + * def __iter__(self): # <<<<<<<<<<<<<< + * for x in self.rhs: + * yield x + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_10Production_7__iter__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_10Production_7__iter__(PyObject *__pyx_v_self) { @@ -1897,18 +2402,12 @@ static PyObject *__pyx_pw_5moses_7dictree_10Production_7__iter__(PyObject *__pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__iter__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_10Production_6__iter__(((struct __pyx_obj_5moses_7dictree_Production *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":50 - * return IndexError, 'Index %s out of range' % str(key) - * - * def __iter__(self): # <<<<<<<<<<<<<< - * for x in self.rhs: - * yield x - */ - static PyObject *__pyx_pf_5moses_7dictree_10Production_6__iter__(struct __pyx_obj_5moses_7dictree_Production *__pyx_v_self) { struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__ *__pyx_cur_scope; PyObject *__pyx_r = NULL; @@ -1917,7 +2416,7 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_6__iter__(struct __pyx_ob const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__iter__", 0); - __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__ *)__pyx_ptype_5moses_7dictree___pyx_scope_struct____iter__->tp_new(__pyx_ptype_5moses_7dictree___pyx_scope_struct____iter__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__ *)__pyx_tp_new_5moses_7dictree___pyx_scope_struct____iter__(__pyx_ptype_5moses_7dictree___pyx_scope_struct____iter__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -1933,6 +2432,7 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_6__iter__(struct __pyx_ob return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -1952,6 +2452,9 @@ static PyObject *__pyx_gb_5moses_7dictree_10Production_8generator(__pyx_Generato PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { @@ -1965,17 +2468,17 @@ static PyObject *__pyx_gb_5moses_7dictree_10Production_8generator(__pyx_Generato if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "moses/dictree.pyx":51 - * + * * def __iter__(self): * for x in self.rhs: # <<<<<<<<<<<<<< * yield x - * + * */ - if (unlikely(((PyObject *)__pyx_cur_scope->__pyx_v_self->rhs) == Py_None)) { + if (unlikely(__pyx_cur_scope->__pyx_v_self->rhs == Py_None)) { PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_1 = ((PyObject *)__pyx_cur_scope->__pyx_v_self->rhs); __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; + __pyx_t_1 = __pyx_cur_scope->__pyx_v_self->rhs; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; #if CYTHON_COMPILING_IN_CPYTHON @@ -1984,16 +2487,15 @@ static PyObject *__pyx_gb_5moses_7dictree_10Production_8generator(__pyx_Generato __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 51; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_x); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_x, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); - __pyx_cur_scope->__pyx_v_x = __pyx_t_3; __pyx_t_3 = 0; /* "moses/dictree.pyx":52 * def __iter__(self): * for x in self.rhs: * yield x # <<<<<<<<<<<<<< - * + * * def __contains__(self, item): */ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_x); @@ -2014,6 +2516,16 @@ static PyObject *__pyx_gb_5moses_7dictree_10Production_8generator(__pyx_Generato if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 52; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* "moses/dictree.pyx":50 + * return IndexError, 'Index %s out of range' % str(key) + * + * def __iter__(self): # <<<<<<<<<<<<<< + * for x in self.rhs: + * yield x + */ + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -2028,6 +2540,14 @@ static PyObject *__pyx_gb_5moses_7dictree_10Production_8generator(__pyx_Generato return NULL; } +/* "moses/dictree.pyx":54 + * yield x + * + * def __contains__(self, item): # <<<<<<<<<<<<<< + * return item in self.rhs + * + */ + /* Python wrapper */ static int __pyx_pw_5moses_7dictree_10Production_10__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_item); /*proto*/ static int __pyx_pw_5moses_7dictree_10Production_10__contains__(PyObject *__pyx_v_self, PyObject *__pyx_v_item) { @@ -2035,18 +2555,12 @@ static int __pyx_pw_5moses_7dictree_10Production_10__contains__(PyObject *__pyx_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__contains__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_10Production_9__contains__(((struct __pyx_obj_5moses_7dictree_Production *)__pyx_v_self), ((PyObject *)__pyx_v_item)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":54 - * yield x - * - * def __contains__(self, item): # <<<<<<<<<<<<<< - * return item in self.rhs - * - */ - static int __pyx_pf_5moses_7dictree_10Production_9__contains__(struct __pyx_obj_5moses_7dictree_Production *__pyx_v_self, PyObject *__pyx_v_item) { int __pyx_r; __Pyx_RefNannyDeclarations @@ -2057,18 +2571,25 @@ static int __pyx_pf_5moses_7dictree_10Production_9__contains__(struct __pyx_obj_ __Pyx_RefNannySetupContext("__contains__", 0); /* "moses/dictree.pyx":55 - * + * * def __contains__(self, item): * return item in self.rhs # <<<<<<<<<<<<<< - * + * * def __reversed__(self): */ - __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_item, ((PyObject *)__pyx_v_self->rhs), Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = (__Pyx_PySequence_Contains(__pyx_v_item, __pyx_v_self->rhs, Py_EQ)); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 55; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_t_1; goto __pyx_L0; - __pyx_r = 0; - goto __pyx_L0; + /* "moses/dictree.pyx":54 + * yield x + * + * def __contains__(self, item): # <<<<<<<<<<<<<< + * return item in self.rhs + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("moses.dictree.Production.__contains__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; @@ -2077,6 +2598,14 @@ static int __pyx_pf_5moses_7dictree_10Production_9__contains__(struct __pyx_obj_ return __pyx_r; } +/* "moses/dictree.pyx":57 + * return item in self.rhs + * + * def __reversed__(self): # <<<<<<<<<<<<<< + * return reversed(self.rhs) + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_10Production_12__reversed__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_10Production_12__reversed__(PyObject *__pyx_v_self, CYTHON_UNUSED PyObject *unused) { @@ -2084,18 +2613,12 @@ static PyObject *__pyx_pw_5moses_7dictree_10Production_12__reversed__(PyObject * __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__reversed__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_10Production_11__reversed__(((struct __pyx_obj_5moses_7dictree_Production *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":57 - * return item in self.rhs - * - * def __reversed__(self): # <<<<<<<<<<<<<< - * return reversed(self.rhs) - * - */ - static PyObject *__pyx_pf_5moses_7dictree_10Production_11__reversed__(struct __pyx_obj_5moses_7dictree_Production *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -2107,27 +2630,34 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_11__reversed__(struct __p __Pyx_RefNannySetupContext("__reversed__", 0); /* "moses/dictree.pyx":58 - * + * * def __reversed__(self): * return reversed(self.rhs) # <<<<<<<<<<<<<< - * + * * def __hash__(self): */ __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(((PyObject *)__pyx_v_self->rhs)); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_self->rhs)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self->rhs)); - __pyx_t_2 = PyObject_Call(__pyx_builtin_reversed, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_INCREF(__pyx_v_self->rhs); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_self->rhs); + __Pyx_GIVEREF(__pyx_v_self->rhs); + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_reversed, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":57 + * return item in self.rhs + * + * def __reversed__(self): # <<<<<<<<<<<<<< + * return reversed(self.rhs) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -2139,6 +2669,14 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_11__reversed__(struct __p return __pyx_r; } +/* "moses/dictree.pyx":60 + * return reversed(self.rhs) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self.rhs) + * + */ + /* Python wrapper */ static Py_hash_t __pyx_pw_5moses_7dictree_10Production_14__hash__(PyObject *__pyx_v_self); /*proto*/ static Py_hash_t __pyx_pw_5moses_7dictree_10Production_14__hash__(PyObject *__pyx_v_self) { @@ -2146,18 +2684,12 @@ static Py_hash_t __pyx_pw_5moses_7dictree_10Production_14__hash__(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__hash__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_10Production_13__hash__(((struct __pyx_obj_5moses_7dictree_Production *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":60 - * return reversed(self.rhs) - * - * def __hash__(self): # <<<<<<<<<<<<<< - * return hash(self.rhs) - * - */ - static Py_hash_t __pyx_pf_5moses_7dictree_10Production_13__hash__(struct __pyx_obj_5moses_7dictree_Production *__pyx_v_self) { Py_hash_t __pyx_r; __Pyx_RefNannyDeclarations @@ -2169,21 +2701,28 @@ static Py_hash_t __pyx_pf_5moses_7dictree_10Production_13__hash__(struct __pyx_o __Pyx_RefNannySetupContext("__hash__", 0); /* "moses/dictree.pyx":61 - * + * * def __hash__(self): * return hash(self.rhs) # <<<<<<<<<<<<<< - * + * * def __str__(self): */ - __pyx_t_1 = ((PyObject *)__pyx_v_self->rhs); + __pyx_t_1 = __pyx_v_self->rhs; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyObject_Hash(__pyx_t_1); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_2; goto __pyx_L0; - __pyx_r = 0; - goto __pyx_L0; + /* "moses/dictree.pyx":60 + * return reversed(self.rhs) + * + * def __hash__(self): # <<<<<<<<<<<<<< + * return hash(self.rhs) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("moses.dictree.Production.__hash__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -2194,6 +2733,14 @@ static Py_hash_t __pyx_pf_5moses_7dictree_10Production_13__hash__(struct __pyx_o return __pyx_r; } +/* "moses/dictree.pyx":63 + * return hash(self.rhs) + * + * def __str__(self): # <<<<<<<<<<<<<< + * if self.lhs: + * return '%s -> %s' % (self.lhs, ' '.join(self.rhs)) + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_10Production_16__str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_10Production_16__str__(PyObject *__pyx_v_self) { @@ -2201,38 +2748,31 @@ static PyObject *__pyx_pw_5moses_7dictree_10Production_16__str__(PyObject *__pyx __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_10Production_15__str__(((struct __pyx_obj_5moses_7dictree_Production *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":63 - * return hash(self.rhs) - * - * def __str__(self): # <<<<<<<<<<<<<< - * if self.lhs: - * return '%s -> %s' % (self.lhs, ' '.join(self.rhs)) - */ - static PyObject *__pyx_pf_5moses_7dictree_10Production_15__str__(struct __pyx_obj_5moses_7dictree_Production *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - PyObject *__pyx_t_4 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); /* "moses/dictree.pyx":64 - * + * * def __str__(self): * if self.lhs: # <<<<<<<<<<<<<< * return '%s -> %s' % (self.lhs, ' '.join(self.rhs)) * else: */ - __pyx_t_1 = (((PyObject *)__pyx_v_self->lhs) != Py_None) && (PyBytes_GET_SIZE(((PyObject *)__pyx_v_self->lhs)) != 0); + __pyx_t_1 = (__pyx_v_self->lhs != Py_None) && (PyBytes_GET_SIZE(__pyx_v_self->lhs) != 0); if (__pyx_t_1) { /* "moses/dictree.pyx":65 @@ -2243,32 +2783,25 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_15__str__(struct __pyx_ob * return ' '.join(self.rhs) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_6), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_v_self->rhs; + __Pyx_INCREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(((PyObject *)__pyx_v_self->rhs)); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->rhs)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self->rhs)); - __pyx_t_4 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(__pyx_v_self->lhs); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->lhs); + __Pyx_GIVEREF(__pyx_v_self->lhs); + PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_s_s, __pyx_t_2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(((PyObject *)__pyx_v_self->lhs)); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->lhs)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self->lhs)); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_4 = 0; - __pyx_t_4 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_5), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_r = ((PyObject *)__pyx_t_4); - __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_r = __pyx_t_3; + __pyx_t_3 = 0; goto __pyx_L0; - goto __pyx_L3; } /*else*/ { @@ -2276,33 +2809,32 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_15__str__(struct __pyx_ob * return '%s -> %s' % (self.lhs, ' '.join(self.rhs)) * else: * return ' '.join(self.rhs) # <<<<<<<<<<<<<< - * + * * def __repr__(self): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_4 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_6), __pyx_n_s__join); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(((PyObject *)__pyx_v_self->rhs)); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_self->rhs)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self->rhs)); - __pyx_t_2 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_v_self->rhs; + __Pyx_INCREF(__pyx_t_3); + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 67; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } - __pyx_L3:; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":63 + * return hash(self.rhs) + * + * def __str__(self): # <<<<<<<<<<<<<< + * if self.lhs: + * return '%s -> %s' % (self.lhs, ' '.join(self.rhs)) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_4); __Pyx_AddTraceback("moses.dictree.Production.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -2311,6 +2843,14 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_15__str__(struct __pyx_ob return __pyx_r; } +/* "moses/dictree.pyx":69 + * return ' '.join(self.rhs) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return repr(self.as_tuple()) + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_10Production_18__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_10Production_18__repr__(PyObject *__pyx_v_self) { @@ -2318,18 +2858,12 @@ static PyObject *__pyx_pw_5moses_7dictree_10Production_18__repr__(PyObject *__py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_10Production_17__repr__(((struct __pyx_obj_5moses_7dictree_Production *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":69 - * return ' '.join(self.rhs) - * - * def __repr__(self): # <<<<<<<<<<<<<< - * return repr(self.as_tuple()) - * - */ - static PyObject *__pyx_pf_5moses_7dictree_10Production_17__repr__(struct __pyx_obj_5moses_7dictree_Production *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -2341,16 +2875,16 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_17__repr__(struct __pyx_o __Pyx_RefNannySetupContext("__repr__", 0); /* "moses/dictree.pyx":70 - * + * * def __repr__(self): * return repr(self.as_tuple()) # <<<<<<<<<<<<<< - * + * * def as_tuple(self, lhs_first = False): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_self), __pyx_n_s__as_tuple); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_self), __pyx_n_s_as_tuple); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyObject_Repr(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 70; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -2360,8 +2894,15 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_17__repr__(struct __pyx_o __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":69 + * return ' '.join(self.rhs) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return repr(self.as_tuple()) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -2373,18 +2914,29 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_17__repr__(struct __pyx_o return __pyx_r; } +/* "moses/dictree.pyx":72 + * return repr(self.as_tuple()) + * + * def as_tuple(self, lhs_first = False): # <<<<<<<<<<<<<< + * """ + * Returns a tuple (lhs) + rhs or rhs + (lhs) depending on the flag 'lhs_first'. + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_10Production_20as_tuple(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5moses_7dictree_10Production_19as_tuple[] = "\n Returns a tuple (lhs) + rhs or rhs + (lhs) depending on the flag 'lhs_first'.\n "; static PyObject *__pyx_pw_5moses_7dictree_10Production_20as_tuple(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_lhs_first = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("as_tuple (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__lhs_first,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_lhs_first,0}; PyObject* values[1] = {0}; - values[0] = __pyx_k_7; + values[0] = ((PyObject *)Py_False); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -2397,7 +2949,7 @@ static PyObject *__pyx_pw_5moses_7dictree_10Production_20as_tuple(PyObject *__py switch (pos_args) { case 0: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lhs_first); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lhs_first); if (value) { values[0] = value; kw_args--; } } } @@ -2422,18 +2974,12 @@ static PyObject *__pyx_pw_5moses_7dictree_10Production_20as_tuple(PyObject *__py return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_5moses_7dictree_10Production_19as_tuple(((struct __pyx_obj_5moses_7dictree_Production *)__pyx_v_self), __pyx_v_lhs_first); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":72 - * return repr(self.as_tuple()) - * - * def as_tuple(self, lhs_first = False): # <<<<<<<<<<<<<< - * """ - * Returns a tuple (lhs) + rhs or rhs + (lhs) depending on the flag 'lhs_first'. - */ - static PyObject *__pyx_pf_5moses_7dictree_10Production_19as_tuple(struct __pyx_obj_5moses_7dictree_Production *__pyx_v_self, PyObject *__pyx_v_lhs_first) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -2452,7 +2998,7 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_19as_tuple(struct __pyx_o * if lhs_first: * return tuple([self.lhs]) + self.rhs */ - __pyx_t_1 = (((PyObject *)__pyx_v_self->lhs) != Py_None) && (PyBytes_GET_SIZE(((PyObject *)__pyx_v_self->lhs)) != 0); + __pyx_t_1 = (__pyx_v_self->lhs != Py_None) && (PyBytes_GET_SIZE(__pyx_v_self->lhs) != 0); if (__pyx_t_1) { /* "moses/dictree.pyx":77 @@ -2475,19 +3021,18 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_19as_tuple(struct __pyx_o __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(((PyObject *)__pyx_v_self->lhs)); - PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->lhs)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self->lhs)); - __pyx_t_3 = ((PyObject *)PyList_AsTuple(__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_t_3), ((PyObject *)__pyx_v_self->rhs)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_r = ((PyObject *)__pyx_t_2); + __Pyx_INCREF(__pyx_v_self->lhs); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->lhs); + __Pyx_GIVEREF(__pyx_v_self->lhs); + __pyx_t_3 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_Add(__pyx_t_3, __pyx_v_self->rhs); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 78; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - goto __pyx_L4; } /*else*/ { @@ -2501,21 +3046,19 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_19as_tuple(struct __pyx_o __Pyx_XDECREF(__pyx_r); __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(((PyObject *)__pyx_v_self->lhs)); - PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->lhs)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self->lhs)); - __pyx_t_3 = ((PyObject *)PyList_AsTuple(__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = PyNumber_Add(((PyObject *)__pyx_v_self->rhs), ((PyObject *)__pyx_t_3)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_r = ((PyObject *)__pyx_t_2); + __Pyx_INCREF(__pyx_v_self->lhs); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->lhs); + __Pyx_GIVEREF(__pyx_v_self->lhs); + __pyx_t_3 = PyList_AsTuple(((PyObject*)__pyx_t_2)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_Add(__pyx_v_self->rhs, __pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 80; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; } - __pyx_L4:; - goto __pyx_L3; } /*else*/ { @@ -2523,18 +3066,24 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_19as_tuple(struct __pyx_o * return self.rhs + tuple([self.lhs]) * else: * return self.rhs # <<<<<<<<<<<<<< - * + * * def __richcmp__(self, other, op): */ __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_self->rhs)); - __pyx_r = ((PyObject *)__pyx_v_self->rhs); + __Pyx_INCREF(__pyx_v_self->rhs); + __pyx_r = __pyx_v_self->rhs; goto __pyx_L0; } - __pyx_L3:; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":72 + * return repr(self.as_tuple()) + * + * def as_tuple(self, lhs_first = False): # <<<<<<<<<<<<<< + * """ + * Returns a tuple (lhs) + rhs or rhs + (lhs) depending on the flag 'lhs_first'. + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); @@ -2546,14 +3095,25 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_19as_tuple(struct __pyx_o return __pyx_r; } +/* "moses/dictree.pyx":84 + * return self.rhs + * + * def __richcmp__(self, other, op): # <<<<<<<<<<<<<< + * """ + * The comparison uses 'as_tuple()', therefore in the CFG case, the lhs will be part of the production and it will be placed in the end + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_10Production_22__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_arg_op); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_10Production_22__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, int __pyx_arg_op) { PyObject *__pyx_v_op = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__richcmp__ (wrapper)", 0); - __pyx_v_op = PyInt_FromLong(__pyx_arg_op); if (unlikely(!__pyx_v_op)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_op = __Pyx_PyInt_From_int(__pyx_arg_op); if (unlikely(!__pyx_v_op)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 84; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __Pyx_GOTREF(__pyx_v_op); goto __pyx_L4_argument_unpacking_done; __pyx_L3_error:; @@ -2562,19 +3122,13 @@ static PyObject *__pyx_pw_5moses_7dictree_10Production_22__richcmp__(PyObject *_ return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_5moses_7dictree_10Production_21__richcmp__(((PyObject *)__pyx_v_self), ((PyObject *)__pyx_v_other), ((PyObject *)__pyx_v_op)); + + /* function exit code */ __Pyx_XDECREF(__pyx_v_op); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":84 - * return self.rhs - * - * def __richcmp__(self, other, op): # <<<<<<<<<<<<<< - * """ - * The comparison uses 'as_tuple()', therefore in the CFG case, the lhs will be part of the production and it will be placed in the end - */ - static PyObject *__pyx_pf_5moses_7dictree_10Production_21__richcmp__(PyObject *__pyx_v_self, PyObject *__pyx_v_other, PyObject *__pyx_v_op) { PyObject *__pyx_v_x = NULL; PyObject *__pyx_v_y = NULL; @@ -2595,9 +3149,9 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_21__richcmp__(PyObject *_ * y = other.as_tuple() * if op == 0: */ - __pyx_t_1 = PyObject_GetAttr(__pyx_v_self, __pyx_n_s__as_tuple); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_v_self, __pyx_n_s_as_tuple); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 89; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_x = __pyx_t_2; @@ -2610,9 +3164,9 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_21__richcmp__(PyObject *_ * if op == 0: * return x < y */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_other, __pyx_n_s__as_tuple); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_v_other, __pyx_n_s_as_tuple); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_1 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 90; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_v_y = __pyx_t_1; @@ -2642,7 +3196,6 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_21__richcmp__(PyObject *_ __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - goto __pyx_L3; } /* "moses/dictree.pyx":93 @@ -2669,7 +3222,6 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_21__richcmp__(PyObject *_ __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - goto __pyx_L3; } /* "moses/dictree.pyx":95 @@ -2696,7 +3248,6 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_21__richcmp__(PyObject *_ __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - goto __pyx_L3; } /* "moses/dictree.pyx":97 @@ -2723,7 +3274,6 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_21__richcmp__(PyObject *_ __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - goto __pyx_L3; } /* "moses/dictree.pyx":99 @@ -2750,7 +3300,6 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_21__richcmp__(PyObject *_ __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - goto __pyx_L3; } /* "moses/dictree.pyx":101 @@ -2758,7 +3307,7 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_21__richcmp__(PyObject *_ * return x > y * elif op == 5: # <<<<<<<<<<<<<< * return x >= y - * + * */ __pyx_t_1 = PyObject_RichCompare(__pyx_v_op, __pyx_int_5, Py_EQ); __Pyx_XGOTREF(__pyx_t_1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_3 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_3 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 101; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -2769,7 +3318,7 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_21__richcmp__(PyObject *_ * return x > y * elif op == 5: * return x >= y # <<<<<<<<<<<<<< - * + * * cdef class Alignment(list): */ __Pyx_XDECREF(__pyx_r); @@ -2777,10 +3326,17 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_21__richcmp__(PyObject *_ __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - goto __pyx_L3; } - __pyx_L3:; + /* "moses/dictree.pyx":84 + * return self.rhs + * + * def __richcmp__(self, other, op): # <<<<<<<<<<<<<< + * """ + * The comparison uses 'as_tuple()', therefore in the CFG case, the lhs will be part of the production and it will be placed in the end + */ + + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -2796,6 +3352,14 @@ static PyObject *__pyx_pf_5moses_7dictree_10Production_21__richcmp__(PyObject *_ return __pyx_r; } +/* "moses/dictree.pyx":30 + * """ + * + * cdef readonly bytes lhs # <<<<<<<<<<<<<< + * cdef readonly tuple rhs + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_10Production_3lhs_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_10Production_3lhs_1__get__(PyObject *__pyx_v_self) { @@ -2803,34 +3367,36 @@ static PyObject *__pyx_pw_5moses_7dictree_10Production_3lhs_1__get__(PyObject *_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_10Production_3lhs___get__(((struct __pyx_obj_5moses_7dictree_Production *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":30 - * """ - * - * cdef readonly bytes lhs # <<<<<<<<<<<<<< - * cdef readonly tuple rhs - * - */ - static PyObject *__pyx_pf_5moses_7dictree_10Production_3lhs___get__(struct __pyx_obj_5moses_7dictree_Production *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_self->lhs)); - __pyx_r = ((PyObject *)__pyx_v_self->lhs); + __Pyx_INCREF(__pyx_v_self->lhs); + __pyx_r = __pyx_v_self->lhs; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "moses/dictree.pyx":31 + * + * cdef readonly bytes lhs + * cdef readonly tuple rhs # <<<<<<<<<<<<<< + * + * def __init__(self, rhs, lhs = None): + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_10Production_3rhs_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_10Production_3rhs_1__get__(PyObject *__pyx_v_self) { @@ -2838,43 +3404,48 @@ static PyObject *__pyx_pw_5moses_7dictree_10Production_3rhs_1__get__(PyObject *_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_10Production_3rhs___get__(((struct __pyx_obj_5moses_7dictree_Production *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":31 - * - * cdef readonly bytes lhs - * cdef readonly tuple rhs # <<<<<<<<<<<<<< - * - * def __init__(self, rhs, lhs = None): - */ - static PyObject *__pyx_pf_5moses_7dictree_10Production_3rhs___get__(struct __pyx_obj_5moses_7dictree_Production *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_self->rhs)); - __pyx_r = ((PyObject *)__pyx_v_self->rhs); + __Pyx_INCREF(__pyx_v_self->rhs); + __pyx_r = __pyx_v_self->rhs; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "moses/dictree.pyx":110 + * """ + * + * def __init__(self, alignment): # <<<<<<<<<<<<<< + * if type(alignment) is str: + * pairs = [] + */ + /* Python wrapper */ static int __pyx_pw_5moses_7dictree_9Alignment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_5moses_7dictree_9Alignment_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_alignment = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__alignment,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_alignment,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -2887,7 +3458,7 @@ static int __pyx_pw_5moses_7dictree_9Alignment_1__init__(PyObject *__pyx_v_self, kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__alignment)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alignment)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { @@ -2909,18 +3480,12 @@ static int __pyx_pw_5moses_7dictree_9Alignment_1__init__(PyObject *__pyx_v_self, return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_5moses_7dictree_9Alignment___init__(((struct __pyx_obj_5moses_7dictree_Alignment *)__pyx_v_self), __pyx_v_alignment); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":110 - * """ - * - * def __init__(self, alignment): # <<<<<<<<<<<<<< - * if type(alignment) is str: - * pairs = [] - */ - static int __pyx_pf_5moses_7dictree_9Alignment___init__(struct __pyx_obj_5moses_7dictree_Alignment *__pyx_v_self, PyObject *__pyx_v_alignment) { PyObject *__pyx_v_pairs = NULL; PyObject *__pyx_v_point = NULL; @@ -2929,15 +3494,15 @@ static int __pyx_pf_5moses_7dictree_9Alignment___init__(struct __pyx_obj_5moses_ int __pyx_r; __Pyx_RefNannyDeclarations int __pyx_t_1; - PyObject *__pyx_t_2 = NULL; + int __pyx_t_2; PyObject *__pyx_t_3 = NULL; - Py_ssize_t __pyx_t_4; - PyObject *(*__pyx_t_5)(PyObject *); - PyObject *__pyx_t_6 = NULL; + PyObject *__pyx_t_4 = NULL; + Py_ssize_t __pyx_t_5; + PyObject *(*__pyx_t_6)(PyObject *); PyObject *__pyx_t_7 = NULL; PyObject *__pyx_t_8 = NULL; - PyObject *(*__pyx_t_9)(PyObject *); - int __pyx_t_10; + PyObject *__pyx_t_9 = NULL; + PyObject *(*__pyx_t_10)(PyObject *); int __pyx_t_11; int __pyx_t_12; int __pyx_lineno = 0; @@ -2946,14 +3511,15 @@ static int __pyx_pf_5moses_7dictree_9Alignment___init__(struct __pyx_obj_5moses_ __Pyx_RefNannySetupContext("__init__", 0); /* "moses/dictree.pyx":111 - * + * * def __init__(self, alignment): * if type(alignment) is str: # <<<<<<<<<<<<<< * pairs = [] * for point in alignment.split(): */ __pyx_t_1 = (((PyObject *)Py_TYPE(__pyx_v_alignment)) == ((PyObject *)((PyObject*)(&PyString_Type)))); - if (__pyx_t_1) { + __pyx_t_2 = (__pyx_t_1 != 0); + if (__pyx_t_2) { /* "moses/dictree.pyx":112 * def __init__(self, alignment): @@ -2962,10 +3528,10 @@ static int __pyx_pf_5moses_7dictree_9Alignment___init__(struct __pyx_obj_5moses_ * for point in alignment.split(): * s, t = point.split('-') */ - __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_v_pairs = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 112; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_v_pairs = ((PyObject*)__pyx_t_3); + __pyx_t_3 = 0; /* "moses/dictree.pyx":113 * if type(alignment) is str: @@ -2974,49 +3540,49 @@ static int __pyx_pf_5moses_7dictree_9Alignment___init__(struct __pyx_obj_5moses_ * s, t = point.split('-') * pairs.append((int(s), int(t))) */ - __pyx_t_2 = PyObject_GetAttr(__pyx_v_alignment, __pyx_n_s__split); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_empty_tuple), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_v_alignment, __pyx_n_s_split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyList_CheckExact(__pyx_t_3) || PyTuple_CheckExact(__pyx_t_3)) { - __pyx_t_2 = __pyx_t_3; __Pyx_INCREF(__pyx_t_2); __pyx_t_4 = 0; - __pyx_t_5 = NULL; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + if (PyList_CheckExact(__pyx_t_4) || PyTuple_CheckExact(__pyx_t_4)) { + __pyx_t_3 = __pyx_t_4; __Pyx_INCREF(__pyx_t_3); __pyx_t_5 = 0; + __pyx_t_6 = NULL; } else { - __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_t_3); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_5 = Py_TYPE(__pyx_t_2)->tp_iternext; + __pyx_t_5 = -1; __pyx_t_3 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_6 = Py_TYPE(__pyx_t_3)->tp_iternext; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; for (;;) { - if (!__pyx_t_5 && PyList_CheckExact(__pyx_t_2)) { - if (__pyx_t_4 >= PyList_GET_SIZE(__pyx_t_2)) break; + if (!__pyx_t_6 && PyList_CheckExact(__pyx_t_3)) { + if (__pyx_t_5 >= PyList_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_3 = PyList_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyList_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif - } else if (!__pyx_t_5 && PyTuple_CheckExact(__pyx_t_2)) { - if (__pyx_t_4 >= PyTuple_GET_SIZE(__pyx_t_2)) break; + } else if (!__pyx_t_6 && PyTuple_CheckExact(__pyx_t_3)) { + if (__pyx_t_5 >= PyTuple_GET_SIZE(__pyx_t_3)) break; #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4); __Pyx_INCREF(__pyx_t_3); __pyx_t_4++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_3, __pyx_t_5); __Pyx_INCREF(__pyx_t_4); __pyx_t_5++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_t_3 = PySequence_ITEM(__pyx_t_2, __pyx_t_4); __pyx_t_4++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(__pyx_t_3, __pyx_t_5); __pyx_t_5++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif } else { - __pyx_t_3 = __pyx_t_5(__pyx_t_2); - if (unlikely(!__pyx_t_3)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + __pyx_t_4 = __pyx_t_6(__pyx_t_3); + if (unlikely(!__pyx_t_4)) { + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 113; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; } - __Pyx_GOTREF(__pyx_t_3); + __Pyx_GOTREF(__pyx_t_4); } - __Pyx_XDECREF(__pyx_v_point); - __pyx_v_point = __pyx_t_3; - __pyx_t_3 = 0; + __Pyx_XDECREF_SET(__pyx_v_point, __pyx_t_4); + __pyx_t_4 = 0; /* "moses/dictree.pyx":114 * pairs = [] @@ -3025,13 +3591,13 @@ static int __pyx_pf_5moses_7dictree_9Alignment___init__(struct __pyx_obj_5moses_ * pairs.append((int(s), int(t))) * super(Alignment, self).__init__(pairs) */ - __pyx_t_3 = PyObject_GetAttr(__pyx_v_point, __pyx_n_s__split); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_k_tuple_9), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - if ((likely(PyTuple_CheckExact(__pyx_t_6))) || (PyList_CheckExact(__pyx_t_6))) { - PyObject* sequence = __pyx_t_6; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_v_point, __pyx_n_s_split); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_7 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_tuple__4, NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_7); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if ((likely(PyTuple_CheckExact(__pyx_t_7))) || (PyList_CheckExact(__pyx_t_7))) { + PyObject* sequence = __pyx_t_7; #if CYTHON_COMPILING_IN_CPYTHON Py_ssize_t size = Py_SIZE(sequence); #else @@ -3044,47 +3610,46 @@ static int __pyx_pf_5moses_7dictree_9Alignment___init__(struct __pyx_obj_5moses_ } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_3 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_7 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_4 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_8 = PyTuple_GET_ITEM(sequence, 1); } else { - __pyx_t_3 = PyList_GET_ITEM(sequence, 0); - __pyx_t_7 = PyList_GET_ITEM(sequence, 1); + __pyx_t_4 = PyList_GET_ITEM(sequence, 0); + __pyx_t_8 = PyList_GET_ITEM(sequence, 1); } - __Pyx_INCREF(__pyx_t_3); - __Pyx_INCREF(__pyx_t_7); + __Pyx_INCREF(__pyx_t_4); + __Pyx_INCREF(__pyx_t_8); #else - __pyx_t_3 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_7 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_8 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); #endif - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - } else - { + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + } else { Py_ssize_t index = -1; - __pyx_t_8 = PyObject_GetIter(__pyx_t_6); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyObject_GetIter(__pyx_t_7); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_10 = Py_TYPE(__pyx_t_9)->tp_iternext; + index = 0; __pyx_t_4 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_4)) goto __pyx_L6_unpacking_failed; + __Pyx_GOTREF(__pyx_t_4); + index = 1; __pyx_t_8 = __pyx_t_10(__pyx_t_9); if (unlikely(!__pyx_t_8)) goto __pyx_L6_unpacking_failed; __Pyx_GOTREF(__pyx_t_8); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_9 = Py_TYPE(__pyx_t_8)->tp_iternext; - index = 0; __pyx_t_3 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_3)) goto __pyx_L6_unpacking_failed; - __Pyx_GOTREF(__pyx_t_3); - index = 1; __pyx_t_7 = __pyx_t_9(__pyx_t_8); if (unlikely(!__pyx_t_7)) goto __pyx_L6_unpacking_failed; - __Pyx_GOTREF(__pyx_t_7); - if (__Pyx_IternextUnpackEndCheck(__pyx_t_9(__pyx_t_8), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_9 = NULL; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + if (__Pyx_IternextUnpackEndCheck(__pyx_t_10(__pyx_t_9), 2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; goto __pyx_L7_unpacking_done; __pyx_L6_unpacking_failed:; - __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_9 = NULL; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __pyx_t_10 = NULL; if (__Pyx_IterFinish() == 0) __Pyx_RaiseNeedMoreValuesError(index); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_L7_unpacking_done:; } - __Pyx_XDECREF(__pyx_v_s); - __pyx_v_s = __pyx_t_3; - __pyx_t_3 = 0; - __Pyx_XDECREF(__pyx_v_t); - __pyx_v_t = __pyx_t_7; - __pyx_t_7 = 0; + __Pyx_XDECREF_SET(__pyx_v_s, __pyx_t_4); + __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_v_t, __pyx_t_8); + __pyx_t_8 = 0; /* "moses/dictree.pyx":115 * for point in alignment.split(): @@ -3093,34 +3658,22 @@ static int __pyx_pf_5moses_7dictree_9Alignment___init__(struct __pyx_obj_5moses_ * super(Alignment, self).__init__(pairs) * elif type(alignment) in [list, tuple]: */ - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_v_s); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_s); - __Pyx_GIVEREF(__pyx_v_s); - __pyx_t_7 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = PyNumber_Int(__pyx_v_s); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(__pyx_v_t); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_t); - __Pyx_GIVEREF(__pyx_v_t); - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyInt_Type))), ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_7); + __pyx_t_8 = PyNumber_Int(__pyx_v_t); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_7); __Pyx_GIVEREF(__pyx_t_7); - PyTuple_SET_ITEM(__pyx_t_6, 1, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_8); + __Pyx_GIVEREF(__pyx_t_8); __pyx_t_7 = 0; - __pyx_t_3 = 0; - __pyx_t_10 = PyList_Append(__pyx_v_pairs, ((PyObject *)__pyx_t_6)); if (unlikely(__pyx_t_10 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __pyx_t_8 = 0; + __pyx_t_11 = __Pyx_PyList_Append(__pyx_v_pairs, __pyx_t_4); if (unlikely(__pyx_t_11 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 115; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "moses/dictree.pyx":116 * s, t = point.split('-') @@ -3129,30 +3682,30 @@ static int __pyx_pf_5moses_7dictree_9Alignment___init__(struct __pyx_obj_5moses_ * elif type(alignment) in [list, tuple]: * super(Alignment, self).__init__(alignment) */ - __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_Alignment))); - PyTuple_SET_ITEM(__pyx_t_2, 0, ((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_Alignment))); + PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_Alignment))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_Alignment))); __Pyx_INCREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_2, 1, ((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_6 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s____init__); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_INCREF(((PyObject *)__pyx_v_pairs)); - PyTuple_SET_ITEM(__pyx_t_6, 0, ((PyObject *)__pyx_v_pairs)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_pairs)); - __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_init); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_INCREF(__pyx_v_pairs); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_pairs); + __Pyx_GIVEREF(__pyx_v_pairs); + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_4, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; goto __pyx_L3; } @@ -3164,21 +3717,21 @@ static int __pyx_pf_5moses_7dictree_9Alignment___init__(struct __pyx_obj_5moses_ * else: */ __Pyx_INCREF(((PyObject *)Py_TYPE(__pyx_v_alignment))); - __pyx_t_3 = ((PyObject *)Py_TYPE(__pyx_v_alignment)); - __pyx_t_6 = PyObject_RichCompare(((PyObject *)__pyx_t_3), ((PyObject *)((PyObject*)(&PyList_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_1 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - if (!((int)__pyx_t_1)) { - __pyx_t_6 = PyObject_RichCompare(((PyObject *)__pyx_t_3), ((PyObject *)((PyObject*)(&PyTuple_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_11 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_11 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_12 = ((int)__pyx_t_11); + __pyx_t_8 = ((PyObject *)Py_TYPE(__pyx_v_alignment)); + __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_t_8), ((PyObject *)((PyObject*)(&PyList_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_2 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + if (!__pyx_t_2) { + __pyx_t_4 = PyObject_RichCompare(((PyObject *)__pyx_t_8), ((PyObject *)((PyObject*)(&PyTuple_Type))), Py_EQ); __Pyx_XGOTREF(__pyx_t_4); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 117; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_12 = __pyx_t_1; } else { - __pyx_t_12 = ((int)__pyx_t_1); + __pyx_t_12 = __pyx_t_2; } - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_1 = __pyx_t_12; - if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_2 = (__pyx_t_12 != 0); + if (__pyx_t_2) { /* "moses/dictree.pyx":118 * super(Alignment, self).__init__(pairs) @@ -3187,30 +3740,30 @@ static int __pyx_pf_5moses_7dictree_9Alignment___init__(struct __pyx_obj_5moses_ * else: * ValueError, 'Cannot figure out pairs from: %s' % type(alignment) */ - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_8 = PyTuple_New(2); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); __Pyx_INCREF(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_Alignment))); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_Alignment))); + PyTuple_SET_ITEM(__pyx_t_8, 0, ((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_Alignment))); __Pyx_GIVEREF(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_Alignment))); __Pyx_INCREF(((PyObject *)__pyx_v_self)); - PyTuple_SET_ITEM(__pyx_t_3, 1, ((PyObject *)__pyx_v_self)); + PyTuple_SET_ITEM(__pyx_t_8, 1, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_6 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s____init__); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_init); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_8); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_v_alignment); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_v_alignment); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_v_alignment); __Pyx_GIVEREF(__pyx_v_alignment); - __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 118; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } /*else*/ { @@ -3219,31 +3772,40 @@ static int __pyx_pf_5moses_7dictree_9Alignment___init__(struct __pyx_obj_5moses_ * super(Alignment, self).__init__(alignment) * else: * ValueError, 'Cannot figure out pairs from: %s' % type(alignment) # <<<<<<<<<<<<<< - * + * * def __str__(self): */ - __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_10), ((PyObject *)Py_TYPE(__pyx_v_alignment))); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __pyx_t_6 = PyTuple_New(2); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); + __pyx_t_3 = __Pyx_PyString_Format(__pyx_kp_s_Cannot_figure_out_pairs_from_s, ((PyObject *)Py_TYPE(__pyx_v_alignment))); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_builtin_ValueError); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_builtin_ValueError); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_builtin_ValueError); __Pyx_GIVEREF(__pyx_builtin_ValueError); - PyTuple_SET_ITEM(__pyx_t_6, 1, ((PyObject *)__pyx_t_2)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_2)); - __pyx_t_2 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } __pyx_L3:; + /* "moses/dictree.pyx":110 + * """ + * + * def __init__(self, alignment): # <<<<<<<<<<<<<< + * if type(alignment) is str: + * pairs = [] + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); - __Pyx_XDECREF(__pyx_t_6); + __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); + __Pyx_XDECREF(__pyx_t_9); __Pyx_AddTraceback("moses.dictree.Alignment.__init__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -3255,6 +3817,14 @@ static int __pyx_pf_5moses_7dictree_9Alignment___init__(struct __pyx_obj_5moses_ return __pyx_r; } +/* "moses/dictree.pyx":122 + * ValueError, 'Cannot figure out pairs from: %s' % type(alignment) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return ' '.join('%d-%d' % (s, t) for s, t in self) + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_9Alignment_3__str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_9Alignment_3__str__(PyObject *__pyx_v_self) { @@ -3262,16 +3832,18 @@ static PyObject *__pyx_pw_5moses_7dictree_9Alignment_3__str__(PyObject *__pyx_v_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_9Alignment_2__str__(((struct __pyx_obj_5moses_7dictree_Alignment *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_5moses_7dictree_9Alignment_7__str___2generator1(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "moses/dictree.pyx":123 - * + * * def __str__(self): * return ' '.join('%d-%d' % (s, t) for s, t in self) # <<<<<<<<<<<<<< - * + * * cdef class FValues(list): */ @@ -3283,7 +3855,7 @@ static PyObject *__pyx_pf_5moses_7dictree_9Alignment_7__str___genexpr(PyObject * const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); - __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr *)__pyx_ptype_5moses_7dictree___pyx_scope_struct_2_genexpr->tp_new(__pyx_ptype_5moses_7dictree___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr *)__pyx_tp_new_5moses_7dictree___pyx_scope_struct_2_genexpr(__pyx_ptype_5moses_7dictree___pyx_scope_struct_2_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -3299,6 +3871,7 @@ static PyObject *__pyx_pf_5moses_7dictree_9Alignment_7__str___genexpr(PyObject * return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -3323,6 +3896,9 @@ static PyObject *__pyx_gb_5moses_7dictree_9Alignment_7__str___2generator1(__pyx_ PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; PyObject *(*__pyx_t_8)(PyObject *); + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { @@ -3361,8 +3937,9 @@ static PyObject *__pyx_gb_5moses_7dictree_9Alignment_7__str___2generator1(__pyx_ } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -3383,21 +3960,22 @@ static PyObject *__pyx_gb_5moses_7dictree_9Alignment_7__str___2generator1(__pyx_ } #if CYTHON_COMPILING_IN_CPYTHON if (likely(PyTuple_CheckExact(sequence))) { - __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); - __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); + __pyx_t_5 = PyTuple_GET_ITEM(sequence, 0); + __pyx_t_6 = PyTuple_GET_ITEM(sequence, 1); } else { - __pyx_t_5 = PyList_GET_ITEM(sequence, 0); - __pyx_t_6 = PyList_GET_ITEM(sequence, 1); + __pyx_t_5 = PyList_GET_ITEM(sequence, 0); + __pyx_t_6 = PyList_GET_ITEM(sequence, 1); } __Pyx_INCREF(__pyx_t_5); __Pyx_INCREF(__pyx_t_6); #else __pyx_t_5 = PySequence_ITEM(sequence, 0); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PySequence_ITEM(sequence, 1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); #endif __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - } else - { + } else { Py_ssize_t index = -1; __pyx_t_7 = PyObject_GetIter(__pyx_t_4); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); @@ -3419,14 +3997,12 @@ static PyObject *__pyx_gb_5moses_7dictree_9Alignment_7__str___2generator1(__pyx_ __pyx_L7_unpacking_done:; } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_s); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_s); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_s, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); - __pyx_cur_scope->__pyx_v_s = __pyx_t_5; __pyx_t_5 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_t); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_t); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_t, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); - __pyx_cur_scope->__pyx_v_t = __pyx_t_6; __pyx_t_6 = 0; __pyx_t_4 = PyTuple_New(2); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); @@ -3436,10 +4012,10 @@ static PyObject *__pyx_gb_5moses_7dictree_9Alignment_7__str___2generator1(__pyx_ __Pyx_INCREF(__pyx_cur_scope->__pyx_v_t); PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_cur_scope->__pyx_v_t); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_t); - __pyx_t_6 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_11), ((PyObject *)__pyx_t_4)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_6)); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - __pyx_r = ((PyObject *)__pyx_t_6); + __pyx_t_6 = __Pyx_PyString_Format(__pyx_kp_s_d_d, __pyx_t_4); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_r = __pyx_t_6; __pyx_t_6 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; @@ -3459,6 +4035,8 @@ static PyObject *__pyx_gb_5moses_7dictree_9Alignment_7__str___2generator1(__pyx_ if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -3478,10 +4056,10 @@ static PyObject *__pyx_gb_5moses_7dictree_9Alignment_7__str___2generator1(__pyx_ /* "moses/dictree.pyx":122 * ValueError, 'Cannot figure out pairs from: %s' % type(alignment) - * + * * def __str__(self): # <<<<<<<<<<<<<< * return ' '.join('%d-%d' % (s, t) for s, t in self) - * + * */ static PyObject *__pyx_pf_5moses_7dictree_9Alignment_2__str__(struct __pyx_obj_5moses_7dictree_Alignment *__pyx_v_self) { @@ -3490,12 +4068,11 @@ static PyObject *__pyx_pf_5moses_7dictree_9Alignment_2__str__(struct __pyx_obj_5 __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__ *)__pyx_ptype_5moses_7dictree___pyx_scope_struct_1___str__->tp_new(__pyx_ptype_5moses_7dictree___pyx_scope_struct_1___str__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__ *)__pyx_tp_new_5moses_7dictree___pyx_scope_struct_1___str__(__pyx_ptype_5moses_7dictree___pyx_scope_struct_1___str__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -3506,36 +4083,34 @@ static PyObject *__pyx_pf_5moses_7dictree_9Alignment_2__str__(struct __pyx_obj_5 __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); /* "moses/dictree.pyx":123 - * + * * def __str__(self): * return ' '.join('%d-%d' % (s, t) for s, t in self) # <<<<<<<<<<<<<< - * + * * cdef class FValues(list): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_6), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_pf_5moses_7dictree_9Alignment_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_pf_5moses_7dictree_9Alignment_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":122 + * ValueError, 'Cannot figure out pairs from: %s' % type(alignment) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return ' '.join('%d-%d' % (s, t) for s, t in self) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("moses.dictree.Alignment.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -3545,15 +4120,26 @@ static PyObject *__pyx_pf_5moses_7dictree_9Alignment_2__str__(struct __pyx_obj_5 return __pyx_r; } +/* "moses/dictree.pyx":131 + * """ + * + * def __init__(self, values): # <<<<<<<<<<<<<< + * super(FValues, self).__init__(values) + * + */ + /* Python wrapper */ static int __pyx_pw_5moses_7dictree_7FValues_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_5moses_7dictree_7FValues_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_values = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__values,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_values,0}; PyObject* values[1] = {0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -3566,7 +4152,7 @@ static int __pyx_pw_5moses_7dictree_7FValues_1__init__(PyObject *__pyx_v_self, P kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__values)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_values)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; } if (unlikely(kw_args > 0)) { @@ -3588,18 +4174,12 @@ static int __pyx_pw_5moses_7dictree_7FValues_1__init__(PyObject *__pyx_v_self, P return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_5moses_7dictree_7FValues___init__(((struct __pyx_obj_5moses_7dictree_FValues *)__pyx_v_self), __pyx_v_values); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":131 - * """ - * - * def __init__(self, values): # <<<<<<<<<<<<<< - * super(FValues, self).__init__(values) - * - */ - static int __pyx_pf_5moses_7dictree_7FValues___init__(struct __pyx_obj_5moses_7dictree_FValues *__pyx_v_self, PyObject *__pyx_v_values) { int __pyx_r; __Pyx_RefNannyDeclarations @@ -3612,10 +4192,10 @@ static int __pyx_pf_5moses_7dictree_7FValues___init__(struct __pyx_obj_5moses_7d __Pyx_RefNannySetupContext("__init__", 0); /* "moses/dictree.pyx":132 - * + * * def __init__(self, values): * super(FValues, self).__init__(values) # <<<<<<<<<<<<<< - * + * * def __str__(self): */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -3626,10 +4206,10 @@ static int __pyx_pf_5moses_7dictree_7FValues___init__(struct __pyx_obj_5moses_7d __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_2 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -3637,12 +4217,21 @@ static int __pyx_pf_5moses_7dictree_7FValues___init__(struct __pyx_obj_5moses_7d __Pyx_INCREF(__pyx_v_values); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_values); __Pyx_GIVEREF(__pyx_v_values); - __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 132; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + /* "moses/dictree.pyx":131 + * """ + * + * def __init__(self, values): # <<<<<<<<<<<<<< + * super(FValues, self).__init__(values) + * + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -3656,6 +4245,14 @@ static int __pyx_pf_5moses_7dictree_7FValues___init__(struct __pyx_obj_5moses_7d return __pyx_r; } +/* "moses/dictree.pyx":134 + * super(FValues, self).__init__(values) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return ' '.join(str(x) for x in self) + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_7FValues_3__str__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_7FValues_3__str__(PyObject *__pyx_v_self) { @@ -3663,16 +4260,18 @@ static PyObject *__pyx_pw_5moses_7dictree_7FValues_3__str__(PyObject *__pyx_v_se __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_7FValues_2__str__(((struct __pyx_obj_5moses_7dictree_FValues *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } static PyObject *__pyx_gb_5moses_7dictree_7FValues_7__str___2generator2(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "moses/dictree.pyx":135 - * + * * def __str__(self): * return ' '.join(str(x) for x in self) # <<<<<<<<<<<<<< - * + * * cdef class TargetProduction(Production): */ @@ -3684,7 +4283,7 @@ static PyObject *__pyx_pf_5moses_7dictree_7FValues_7__str___genexpr(PyObject *__ const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); - __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr *)__pyx_ptype_5moses_7dictree___pyx_scope_struct_4_genexpr->tp_new(__pyx_ptype_5moses_7dictree___pyx_scope_struct_4_genexpr, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr *)__pyx_tp_new_5moses_7dictree___pyx_scope_struct_4_genexpr(__pyx_ptype_5moses_7dictree___pyx_scope_struct_4_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -3700,6 +4299,7 @@ static PyObject *__pyx_pf_5moses_7dictree_7FValues_7__str___genexpr(PyObject *__ return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -3721,6 +4321,9 @@ static PyObject *__pyx_gb_5moses_7dictree_7FValues_7__str___2generator2(__pyx_Ge PyObject *(*__pyx_t_3)(PyObject *); PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { @@ -3759,8 +4362,9 @@ static PyObject *__pyx_gb_5moses_7dictree_7FValues_7__str___2generator2(__pyx_Ge } else { __pyx_t_4 = __pyx_t_3(__pyx_t_1); if (unlikely(!__pyx_t_4)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); + PyObject* exc_type = PyErr_Occurred(); + if (exc_type) { + if (likely(exc_type == PyExc_StopIteration || PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) PyErr_Clear(); else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } break; @@ -3768,18 +4372,17 @@ static PyObject *__pyx_gb_5moses_7dictree_7FValues_7__str___2generator2(__pyx_Ge __Pyx_GOTREF(__pyx_t_4); } __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_x); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_x); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_x, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); - __pyx_cur_scope->__pyx_v_x = __pyx_t_4; __pyx_t_4 = 0; __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_x); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_x); - __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; __Pyx_XGIVEREF(__pyx_t_1); @@ -3800,6 +4403,8 @@ static PyObject *__pyx_gb_5moses_7dictree_7FValues_7__str___2generator2(__pyx_Ge if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -3817,10 +4422,10 @@ static PyObject *__pyx_gb_5moses_7dictree_7FValues_7__str___2generator2(__pyx_Ge /* "moses/dictree.pyx":134 * super(FValues, self).__init__(values) - * + * * def __str__(self): # <<<<<<<<<<<<<< * return ' '.join(str(x) for x in self) - * + * */ static PyObject *__pyx_pf_5moses_7dictree_7FValues_2__str__(struct __pyx_obj_5moses_7dictree_FValues *__pyx_v_self) { @@ -3829,12 +4434,11 @@ static PyObject *__pyx_pf_5moses_7dictree_7FValues_2__str__(struct __pyx_obj_5mo __Pyx_RefNannyDeclarations PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__str__", 0); - __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__ *)__pyx_ptype_5moses_7dictree___pyx_scope_struct_3___str__->tp_new(__pyx_ptype_5moses_7dictree___pyx_scope_struct_3___str__, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__ *)__pyx_tp_new_5moses_7dictree___pyx_scope_struct_3___str__(__pyx_ptype_5moses_7dictree___pyx_scope_struct_3___str__, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -3845,36 +4449,34 @@ static PyObject *__pyx_pf_5moses_7dictree_7FValues_2__str__(struct __pyx_obj_5mo __Pyx_GIVEREF((PyObject *)__pyx_cur_scope->__pyx_v_self); /* "moses/dictree.pyx":135 - * + * * def __str__(self): * return ' '.join(str(x) for x in self) # <<<<<<<<<<<<<< - * + * * cdef class TargetProduction(Production): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_6), __pyx_n_s__join); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_pf_5moses_7dictree_7FValues_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __pyx_pf_5moses_7dictree_7FValues_7__str___genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); + /* "moses/dictree.pyx":134 + * super(FValues, self).__init__(values) + * + * def __str__(self): # <<<<<<<<<<<<<< + * return ' '.join(str(x) for x in self) + * + */ + + /* function exit code */ + __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); __Pyx_AddTraceback("moses.dictree.FValues.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -3884,6 +4486,14 @@ static PyObject *__pyx_pf_5moses_7dictree_7FValues_2__str__(struct __pyx_obj_5mo return __pyx_r; } +/* "moses/dictree.pyx":144 + * cdef readonly FValues scores + * + * def __init__(self, rhs, scores, alignment = [], lhs = None): # <<<<<<<<<<<<<< + * """ + * :rhs right-hand side tokens (sequence of terminals and nonterminals) + */ + /* Python wrapper */ static int __pyx_pw_5moses_7dictree_16TargetProduction_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5moses_7dictree_16TargetProduction___init__[] = "\n :rhs right-hand side tokens (sequence of terminals and nonterminals)\n :scores tuple of real-valued features\n :alignment tuple of pairs of 0-based integers\n :lhs left-hand side nonterminal (None in phrase-based)\n "; @@ -3895,21 +4505,16 @@ static int __pyx_pw_5moses_7dictree_16TargetProduction_1__init__(PyObject *__pyx PyObject *__pyx_v_scores = 0; PyObject *__pyx_v_alignment = 0; PyObject *__pyx_v_lhs = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__rhs,&__pyx_n_s__scores,&__pyx_n_s__alignment,&__pyx_n_s__lhs,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_rhs,&__pyx_n_s_scores,&__pyx_n_s_alignment,&__pyx_n_s_lhs,0}; PyObject* values[4] = {0,0,0,0}; - values[2] = __pyx_k_12; - - /* "moses/dictree.pyx":144 - * cdef readonly FValues scores - * - * def __init__(self, rhs, scores, alignment = [], lhs = None): # <<<<<<<<<<<<<< - * """ - * :rhs right-hand side tokens (sequence of terminals and nonterminals) - */ + values[2] = __pyx_k__5; values[3] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -3925,21 +4530,21 @@ static int __pyx_pw_5moses_7dictree_16TargetProduction_1__init__(PyObject *__pyx kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__rhs)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_rhs)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__scores)) != 0)) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_scores)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("__init__", 0, 2, 4, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__alignment); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_alignment); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__lhs); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_lhs); if (value) { values[3] = value; kw_args--; } } } @@ -3970,6 +4575,8 @@ static int __pyx_pw_5moses_7dictree_16TargetProduction_1__init__(PyObject *__pyx return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_5moses_7dictree_16TargetProduction___init__(((struct __pyx_obj_5moses_7dictree_TargetProduction *)__pyx_v_self), __pyx_v_rhs, __pyx_v_scores, __pyx_v_alignment, __pyx_v_lhs); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -4000,10 +4607,10 @@ static int __pyx_pf_5moses_7dictree_16TargetProduction___init__(struct __pyx_obj __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_2 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -4014,10 +4621,10 @@ static int __pyx_pf_5moses_7dictree_16TargetProduction___init__(struct __pyx_obj __Pyx_INCREF(__pyx_v_lhs); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_lhs); __Pyx_GIVEREF(__pyx_v_lhs); - __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 151; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "moses/dictree.pyx":152 @@ -4025,16 +4632,16 @@ static int __pyx_pf_5moses_7dictree_16TargetProduction___init__(struct __pyx_obj * super(TargetProduction, self).__init__(rhs, lhs) * self.scores = FValues(scores) # <<<<<<<<<<<<<< * self.alignment = Alignment(alignment) - * + * */ __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_scores); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_scores); __Pyx_GIVEREF(__pyx_v_scores); - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_FValues)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_FValues)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 152; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->scores); __Pyx_DECREF(((PyObject *)__pyx_v_self->scores)); @@ -4045,7 +4652,7 @@ static int __pyx_pf_5moses_7dictree_16TargetProduction___init__(struct __pyx_obj * super(TargetProduction, self).__init__(rhs, lhs) * self.scores = FValues(scores) * self.alignment = Alignment(alignment) # <<<<<<<<<<<<<< - * + * * @staticmethod */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -4053,15 +4660,24 @@ static int __pyx_pf_5moses_7dictree_16TargetProduction___init__(struct __pyx_obj __Pyx_INCREF(__pyx_v_alignment); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_alignment); __Pyx_GIVEREF(__pyx_v_alignment); - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_Alignment)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_Alignment)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 153; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->alignment); __Pyx_DECREF(((PyObject *)__pyx_v_self->alignment)); __pyx_v_self->alignment = ((struct __pyx_obj_5moses_7dictree_Alignment *)__pyx_t_3); __pyx_t_3 = 0; + /* "moses/dictree.pyx":144 + * cdef readonly FValues scores + * + * def __init__(self, rhs, scores, alignment = [], lhs = None): # <<<<<<<<<<<<<< + * """ + * :rhs right-hand side tokens (sequence of terminals and nonterminals) + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -4075,6 +4691,14 @@ static int __pyx_pf_5moses_7dictree_16TargetProduction___init__(struct __pyx_obj return __pyx_r; } +/* "moses/dictree.pyx":156 + * + * @staticmethod + * def desc(x, y, key = lambda r: r.scores[0]): # <<<<<<<<<<<<<< + * """Returns the sign of key(y) - key(x). + * Can only be used if scores is not an empty vector as + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_16TargetProduction_3desc(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5moses_7dictree_16TargetProduction_2desc[] = "Returns the sign of key(y) - key(x).\n Can only be used if scores is not an empty vector as\n keys defaults to scores[0]"; @@ -4083,13 +4707,16 @@ static PyObject *__pyx_pw_5moses_7dictree_16TargetProduction_3desc(CYTHON_UNUSED PyObject *__pyx_v_x = 0; PyObject *__pyx_v_y = 0; PyObject *__pyx_v_key = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("desc (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__x,&__pyx_n_s__y,&__pyx_n_s__key,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_x,&__pyx_n_s_y,&__pyx_n_s_key,0}; PyObject* values[3] = {0,0,0}; - values[2] = __pyx_k_13; + values[2] = __pyx_k__6; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -4103,16 +4730,16 @@ static PyObject *__pyx_pw_5moses_7dictree_16TargetProduction_3desc(CYTHON_UNUSED kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_x)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_y)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("desc", 0, 2, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key); if (value) { values[2] = value; kw_args--; } } } @@ -4141,58 +4768,8 @@ static PyObject *__pyx_pw_5moses_7dictree_16TargetProduction_3desc(CYTHON_UNUSED return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_5moses_7dictree_16TargetProduction_2desc(__pyx_v_x, __pyx_v_y, __pyx_v_key); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* Python wrapper */ -static PyObject *__pyx_pw_5moses_7dictree_16TargetProduction_4desc_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_r); /*proto*/ -static PyMethodDef __pyx_mdef_5moses_7dictree_16TargetProduction_4desc_lambda1 = {__Pyx_NAMESTR("lambda1"), (PyCFunction)__pyx_pw_5moses_7dictree_16TargetProduction_4desc_lambda1, METH_O, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pw_5moses_7dictree_16TargetProduction_4desc_lambda1(PyObject *__pyx_self, PyObject *__pyx_v_r) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("lambda1 (wrapper)", 0); - __pyx_r = __pyx_lambda_funcdef_lambda1(__pyx_self, ((PyObject *)__pyx_v_r)); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* "moses/dictree.pyx":156 - * - * @staticmethod - * def desc(x, y, key = lambda r: r.scores[0]): # <<<<<<<<<<<<<< - * """Returns the sign of key(y) - key(x). - * Can only be used if scores is not an empty vector as - */ - -static PyObject *__pyx_lambda_funcdef_lambda1(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_r) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("lambda1", 0); - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_r, __pyx_n_s__scores); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 0, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_r = __pyx_t_2; - __pyx_t_2 = 0; - goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_AddTraceback("moses.dictree.TargetProduction.desc.lambda1", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -4213,7 +4790,7 @@ static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_2desc(PyObject *__p * Can only be used if scores is not an empty vector as * keys defaults to scores[0]""" * return fsign(key(y) - key(x)) # <<<<<<<<<<<<<< - * + * * def __str__(self): */ __Pyx_XDECREF(__pyx_r); @@ -4222,31 +4799,38 @@ static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_2desc(PyObject *__p __Pyx_INCREF(__pyx_v_y); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_y); __Pyx_GIVEREF(__pyx_v_y); - __pyx_t_2 = PyObject_Call(__pyx_v_key, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_v_key, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_x); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_x); __Pyx_GIVEREF(__pyx_v_x); - __pyx_t_3 = PyObject_Call(__pyx_v_key, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_v_key, __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromLong(__pyx_f_5moses_7dictree_fsign(__pyx_t_4, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_f_5moses_7dictree_fsign(__pyx_t_4, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 160; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":156 + * + * @staticmethod + * def desc(x, y, key = lambda r: r.scores[0]): # <<<<<<<<<<<<<< + * """Returns the sign of key(y) - key(x). + * Can only be used if scores is not an empty vector as + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -4259,6 +4843,14 @@ static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_2desc(PyObject *__p return __pyx_r; } +/* "moses/dictree.pyx":162 + * return fsign(key(y) - key(x)) + * + * def __str__(self): # <<<<<<<<<<<<<< + * """Returns a string such as: ||| [||| word-alignment info]""" + * if self.lhs: + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_16TargetProduction_5__str__(PyObject *__pyx_v_self); /*proto*/ static char __pyx_doc_5moses_7dictree_16TargetProduction_4__str__[] = "Returns a string such as: ||| [||| word-alignment info]"; @@ -4270,18 +4862,12 @@ static PyObject *__pyx_pw_5moses_7dictree_16TargetProduction_5__str__(PyObject * __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__str__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_16TargetProduction_4__str__(((struct __pyx_obj_5moses_7dictree_TargetProduction *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":162 - * return fsign(key(y) - key(x)) - * - * def __str__(self): # <<<<<<<<<<<<<< - * """Returns a string such as: ||| [||| word-alignment info]""" - * if self.lhs: - */ - static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_4__str__(struct __pyx_obj_5moses_7dictree_TargetProduction *__pyx_v_self) { PyObject *__pyx_v_lhs = NULL; PyObject *__pyx_r = NULL; @@ -4291,7 +4877,6 @@ static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_4__str__(struct __p PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; - PyObject *__pyx_t_6 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; @@ -4304,7 +4889,7 @@ static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_4__str__(struct __p * lhs = [self.lhs] * else: */ - __pyx_t_1 = (((PyObject *)__pyx_v_self->__pyx_base.lhs) != Py_None) && (PyBytes_GET_SIZE(((PyObject *)__pyx_v_self->__pyx_base.lhs)) != 0); + __pyx_t_1 = (__pyx_v_self->__pyx_base.lhs != Py_None) && (PyBytes_GET_SIZE(__pyx_v_self->__pyx_base.lhs) != 0); if (__pyx_t_1) { /* "moses/dictree.pyx":165 @@ -4316,10 +4901,10 @@ static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_4__str__(struct __p */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 165; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.lhs)); - PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_v_self->__pyx_base.lhs)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.lhs)); - __pyx_v_lhs = __pyx_t_2; + __Pyx_INCREF(__pyx_v_self->__pyx_base.lhs); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_v_self->__pyx_base.lhs); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.lhs); + __pyx_v_lhs = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; goto __pyx_L3; } @@ -4334,7 +4919,7 @@ static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_4__str__(struct __p */ __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 167; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_v_lhs = __pyx_t_2; + __pyx_v_lhs = ((PyObject*)__pyx_t_2); __pyx_t_2 = 0; } __pyx_L3:; @@ -4347,97 +4932,95 @@ static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_4__str__(struct __p * str(self.alignment))) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_14), __pyx_n_s__join); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_chain); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyObject_GetAttr(((PyObject *)__pyx_kp_s_6), __pyx_n_s__join); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_4 = __Pyx_GetName(__pyx_m, __pyx_n_s__chain); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_INCREF(__pyx_v_self->__pyx_base.rhs); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_self->__pyx_base.rhs); + __Pyx_GIVEREF(__pyx_v_self->__pyx_base.rhs); + __Pyx_INCREF(__pyx_v_lhs); + PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_v_lhs); + __Pyx_GIVEREF(__pyx_v_lhs); + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __Pyx_INCREF(((PyObject *)__pyx_v_self->__pyx_base.rhs)); - PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self->__pyx_base.rhs)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_self->__pyx_base.rhs)); - __Pyx_INCREF(((PyObject *)__pyx_v_lhs)); - PyTuple_SET_ITEM(__pyx_t_5, 1, ((PyObject *)__pyx_v_lhs)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_lhs)); - __pyx_t_6 = PyObject_Call(__pyx_t_4, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); - __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - __pyx_t_6 = 0; - __pyx_t_6 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_6); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __pyx_t_3 = __Pyx_PyString_Join(__pyx_kp_s__2, __pyx_t_4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "moses/dictree.pyx":169 * lhs = [] * return ' ||| '.join((' '.join(chain(self.rhs, lhs)), * str(self.scores), # <<<<<<<<<<<<<< * str(self.alignment))) - * + * */ - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self->scores)); - PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self->scores)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self->scores)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->scores)); - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 169; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "moses/dictree.pyx":170 * return ' ||| '.join((' '.join(chain(self.rhs, lhs)), * str(self.scores), * str(self.alignment))) # <<<<<<<<<<<<<< - * + * * def __repr__(self): */ - __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_INCREF(((PyObject *)__pyx_v_self->alignment)); - PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_v_self->alignment)); + PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_v_self->alignment)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self->alignment)); - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __pyx_t_5 = PyTuple_New(3); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyString_Type))), __pyx_t_4, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 170; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_6); - __Pyx_GIVEREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + + /* "moses/dictree.pyx":168 + * else: + * lhs = [] + * return ' ||| '.join((' '.join(chain(self.rhs, lhs)), # <<<<<<<<<<<<<< + * str(self.scores), + * str(self.alignment))) + */ + __pyx_t_4 = PyTuple_New(3); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_4); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_t_6 = 0; + PyTuple_SET_ITEM(__pyx_t_4, 1, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + PyTuple_SET_ITEM(__pyx_t_4, 2, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); __pyx_t_3 = 0; - __pyx_t_4 = 0; - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); - PyTuple_SET_ITEM(__pyx_t_4, 0, ((PyObject *)__pyx_t_5)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); + __pyx_t_2 = 0; __pyx_t_5 = 0; - __pyx_t_5 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyString_Join(__pyx_kp_s__7, __pyx_t_4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 168; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":162 + * return fsign(key(y) - key(x)) + * + * def __str__(self): # <<<<<<<<<<<<<< + * """Returns a string such as: ||| [||| word-alignment info]""" + * if self.lhs: + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_6); __Pyx_AddTraceback("moses.dictree.TargetProduction.__str__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -4447,6 +5030,14 @@ static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_4__str__(struct __p return __pyx_r; } +/* "moses/dictree.pyx":172 + * str(self.alignment))) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return repr((repr(self.rhs), repr(self.lhs), repr(self.scores), repr(self.alignment))) + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_16TargetProduction_7__repr__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_16TargetProduction_7__repr__(PyObject *__pyx_v_self) { @@ -4454,18 +5045,12 @@ static PyObject *__pyx_pw_5moses_7dictree_16TargetProduction_7__repr__(PyObject __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__repr__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_16TargetProduction_6__repr__(((struct __pyx_obj_5moses_7dictree_TargetProduction *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":172 - * str(self.alignment))) - * - * def __repr__(self): # <<<<<<<<<<<<<< - * return repr((repr(self.rhs), repr(self.lhs), repr(self.scores), repr(self.alignment))) - * - */ - static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_6__repr__(struct __pyx_obj_5moses_7dictree_TargetProduction *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -4480,19 +5065,19 @@ static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_6__repr__(struct __ __Pyx_RefNannySetupContext("__repr__", 0); /* "moses/dictree.pyx":173 - * + * * def __repr__(self): * return repr((repr(self.rhs), repr(self.lhs), repr(self.scores), repr(self.alignment))) # <<<<<<<<<<<<<< - * + * * cdef class QueryResult(list): */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.rhs); + __pyx_t_1 = __pyx_v_self->__pyx_base.rhs; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = ((PyObject *)__pyx_v_self->__pyx_base.lhs); + __pyx_t_1 = __pyx_v_self->__pyx_base.lhs; __Pyx_INCREF(__pyx_t_1); __pyx_t_3 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); @@ -4521,15 +5106,22 @@ static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_6__repr__(struct __ __pyx_t_3 = 0; __pyx_t_4 = 0; __pyx_t_5 = 0; - __pyx_t_5 = PyObject_Repr(((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyObject_Repr(__pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 173; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_5; __pyx_t_5 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":172 + * str(self.alignment))) + * + * def __repr__(self): # <<<<<<<<<<<<<< + * return repr((repr(self.rhs), repr(self.lhs), repr(self.scores), repr(self.alignment))) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -4544,6 +5136,14 @@ static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_6__repr__(struct __ return __pyx_r; } +/* "moses/dictree.pyx":141 + * On top of lhs and rhs it comes with alignment information a tuple of real-valued features. + * """ + * cdef readonly Alignment alignment # <<<<<<<<<<<<<< + * cdef readonly FValues scores + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_16TargetProduction_9alignment_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_16TargetProduction_9alignment_1__get__(PyObject *__pyx_v_self) { @@ -4551,18 +5151,12 @@ static PyObject *__pyx_pw_5moses_7dictree_16TargetProduction_9alignment_1__get__ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_16TargetProduction_9alignment___get__(((struct __pyx_obj_5moses_7dictree_TargetProduction *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":141 - * On top of lhs and rhs it comes with alignment information a tuple of real-valued features. - * """ - * cdef readonly Alignment alignment # <<<<<<<<<<<<<< - * cdef readonly FValues scores - * - */ - static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_9alignment___get__(struct __pyx_obj_5moses_7dictree_TargetProduction *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -4572,13 +5166,21 @@ static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_9alignment___get__( __pyx_r = ((PyObject *)__pyx_v_self->alignment); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "moses/dictree.pyx":142 + * """ + * cdef readonly Alignment alignment + * cdef readonly FValues scores # <<<<<<<<<<<<<< + * + * def __init__(self, rhs, scores, alignment = [], lhs = None): + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_16TargetProduction_6scores_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_16TargetProduction_6scores_1__get__(PyObject *__pyx_v_self) { @@ -4586,18 +5188,12 @@ static PyObject *__pyx_pw_5moses_7dictree_16TargetProduction_6scores_1__get__(Py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_16TargetProduction_6scores___get__(((struct __pyx_obj_5moses_7dictree_TargetProduction *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":142 - * """ - * cdef readonly Alignment alignment - * cdef readonly FValues scores # <<<<<<<<<<<<<< - * - * def __init__(self, rhs, scores, alignment = [], lhs = None): - */ - static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_6scores___get__(struct __pyx_obj_5moses_7dictree_TargetProduction *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -4607,25 +5203,36 @@ static PyObject *__pyx_pf_5moses_7dictree_16TargetProduction_6scores___get__(str __pyx_r = ((PyObject *)__pyx_v_self->scores); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "moses/dictree.pyx":179 + * cdef readonly Production source + * + * def __init__(self, source, targets = []): # <<<<<<<<<<<<<< + * super(QueryResult, self).__init__(targets) + * self.source = source + */ + /* Python wrapper */ static int __pyx_pw_5moses_7dictree_11QueryResult_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_5moses_7dictree_11QueryResult_1__init__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_source = 0; PyObject *__pyx_v_targets = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__init__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__source,&__pyx_n_s__targets,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_source,&__pyx_n_s_targets,0}; PyObject* values[2] = {0,0}; - values[1] = __pyx_k_15; + values[1] = __pyx_k__8; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -4638,11 +5245,11 @@ static int __pyx_pw_5moses_7dictree_11QueryResult_1__init__(PyObject *__pyx_v_se kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__source)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_source)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__targets); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_targets); if (value) { values[1] = value; kw_args--; } } } @@ -4669,18 +5276,12 @@ static int __pyx_pw_5moses_7dictree_11QueryResult_1__init__(PyObject *__pyx_v_se return -1; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_5moses_7dictree_11QueryResult___init__(((struct __pyx_obj_5moses_7dictree_QueryResult *)__pyx_v_self), __pyx_v_source, __pyx_v_targets); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":179 - * cdef readonly Production source - * - * def __init__(self, source, targets = []): # <<<<<<<<<<<<<< - * super(QueryResult, self).__init__(targets) - * self.source = source - */ - static int __pyx_pf_5moses_7dictree_11QueryResult___init__(struct __pyx_obj_5moses_7dictree_QueryResult *__pyx_v_self, PyObject *__pyx_v_source, PyObject *__pyx_v_targets) { int __pyx_r; __Pyx_RefNannyDeclarations @@ -4693,11 +5294,11 @@ static int __pyx_pf_5moses_7dictree_11QueryResult___init__(struct __pyx_obj_5mos __Pyx_RefNannySetupContext("__init__", 0); /* "moses/dictree.pyx":180 - * + * * def __init__(self, source, targets = []): * super(QueryResult, self).__init__(targets) # <<<<<<<<<<<<<< * self.source = source - * + * */ __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); @@ -4707,10 +5308,10 @@ static int __pyx_pf_5moses_7dictree_11QueryResult___init__(struct __pyx_obj_5mos __Pyx_INCREF(((PyObject *)__pyx_v_self)); PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_self)); __Pyx_GIVEREF(((PyObject *)__pyx_v_self)); - __pyx_t_2 = PyObject_Call(__pyx_builtin_super, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_builtin_super, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s____init__); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_init); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -4718,26 +5319,37 @@ static int __pyx_pf_5moses_7dictree_11QueryResult___init__(struct __pyx_obj_5mos __Pyx_INCREF(__pyx_v_targets); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_targets); __Pyx_GIVEREF(__pyx_v_targets); - __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 180; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "moses/dictree.pyx":181 * def __init__(self, source, targets = []): * super(QueryResult, self).__init__(targets) * self.source = source # <<<<<<<<<<<<<< - * - * + * + * */ if (!(likely(((__pyx_v_source) == Py_None) || likely(__Pyx_TypeTest(__pyx_v_source, __pyx_ptype_5moses_7dictree_Production))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_INCREF(__pyx_v_source); - __Pyx_GIVEREF(__pyx_v_source); + __pyx_t_3 = __pyx_v_source; + __Pyx_INCREF(__pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); __Pyx_GOTREF(__pyx_v_self->source); __Pyx_DECREF(((PyObject *)__pyx_v_self->source)); - __pyx_v_self->source = ((struct __pyx_obj_5moses_7dictree_Production *)__pyx_v_source); + __pyx_v_self->source = ((struct __pyx_obj_5moses_7dictree_Production *)__pyx_t_3); + __pyx_t_3 = 0; + + /* "moses/dictree.pyx":179 + * cdef readonly Production source + * + * def __init__(self, source, targets = []): # <<<<<<<<<<<<<< + * super(QueryResult, self).__init__(targets) + * self.source = source + */ + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -4751,6 +5363,14 @@ static int __pyx_pf_5moses_7dictree_11QueryResult___init__(struct __pyx_obj_5mos return __pyx_r; } +/* "moses/dictree.pyx":177 + * cdef class QueryResult(list): + * + * cdef readonly Production source # <<<<<<<<<<<<<< + * + * def __init__(self, source, targets = []): + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_11QueryResult_6source_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_11QueryResult_6source_1__get__(PyObject *__pyx_v_self) { @@ -4758,18 +5378,12 @@ static PyObject *__pyx_pw_5moses_7dictree_11QueryResult_6source_1__get__(PyObjec __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_11QueryResult_6source___get__(((struct __pyx_obj_5moses_7dictree_QueryResult *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":177 - * cdef class QueryResult(list): - * - * cdef readonly Production source # <<<<<<<<<<<<<< - * - * def __init__(self, source, targets = []): - */ - static PyObject *__pyx_pf_5moses_7dictree_11QueryResult_6source___get__(struct __pyx_obj_5moses_7dictree_QueryResult *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -4779,24 +5393,35 @@ static PyObject *__pyx_pf_5moses_7dictree_11QueryResult_6source___get__(struct _ __pyx_r = ((PyObject *)__pyx_v_self->source); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* Python wrapper */ -static PyObject *__pyx_pw_5moses_7dictree_14DictionaryTree_1canLoad(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ +/* "moses/dictree.pyx":187 + * + * @classmethod + * def canLoad(cls, path, bint wa = False): # <<<<<<<<<<<<<< + * """Whether or not the path represents a valid table for that class.""" + * raise NotImplementedError + */ + +/* Python wrapper */ +static PyObject *__pyx_pw_5moses_7dictree_14DictionaryTree_1canLoad(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5moses_7dictree_14DictionaryTree_canLoad[] = "Whether or not the path represents a valid table for that class."; static PyObject *__pyx_pw_5moses_7dictree_14DictionaryTree_1canLoad(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { CYTHON_UNUSED PyObject *__pyx_v_path = 0; CYTHON_UNUSED int __pyx_v_wa; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("canLoad (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__path,&__pyx_n_s__wa,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_wa,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -4810,11 +5435,11 @@ static PyObject *__pyx_pw_5moses_7dictree_14DictionaryTree_1canLoad(PyObject *__ kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__wa); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wa); if (value) { values[1] = value; kw_args--; } } } @@ -4833,14 +5458,6 @@ static PyObject *__pyx_pw_5moses_7dictree_14DictionaryTree_1canLoad(PyObject *__ if (values[1]) { __pyx_v_wa = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_wa == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - - /* "moses/dictree.pyx":187 - * - * @classmethod - * def canLoad(cls, path, bint wa = False): # <<<<<<<<<<<<<< - * """Whether or not the path represents a valid table for that class.""" - * raise NotImplementedError - */ __pyx_v_wa = ((int)0); } } @@ -4853,6 +5470,8 @@ static PyObject *__pyx_pw_5moses_7dictree_14DictionaryTree_1canLoad(PyObject *__ return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_5moses_7dictree_14DictionaryTree_canLoad(((PyObject*)__pyx_v_cls), __pyx_v_path, __pyx_v_wa); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -4869,23 +5488,37 @@ static PyObject *__pyx_pf_5moses_7dictree_14DictionaryTree_canLoad(CYTHON_UNUSED * def canLoad(cls, path, bint wa = False): * """Whether or not the path represents a valid table for that class.""" * raise NotImplementedError # <<<<<<<<<<<<<< - * + * * def query(self, line, converter = None, cmp = None, key = None): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":187 + * + * @classmethod + * def canLoad(cls, path, bint wa = False): # <<<<<<<<<<<<<< + * """Whether or not the path represents a valid table for that class.""" + * raise NotImplementedError + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("moses.dictree.DictionaryTree.canLoad", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; - __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "moses/dictree.pyx":191 + * raise NotImplementedError + * + * def query(self, line, converter = None, cmp = None, key = None): # <<<<<<<<<<<<<< + * """ + * Returns a list of target productions that translate a given source production + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_14DictionaryTree_3query(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5moses_7dictree_14DictionaryTree_2query[] = "\n Returns a list of target productions that translate a given source production\n :line query (string)\n :converter applies a transformation to the score (function)\n :cmp define it to get a sorted list (design it compatible with your converter)\n :key defines the key of the comparison\n :return QueryResult\n "; @@ -4894,20 +5527,15 @@ static PyObject *__pyx_pw_5moses_7dictree_14DictionaryTree_3query(PyObject *__py CYTHON_UNUSED PyObject *__pyx_v_converter = 0; CYTHON_UNUSED PyObject *__pyx_v_cmp = 0; CYTHON_UNUSED PyObject *__pyx_v_key = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("query (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__line,&__pyx_n_s__converter,&__pyx_n_s__cmp,&__pyx_n_s__key,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_line,&__pyx_n_s_converter,&__pyx_n_s_cmp,&__pyx_n_s_key,0}; PyObject* values[4] = {0,0,0,0}; - - /* "moses/dictree.pyx":191 - * raise NotImplementedError - * - * def query(self, line, converter = None, cmp = None, key = None): # <<<<<<<<<<<<<< - * """ - * Returns a list of target productions that translate a given source production - */ values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)Py_None); @@ -4925,21 +5553,21 @@ static PyObject *__pyx_pw_5moses_7dictree_14DictionaryTree_3query(PyObject *__py kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_line)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__converter); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_converter); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cmp); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cmp); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key); if (value) { values[3] = value; kw_args--; } } } @@ -4970,6 +5598,8 @@ static PyObject *__pyx_pw_5moses_7dictree_14DictionaryTree_3query(PyObject *__py return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_5moses_7dictree_14DictionaryTree_2query(((struct __pyx_obj_5moses_7dictree_DictionaryTree *)__pyx_v_self), __pyx_v_line, __pyx_v_converter, __pyx_v_cmp, __pyx_v_key); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -4986,23 +5616,37 @@ static PyObject *__pyx_pf_5moses_7dictree_14DictionaryTree_2query(CYTHON_UNUSED * :return QueryResult * """ * raise NotImplementedError # <<<<<<<<<<<<<< - * + * * cdef class PhraseDictionaryTree(DictionaryTree): */ __Pyx_Raise(__pyx_builtin_NotImplementedError, 0, 0, 0); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 200; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":191 + * raise NotImplementedError + * + * def query(self, line, converter = None, cmp = None, key = None): # <<<<<<<<<<<<<< + * """ + * Returns a list of target productions that translate a given source production + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("moses.dictree.DictionaryTree.query", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; - __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "moses/dictree.pyx":213 + * cdef readonly unsigned tableLimit + * + * def __cinit__(self, bytes path, unsigned tableLimit = 20, unsigned nscores = 5, bint wa = False, delimiters = ' \t'): # <<<<<<<<<<<<<< + * """ + * :path stem of the table, e.g europarl.fr-en is the stem for europar.fr-en.binphr.* + */ + /* Python wrapper */ static int __pyx_pw_5moses_7dictree_20PhraseDictionaryTree_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_5moses_7dictree_20PhraseDictionaryTree_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { @@ -5011,13 +5655,16 @@ static int __pyx_pw_5moses_7dictree_20PhraseDictionaryTree_1__cinit__(PyObject * unsigned int __pyx_v_nscores; int __pyx_v_wa; PyObject *__pyx_v_delimiters = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__path,&__pyx_n_s__tableLimit,&__pyx_n_s__nscores,&__pyx_n_s__wa,&__pyx_n_s__delimiters,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_tableLimit,&__pyx_n_s_nscores,&__pyx_n_s_wa,&__pyx_n_s_delimiters,0}; PyObject* values[5] = {0,0,0,0,0}; - values[4] = ((PyObject *)__pyx_kp_s_16); + values[4] = ((PyObject *)__pyx_kp_s__9); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -5033,26 +5680,26 @@ static int __pyx_pw_5moses_7dictree_20PhraseDictionaryTree_1__cinit__(PyObject * kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tableLimit); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tableLimit); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nscores); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nscores); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__wa); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wa); if (value) { values[3] = value; kw_args--; } } case 4: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__delimiters); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_delimiters); if (value) { values[4] = value; kw_args--; } } } @@ -5072,26 +5719,18 @@ static int __pyx_pw_5moses_7dictree_20PhraseDictionaryTree_1__cinit__(PyObject * } __pyx_v_path = ((PyObject*)values[0]); if (values[1]) { - __pyx_v_tableLimit = __Pyx_PyInt_AsUnsignedInt(values[1]); if (unlikely((__pyx_v_tableLimit == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_tableLimit = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_tableLimit == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_tableLimit = ((unsigned int)20); } if (values[2]) { - __pyx_v_nscores = __Pyx_PyInt_AsUnsignedInt(values[2]); if (unlikely((__pyx_v_nscores == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_nscores = __Pyx_PyInt_As_unsigned_int(values[2]); if (unlikely((__pyx_v_nscores == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_nscores = ((unsigned int)5); } if (values[3]) { __pyx_v_wa = __Pyx_PyObject_IsTrue(values[3]); if (unlikely((__pyx_v_wa == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - - /* "moses/dictree.pyx":213 - * cdef readonly unsigned tableLimit - * - * def __cinit__(self, bytes path, unsigned tableLimit = 20, unsigned nscores = 5, bint wa = False, delimiters = ' \t'): # <<<<<<<<<<<<<< - * """ - * :path stem of the table, e.g europarl.fr-en is the stem for europar.fr-en.binphr.* - */ __pyx_v_wa = ((int)0); } __pyx_v_delimiters = values[4]; @@ -5106,6 +5745,8 @@ static int __pyx_pw_5moses_7dictree_20PhraseDictionaryTree_1__cinit__(PyObject * __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyBytes_Type), 1, "path", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 213; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_5moses_7dictree_20PhraseDictionaryTree___cinit__(((struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *)__pyx_v_self), __pyx_v_path, __pyx_v_tableLimit, __pyx_v_nscores, __pyx_v_wa, __pyx_v_delimiters); + + /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; @@ -5130,66 +5771,64 @@ static int __pyx_pf_5moses_7dictree_20PhraseDictionaryTree___cinit__(struct __py /* "moses/dictree.pyx":221 * """ - * + * * if not PhraseDictionaryTree.canLoad(path, wa): # <<<<<<<<<<<<<< * raise ValueError, "'%s' doesn't seem a valid binary table." % path * self.path = path */ - __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_PhraseDictionaryTree)), __pyx_n_s__canLoad); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_PhraseDictionaryTree)), __pyx_n_s_canLoad); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_v_wa); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_INCREF(((PyObject *)__pyx_v_path)); - PyTuple_SET_ITEM(__pyx_t_3, 0, ((PyObject *)__pyx_v_path)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_path)); + __Pyx_INCREF(__pyx_v_path); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_path); + __Pyx_GIVEREF(__pyx_v_path); PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 221; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_5 = (!__pyx_t_4); + __pyx_t_5 = ((!__pyx_t_4) != 0); if (__pyx_t_5) { /* "moses/dictree.pyx":222 - * + * * if not PhraseDictionaryTree.canLoad(path, wa): * raise ValueError, "'%s' doesn't seem a valid binary table." % path # <<<<<<<<<<<<<< * self.path = path * self.tableLimit = tableLimit */ - __pyx_t_2 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_17), ((PyObject *)__pyx_v_path)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_2), 0, 0); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyString_Format(__pyx_kp_s_s_doesn_t_seem_a_valid_binary_t, __pyx_v_path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_2, 0, 0); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 222; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - goto __pyx_L3; } - __pyx_L3:; /* "moses/dictree.pyx":223 * if not PhraseDictionaryTree.canLoad(path, wa): * raise ValueError, "'%s' doesn't seem a valid binary table." % path * self.path = path # <<<<<<<<<<<<<< * self.tableLimit = tableLimit - * self.nscores = nscores + * self.nscores = nscores #used to be passed to PhraseDictionaryTree, not used now */ - __Pyx_INCREF(((PyObject *)__pyx_v_path)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_path)); + __Pyx_INCREF(__pyx_v_path); + __Pyx_GIVEREF(__pyx_v_path); __Pyx_GOTREF(__pyx_v_self->path); - __Pyx_DECREF(((PyObject *)__pyx_v_self->path)); + __Pyx_DECREF(__pyx_v_self->path); __pyx_v_self->path = __pyx_v_path; /* "moses/dictree.pyx":224 * raise ValueError, "'%s' doesn't seem a valid binary table." % path * self.path = path * self.tableLimit = tableLimit # <<<<<<<<<<<<<< - * self.nscores = nscores + * self.nscores = nscores #used to be passed to PhraseDictionaryTree, not used now * self.wa = wa */ __pyx_v_self->tableLimit = __pyx_v_tableLimit; @@ -5197,7 +5836,7 @@ static int __pyx_pf_5moses_7dictree_20PhraseDictionaryTree___cinit__(struct __py /* "moses/dictree.pyx":225 * self.path = path * self.tableLimit = tableLimit - * self.nscores = nscores # <<<<<<<<<<<<<< + * self.nscores = nscores #used to be passed to PhraseDictionaryTree, not used now # <<<<<<<<<<<<<< * self.wa = wa * self.delimiters = delimiters */ @@ -5205,55 +5844,66 @@ static int __pyx_pf_5moses_7dictree_20PhraseDictionaryTree___cinit__(struct __py /* "moses/dictree.pyx":226 * self.tableLimit = tableLimit - * self.nscores = nscores + * self.nscores = nscores #used to be passed to PhraseDictionaryTree, not used now * self.wa = wa # <<<<<<<<<<<<<< * self.delimiters = delimiters - * self.tree = new cdictree.PhraseDictionaryTree(nscores) + * self.tree = new cdictree.PhraseDictionaryTree() */ __pyx_v_self->wa = __pyx_v_wa; /* "moses/dictree.pyx":227 - * self.nscores = nscores + * self.nscores = nscores #used to be passed to PhraseDictionaryTree, not used now * self.wa = wa * self.delimiters = delimiters # <<<<<<<<<<<<<< - * self.tree = new cdictree.PhraseDictionaryTree(nscores) + * self.tree = new cdictree.PhraseDictionaryTree() * self.tree.NeedAlignmentInfo(wa) */ - if (!(likely(PyBytes_CheckExact(__pyx_v_delimiters))||((__pyx_v_delimiters) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_delimiters)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_INCREF(__pyx_v_delimiters); - __Pyx_GIVEREF(__pyx_v_delimiters); + if (!(likely(PyBytes_CheckExact(__pyx_v_delimiters))||((__pyx_v_delimiters) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_delimiters)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 227; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_v_delimiters; + __Pyx_INCREF(__pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); __Pyx_GOTREF(__pyx_v_self->delimiters); - __Pyx_DECREF(((PyObject *)__pyx_v_self->delimiters)); - __pyx_v_self->delimiters = ((PyObject*)__pyx_v_delimiters); + __Pyx_DECREF(__pyx_v_self->delimiters); + __pyx_v_self->delimiters = ((PyObject*)__pyx_t_2); + __pyx_t_2 = 0; /* "moses/dictree.pyx":228 * self.wa = wa * self.delimiters = delimiters - * self.tree = new cdictree.PhraseDictionaryTree(nscores) # <<<<<<<<<<<<<< + * self.tree = new cdictree.PhraseDictionaryTree() # <<<<<<<<<<<<<< * self.tree.NeedAlignmentInfo(wa) * self.tree.Read(path) */ - __pyx_v_self->tree = new Moses::PhraseDictionaryTree(__pyx_v_nscores); + __pyx_v_self->tree = new Moses::PhraseDictionaryTree(); /* "moses/dictree.pyx":229 * self.delimiters = delimiters - * self.tree = new cdictree.PhraseDictionaryTree(nscores) + * self.tree = new cdictree.PhraseDictionaryTree() * self.tree.NeedAlignmentInfo(wa) # <<<<<<<<<<<<<< * self.tree.Read(path) - * + * */ __pyx_v_self->tree->NeedAlignmentInfo(__pyx_v_wa); /* "moses/dictree.pyx":230 - * self.tree = new cdictree.PhraseDictionaryTree(nscores) + * self.tree = new cdictree.PhraseDictionaryTree() * self.tree.NeedAlignmentInfo(wa) * self.tree.Read(path) # <<<<<<<<<<<<<< - * + * * def __dealloc__(self): */ - __pyx_t_6 = __pyx_convert_string_from_py_(((PyObject *)__pyx_v_path)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __pyx_convert_string_from_py_(__pyx_v_path); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 230; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_self->tree->Read(__pyx_t_6); + /* "moses/dictree.pyx":213 + * cdef readonly unsigned tableLimit + * + * def __cinit__(self, bytes path, unsigned tableLimit = 20, unsigned nscores = 5, bint wa = False, delimiters = ' \t'): # <<<<<<<<<<<<<< + * """ + * :path stem of the table, e.g europarl.fr-en is the stem for europar.fr-en.binphr.* + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; @@ -5267,50 +5917,72 @@ static int __pyx_pf_5moses_7dictree_20PhraseDictionaryTree___cinit__(struct __py return __pyx_r; } +/* "moses/dictree.pyx":232 + * self.tree.Read(path) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.tree + * + */ + /* Python wrapper */ static void __pyx_pw_5moses_7dictree_20PhraseDictionaryTree_3__dealloc__(PyObject *__pyx_v_self); /*proto*/ static void __pyx_pw_5moses_7dictree_20PhraseDictionaryTree_3__dealloc__(PyObject *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__ (wrapper)", 0); __pyx_pf_5moses_7dictree_20PhraseDictionaryTree_2__dealloc__(((struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); } -/* "moses/dictree.pyx":232 - * self.tree.Read(path) - * - * def __dealloc__(self): # <<<<<<<<<<<<<< - * del self.tree - * - */ - -static void __pyx_pf_5moses_7dictree_20PhraseDictionaryTree_2__dealloc__(CYTHON_UNUSED struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *__pyx_v_self) { +static void __pyx_pf_5moses_7dictree_20PhraseDictionaryTree_2__dealloc__(struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *__pyx_v_self) { __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__dealloc__", 0); /* "moses/dictree.pyx":233 - * + * * def __dealloc__(self): * del self.tree # <<<<<<<<<<<<<< - * + * * @classmethod */ delete __pyx_v_self->tree; + /* "moses/dictree.pyx":232 + * self.tree.Read(path) + * + * def __dealloc__(self): # <<<<<<<<<<<<<< + * del self.tree + * + */ + + /* function exit code */ __Pyx_RefNannyFinishContext(); } +/* "moses/dictree.pyx":236 + * + * @classmethod + * def canLoad(cls, stem, bint wa = False): # <<<<<<<<<<<<<< + * """This sanity check was added to the constructor, but you can access it from outside this class + * to determine whether or not you are providing a valid stem to BinaryPhraseTable.""" + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_5canLoad(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5moses_7dictree_20PhraseDictionaryTree_4canLoad[] = "This sanity check was added to the constructor, but you can access it from outside this class\n to determine whether or not you are providing a valid stem to BinaryPhraseTable."; static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_5canLoad(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_stem = 0; int __pyx_v_wa; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("canLoad (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__stem,&__pyx_n_s__wa,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stem,&__pyx_n_s_wa,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -5324,11 +5996,11 @@ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_5canLoad(PyObje kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stem)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stem)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__wa); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wa); if (value) { values[1] = value; kw_args--; } } } @@ -5347,14 +6019,6 @@ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_5canLoad(PyObje if (values[1]) { __pyx_v_wa = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_wa == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - - /* "moses/dictree.pyx":236 - * - * @classmethod - * def canLoad(cls, stem, bint wa = False): # <<<<<<<<<<<<<< - * """This sanity check was added to the constructor, but you can access it from outside this class - * to determine whether or not you are providing a valid stem to BinaryPhraseTable.""" - */ __pyx_v_wa = ((int)0); } } @@ -5367,6 +6031,8 @@ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_5canLoad(PyObje return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4canLoad(((PyObject*)__pyx_v_cls), __pyx_v_stem, __pyx_v_wa); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -5374,10 +6040,10 @@ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_5canLoad(PyObje static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4canLoad(CYTHON_UNUSED PyObject *__pyx_v_cls, PyObject *__pyx_v_stem, int __pyx_v_wa) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; + int __pyx_t_1; PyObject *__pyx_t_2 = NULL; PyObject *__pyx_t_3 = NULL; - int __pyx_t_4; + PyObject *__pyx_t_4 = NULL; PyObject *__pyx_t_5 = NULL; PyObject *__pyx_t_6 = NULL; PyObject *__pyx_t_7 = NULL; @@ -5394,7 +6060,8 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4canLoad(CYTHON * return os.path.isfile(stem + ".binphr.idx") \ * and os.path.isfile(stem + ".binphr.srctree.wa") \ */ - if (__pyx_v_wa) { + __pyx_t_1 = (__pyx_v_wa != 0); + if (__pyx_t_1) { /* "moses/dictree.pyx":240 * to determine whether or not you are providing a valid stem to BinaryPhraseTable.""" @@ -5412,14 +6079,8 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4canLoad(CYTHON * and os.path.isfile(stem + ".binphr.srcvoc") \ * and os.path.isfile(stem + ".binphr.tgtdata.wa") \ */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__isfile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "moses/dictree.pyx":240 * to determine whether or not you are providing a valid stem to BinaryPhraseTable.""" @@ -5428,20 +6089,26 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4canLoad(CYTHON * and os.path.isfile(stem + ".binphr.srctree.wa") \ * and os.path.isfile(stem + ".binphr.srcvoc") \ */ - __pyx_t_2 = PyNumber_Add(__pyx_v_stem, ((PyObject *)__pyx_kp_s_18)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isfile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_4) { - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Add(__pyx_v_stem, __pyx_kp_s_binphr_idx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 240; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "moses/dictree.pyx":241 * if wa: @@ -5450,28 +6117,28 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4canLoad(CYTHON * and os.path.isfile(stem + ".binphr.srcvoc") \ * and os.path.isfile(stem + ".binphr.tgtdata.wa") \ */ - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__isfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_v_stem, ((PyObject *)__pyx_kp_s_19)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isfile); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_Add(__pyx_v_stem, __pyx_kp_s_binphr_srctree_wa); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_4) { - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 241; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "moses/dictree.pyx":242 * return os.path.isfile(stem + ".binphr.idx") \ @@ -5480,28 +6147,28 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4canLoad(CYTHON * and os.path.isfile(stem + ".binphr.tgtdata.wa") \ * and os.path.isfile(stem + ".binphr.tgtvoc") */ - __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__path); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__isfile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isfile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Add(__pyx_v_stem, ((PyObject *)__pyx_kp_s_20)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyNumber_Add(__pyx_v_stem, __pyx_kp_s_binphr_srcvoc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 242; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_4) { - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "moses/dictree.pyx":243 * and os.path.isfile(stem + ".binphr.srctree.wa") \ @@ -5510,27 +6177,27 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4canLoad(CYTHON * and os.path.isfile(stem + ".binphr.tgtvoc") * else: */ - __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__isfile); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isfile); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Add(__pyx_v_stem, ((PyObject *)__pyx_kp_s_21)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyNumber_Add(__pyx_v_stem, __pyx_kp_s_binphr_tgtdata_wa); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 243; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_4) { + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_1) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "moses/dictree.pyx":244 @@ -5540,25 +6207,25 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4canLoad(CYTHON * else: * return os.path.isfile(stem + ".binphr.idx") \ */ - __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__isfile); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_isfile); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_v_stem, ((PyObject *)__pyx_kp_s_22)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_Add(__pyx_v_stem, __pyx_kp_s_binphr_tgtvoc); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 244; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __pyx_t_6; __pyx_t_6 = 0; } else { @@ -5568,25 +6235,24 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4canLoad(CYTHON __pyx_t_5 = __pyx_t_8; __pyx_t_8 = 0; } else { - __pyx_t_5 = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_t_5 = __pyx_t_4; + __pyx_t_4 = 0; } - __pyx_t_3 = __pyx_t_5; + __pyx_t_4 = __pyx_t_5; __pyx_t_5 = 0; } else { - __pyx_t_3 = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_t_4 = __pyx_t_2; + __pyx_t_2 = 0; } - __pyx_t_1 = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; } else { - __pyx_t_1 = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_2 = __pyx_t_3; + __pyx_t_3 = 0; } - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; goto __pyx_L0; - goto __pyx_L3; } /*else*/ { @@ -5606,14 +6272,8 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4canLoad(CYTHON * and os.path.isfile(stem + ".binphr.srcvoc") \ * and os.path.isfile(stem + ".binphr.tgtdata") \ */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__isfile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "moses/dictree.pyx":246 * and os.path.isfile(stem + ".binphr.tgtvoc") @@ -5622,20 +6282,26 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4canLoad(CYTHON * and os.path.isfile(stem + ".binphr.srctree") \ * and os.path.isfile(stem + ".binphr.srcvoc") \ */ - __pyx_t_2 = PyNumber_Add(__pyx_v_stem, ((PyObject *)__pyx_kp_s_18)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isfile); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_4) { - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_3 = PyNumber_Add(__pyx_v_stem, __pyx_kp_s_binphr_idx); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_4, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 246; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; /* "moses/dictree.pyx":247 * else: @@ -5644,28 +6310,28 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4canLoad(CYTHON * and os.path.isfile(stem + ".binphr.srcvoc") \ * and os.path.isfile(stem + ".binphr.tgtdata") \ */ - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__isfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_v_stem, ((PyObject *)__pyx_kp_s_23)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isfile); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_Add(__pyx_v_stem, __pyx_kp_s_binphr_srctree); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); - __Pyx_GIVEREF(__pyx_t_1); - __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_4) { - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_2); + __Pyx_GIVEREF(__pyx_t_2); + __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_4, __pyx_t_5, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 247; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "moses/dictree.pyx":248 * return os.path.isfile(stem + ".binphr.idx") \ @@ -5674,85 +6340,85 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4canLoad(CYTHON * and os.path.isfile(stem + ".binphr.tgtdata") \ * and os.path.isfile(stem + ".binphr.tgtvoc") */ - __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__path); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __pyx_t_4 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__isfile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_4, __pyx_n_s_isfile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Add(__pyx_v_stem, ((PyObject *)__pyx_kp_s_20)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; + __pyx_t_4 = PyNumber_Add(__pyx_v_stem, __pyx_kp_s_binphr_srcvoc); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_4); + __Pyx_GIVEREF(__pyx_t_4); + __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_8, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 248; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_4) { - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_4); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_1) { + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; /* "moses/dictree.pyx":249 * and os.path.isfile(stem + ".binphr.srctree") \ * and os.path.isfile(stem + ".binphr.srcvoc") \ * and os.path.isfile(stem + ".binphr.tgtdata") \ # <<<<<<<<<<<<<< * and os.path.isfile(stem + ".binphr.tgtvoc") - * + * */ - __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); - __pyx_t_5 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__isfile); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isfile); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Add(__pyx_v_stem, ((PyObject *)__pyx_kp_s_24)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyNumber_Add(__pyx_v_stem, __pyx_kp_s_binphr_tgtdata); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_Call(__pyx_t_8, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_8, __pyx_t_6, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 249; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_4) { + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; + __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_1 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_1) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; /* "moses/dictree.pyx":250 * and os.path.isfile(stem + ".binphr.srcvoc") \ * and os.path.isfile(stem + ".binphr.tgtdata") \ * and os.path.isfile(stem + ".binphr.tgtvoc") # <<<<<<<<<<<<<< - * + * * cdef TargetProduction getTargetProduction(self, cdictree.StringTgtCand& cand, wa = None, converter = None): */ - __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_8 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__path); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__isfile); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_8, __pyx_n_s_isfile); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyNumber_Add(__pyx_v_stem, ((PyObject *)__pyx_kp_s_22)); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = PyNumber_Add(__pyx_v_stem, __pyx_kp_s_binphr_tgtvoc); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_8); __Pyx_GIVEREF(__pyx_t_8); __pyx_t_8 = 0; - __pyx_t_8 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_8 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 250; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_7 = __pyx_t_8; __pyx_t_8 = 0; } else { @@ -5762,33 +6428,39 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4canLoad(CYTHON __pyx_t_5 = __pyx_t_7; __pyx_t_7 = 0; } else { - __pyx_t_5 = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_t_5 = __pyx_t_4; + __pyx_t_4 = 0; } - __pyx_t_3 = __pyx_t_5; + __pyx_t_4 = __pyx_t_5; __pyx_t_5 = 0; } else { - __pyx_t_3 = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_t_4 = __pyx_t_2; + __pyx_t_2 = 0; } - __pyx_t_1 = __pyx_t_3; - __pyx_t_3 = 0; + __pyx_t_2 = __pyx_t_4; + __pyx_t_4 = 0; } else { - __pyx_t_1 = __pyx_t_2; - __pyx_t_2 = 0; + __pyx_t_2 = __pyx_t_3; + __pyx_t_3 = 0; } - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; + __pyx_r = __pyx_t_2; + __pyx_t_2 = 0; goto __pyx_L0; } - __pyx_L3:; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":236 + * + * @classmethod + * def canLoad(cls, stem, bint wa = False): # <<<<<<<<<<<<<< + * """This sanity check was added to the constructor, but you can access it from outside this class + * to determine whether or not you are providing a valid stem to BinaryPhraseTable.""" + */ + + /* function exit code */ __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); __Pyx_XDECREF(__pyx_t_3); + __Pyx_XDECREF(__pyx_t_4); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); @@ -5803,7 +6475,7 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4canLoad(CYTHON /* "moses/dictree.pyx":252 * and os.path.isfile(stem + ".binphr.tgtvoc") - * + * * cdef TargetProduction getTargetProduction(self, cdictree.StringTgtCand& cand, wa = None, converter = None): # <<<<<<<<<<<<<< * """Converts a StringTgtCandidate (c++ object) and possibly a word-alignment info (string) to a TargetProduction (python object).""" * cdef list words = [cand.tokens[i].c_str() for i in xrange(cand.tokens.size())] @@ -5853,24 +6525,23 @@ static struct __pyx_obj_5moses_7dictree_TargetProduction *__pyx_f_5moses_7dictre __pyx_t_2 = __pyx_v_cand.tokens.size(); for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - __pyx_t_4 = PyBytes_FromString((__pyx_v_cand.tokens[__pyx_v_i])->c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyBytes_FromString((__pyx_v_cand.tokens[__pyx_v_i])->c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __Pyx_INCREF(((PyObject *)__pyx_t_1)); - __pyx_v_words = __pyx_t_1; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_v_words = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; /* "moses/dictree.pyx":255 * """Converts a StringTgtCandidate (c++ object) and possibly a word-alignment info (string) to a TargetProduction (python object).""" * cdef list words = [cand.tokens[i].c_str() for i in xrange(cand.tokens.size())] * cdef list scores = [score for score in cand.scores] if converter is None else [converter(score) for score in cand.scores] # <<<<<<<<<<<<<< * return TargetProduction(words, scores, wa) - * + * */ __pyx_t_5 = (__pyx_v_converter == Py_None); - if (__pyx_t_5) { + if ((__pyx_t_5 != 0)) { __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); __pyx_t_7 = &__pyx_v_cand.scores; @@ -5881,14 +6552,12 @@ static struct __pyx_obj_5moses_7dictree_TargetProduction *__pyx_f_5moses_7dictre ++__pyx_t_6; __pyx_t_9 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_v_score); - __pyx_v_score = __pyx_t_9; + __Pyx_XDECREF_SET(__pyx_v_score, __pyx_t_9); __pyx_t_9 = 0; - if (unlikely(__Pyx_PyList_Append(__pyx_t_4, (PyObject*)__pyx_v_score))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_v_score))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __Pyx_INCREF(((PyObject *)__pyx_t_4)); __pyx_t_1 = __pyx_t_4; - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_t_4 = 0; } else { __pyx_t_4 = PyList_New(0); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); @@ -5900,55 +6569,60 @@ static struct __pyx_obj_5moses_7dictree_TargetProduction *__pyx_f_5moses_7dictre ++__pyx_t_6; __pyx_t_9 = PyFloat_FromDouble(__pyx_t_8); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_v_score); - __pyx_v_score = __pyx_t_9; + __Pyx_XDECREF_SET(__pyx_v_score, __pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_INCREF(__pyx_v_score); PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_v_score); __Pyx_GIVEREF(__pyx_v_score); - __pyx_t_10 = PyObject_Call(__pyx_v_converter, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_10 = __Pyx_PyObject_Call(__pyx_v_converter, __pyx_t_9, NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_10); - __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; - if (unlikely(__Pyx_PyList_Append(__pyx_t_4, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_4, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 255; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } - __Pyx_INCREF(((PyObject *)__pyx_t_4)); __pyx_t_1 = __pyx_t_4; - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_t_4 = 0; } - __pyx_v_scores = __pyx_t_1; + __pyx_v_scores = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; /* "moses/dictree.pyx":256 * cdef list words = [cand.tokens[i].c_str() for i in xrange(cand.tokens.size())] * cdef list scores = [score for score in cand.scores] if converter is None else [converter(score) for score in cand.scores] * return TargetProduction(words, scores, wa) # <<<<<<<<<<<<<< - * + * * def query(self, line, converter = lambda x: log(x), cmp = lambda x, y: fsign(y.scores[2] - x.scores[2]), key = None): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); __pyx_t_1 = PyTuple_New(3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(((PyObject *)__pyx_v_words)); - PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_words)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_words)); - __Pyx_INCREF(((PyObject *)__pyx_v_scores)); - PyTuple_SET_ITEM(__pyx_t_1, 1, ((PyObject *)__pyx_v_scores)); - __Pyx_GIVEREF(((PyObject *)__pyx_v_scores)); + __Pyx_INCREF(__pyx_v_words); + PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_words); + __Pyx_GIVEREF(__pyx_v_words); + __Pyx_INCREF(__pyx_v_scores); + PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_v_scores); + __Pyx_GIVEREF(__pyx_v_scores); __Pyx_INCREF(__pyx_v_wa); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_wa); __Pyx_GIVEREF(__pyx_v_wa); - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_TargetProduction)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_TargetProduction)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 256; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = ((struct __pyx_obj_5moses_7dictree_TargetProduction *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; - __pyx_r = ((struct __pyx_obj_5moses_7dictree_TargetProduction *)Py_None); __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":252 + * and os.path.isfile(stem + ".binphr.tgtvoc") + * + * cdef TargetProduction getTargetProduction(self, cdictree.StringTgtCand& cand, wa = None, converter = None): # <<<<<<<<<<<<<< + * """Converts a StringTgtCandidate (c++ object) and possibly a word-alignment info (string) to a TargetProduction (python object).""" + * cdef list words = [cand.tokens[i].c_str() for i in xrange(cand.tokens.size())] + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); @@ -5965,6 +6639,14 @@ static struct __pyx_obj_5moses_7dictree_TargetProduction *__pyx_f_5moses_7dictre return __pyx_r; } +/* "moses/dictree.pyx":258 + * return TargetProduction(words, scores, wa) + * + * def query(self, line, converter = lambda x: log(x), cmp = lambda x, y: fsign(y.scores[2] - x.scores[2]), key = None): # <<<<<<<<<<<<<< + * """ + * Returns a list of target productions that translate a given source production + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_7query(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5moses_7dictree_20PhraseDictionaryTree_6query[] = "\n Returns a list of target productions that translate a given source production\n :line query (string)\n :converter applies a transformation to the score (function) - defaults to the natural log (since by default binary phrase-tables store probabilities)\n :cmp define it to get a sorted list - defaults to sorting by t(e|f) (since by default binary phrase-tables are not sorted)\n :key defines the key of the comparison - defauls to none\n :return QueryResult\n "; @@ -5973,22 +6655,17 @@ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_7query(PyObject PyObject *__pyx_v_converter = 0; PyObject *__pyx_v_cmp = 0; PyObject *__pyx_v_key = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("query (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__line,&__pyx_n_s__converter,&__pyx_n_s__cmp,&__pyx_n_s__key,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_line,&__pyx_n_s_converter,&__pyx_n_s_cmp,&__pyx_n_s_key,0}; PyObject* values[4] = {0,0,0,0}; - values[1] = __pyx_k_25; - values[2] = __pyx_k_26; - - /* "moses/dictree.pyx":258 - * return TargetProduction(words, scores, wa) - * - * def query(self, line, converter = lambda x: log(x), cmp = lambda x, y: fsign(y.scores[2] - x.scores[2]), key = None): # <<<<<<<<<<<<<< - * """ - * Returns a list of target productions that translate a given source production - */ + values[1] = __pyx_k__10; + values[2] = __pyx_k__11; values[3] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -6004,21 +6681,21 @@ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_7query(PyObject kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_line)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__converter); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_converter); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cmp); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cmp); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key); if (value) { values[3] = value; kw_args--; } } } @@ -6049,177 +6726,22 @@ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_7query(PyObject return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(((struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *)__pyx_v_self), __pyx_v_line, __pyx_v_converter, __pyx_v_cmp, __pyx_v_key); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* Python wrapper */ -static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_5query_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x); /*proto*/ -static PyMethodDef __pyx_mdef_5moses_7dictree_20PhraseDictionaryTree_5query_lambda2 = {__Pyx_NAMESTR("lambda2"), (PyCFunction)__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_5query_lambda2, METH_O, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_5query_lambda2(PyObject *__pyx_self, PyObject *__pyx_v_x) { - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("lambda2 (wrapper)", 0); - __pyx_r = __pyx_lambda_funcdef_lambda2(__pyx_self, ((PyObject *)__pyx_v_x)); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_lambda_funcdef_lambda2(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("lambda2", 0); - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__log); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(__pyx_v_x); - PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_x); - __Pyx_GIVEREF(__pyx_v_x); - __pyx_t_3 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_r = __pyx_t_3; - __pyx_t_3 = 0; - goto __pyx_L0; - - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("moses.dictree.PhraseDictionaryTree.query.lambda2", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -/* Python wrapper */ -static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_5query_1lambda3(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ -static PyMethodDef __pyx_mdef_5moses_7dictree_20PhraseDictionaryTree_5query_1lambda3 = {__Pyx_NAMESTR("lambda3"), (PyCFunction)__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_5query_1lambda3, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(0)}; -static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_5query_1lambda3(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { - PyObject *__pyx_v_x = 0; - PyObject *__pyx_v_y = 0; - PyObject *__pyx_r = 0; - __Pyx_RefNannyDeclarations - __Pyx_RefNannySetupContext("lambda3 (wrapper)", 0); - { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__x,&__pyx_n_s__y,0}; - PyObject* values[2] = {0,0}; - if (unlikely(__pyx_kwds)) { - Py_ssize_t kw_args; - const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); - switch (pos_args) { - case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); - case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - case 0: break; - default: goto __pyx_L5_argtuple_error; - } - kw_args = PyDict_Size(__pyx_kwds); - switch (pos_args) { - case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__x)) != 0)) kw_args--; - else goto __pyx_L5_argtuple_error; - case 1: - if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__y)) != 0)) kw_args--; - else { - __Pyx_RaiseArgtupleInvalid("lambda3", 1, 2, 2, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - } - } - if (unlikely(kw_args > 0)) { - if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "lambda3") < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - } - } else if (PyTuple_GET_SIZE(__pyx_args) != 2) { - goto __pyx_L5_argtuple_error; - } else { - values[0] = PyTuple_GET_ITEM(__pyx_args, 0); - values[1] = PyTuple_GET_ITEM(__pyx_args, 1); - } - __pyx_v_x = values[0]; - __pyx_v_y = values[1]; - } - goto __pyx_L4_argument_unpacking_done; - __pyx_L5_argtuple_error:; - __Pyx_RaiseArgtupleInvalid("lambda3", 1, 2, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L3_error;} - __pyx_L3_error:; - __Pyx_AddTraceback("moses.dictree.PhraseDictionaryTree.query.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename); - __Pyx_RefNannyFinishContext(); - return NULL; - __pyx_L4_argument_unpacking_done:; - __pyx_r = __pyx_lambda_funcdef_lambda3(__pyx_self, __pyx_v_x, __pyx_v_y); - __Pyx_RefNannyFinishContext(); - return __pyx_r; -} - -static PyObject *__pyx_lambda_funcdef_lambda3(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_x, PyObject *__pyx_v_y) { - PyObject *__pyx_r = NULL; - __Pyx_RefNannyDeclarations - PyObject *__pyx_t_1 = NULL; - PyObject *__pyx_t_2 = NULL; - PyObject *__pyx_t_3 = NULL; - float __pyx_t_4; - int __pyx_lineno = 0; - const char *__pyx_filename = NULL; - int __pyx_clineno = 0; - __Pyx_RefNannySetupContext("lambda3", 0); - __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyObject_GetAttr(__pyx_v_y, __pyx_n_s__scores); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_GetItemInt(__pyx_t_1, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_2) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetAttr(__pyx_v_x, __pyx_n_s__scores); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = __Pyx_GetItemInt(__pyx_t_1, 2, sizeof(long), PyInt_FromLong); if (!__pyx_t_3) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Subtract(__pyx_t_2, __pyx_t_3); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_4 = __pyx_PyFloat_AsFloat(__pyx_t_1); if (unlikely((__pyx_t_4 == (float)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyInt_FromLong(__pyx_f_5moses_7dictree_fsign(__pyx_t_4, 0)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_r = __pyx_t_1; - __pyx_t_1 = 0; - goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; - __pyx_L1_error:; - __Pyx_XDECREF(__pyx_t_1); - __Pyx_XDECREF(__pyx_t_2); - __Pyx_XDECREF(__pyx_t_3); - __Pyx_AddTraceback("moses.dictree.PhraseDictionaryTree.query.lambda3", __pyx_clineno, __pyx_lineno, __pyx_filename); - __pyx_r = NULL; - __pyx_L0:; - __Pyx_XGIVEREF(__pyx_r); + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -static PyObject *__pyx_gb_5moses_7dictree_20PhraseDictionaryTree_5query_4generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ +static PyObject *__pyx_gb_5moses_7dictree_20PhraseDictionaryTree_5query_2generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value); /* proto */ /* "moses/dictree.pyx":271 * cdef vector[cdictree.StringTgtCand]* rv = new vector[cdictree.StringTgtCand]() * cdef vector[string]* wa = NULL * cdef Production source = Production(f.c_str() for f in fphrase) # <<<<<<<<<<<<<< * cdef QueryResult results = QueryResult(source) - * + * */ -static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_5query_2genexpr(PyObject *__pyx_self) { +static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_5query_genexpr(PyObject *__pyx_self) { struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr *__pyx_cur_scope; PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -6227,7 +6749,7 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_5query_2genexpr const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); - __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr *)__pyx_ptype_5moses_7dictree___pyx_scope_struct_6_genexpr->tp_new(__pyx_ptype_5moses_7dictree___pyx_scope_struct_6_genexpr, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr *)__pyx_tp_new_5moses_7dictree___pyx_scope_struct_6_genexpr(__pyx_ptype_5moses_7dictree___pyx_scope_struct_6_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -6237,12 +6759,13 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_5query_2genexpr __Pyx_INCREF(((PyObject *)__pyx_cur_scope->__pyx_outer_scope)); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_outer_scope); { - __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5moses_7dictree_20PhraseDictionaryTree_5query_4generator3, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_GeneratorObject *gen = __Pyx_Generator_New((__pyx_generator_body_t) __pyx_gb_5moses_7dictree_20PhraseDictionaryTree_5query_2generator3, (PyObject *) __pyx_cur_scope); if (unlikely(!gen)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_cur_scope); __Pyx_RefNannyFinishContext(); return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -6255,13 +6778,16 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_5query_2genexpr return __pyx_r; } -static PyObject *__pyx_gb_5moses_7dictree_20PhraseDictionaryTree_5query_4generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ +static PyObject *__pyx_gb_5moses_7dictree_20PhraseDictionaryTree_5query_2generator3(__pyx_GeneratorObject *__pyx_generator, PyObject *__pyx_sent_value) /* generator body */ { struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr *__pyx_cur_scope = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr *)__pyx_generator->closure); PyObject *__pyx_r = NULL; std::vector::iterator __pyx_t_1; std::string __pyx_t_2; PyObject *__pyx_t_3 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { @@ -6279,9 +6805,9 @@ static PyObject *__pyx_gb_5moses_7dictree_20PhraseDictionaryTree_5query_4generat __pyx_t_2 = *__pyx_t_1; ++__pyx_t_1; __pyx_cur_scope->__pyx_v_f = __pyx_t_2; - __pyx_t_3 = PyBytes_FromString(__pyx_cur_scope->__pyx_v_f.c_str()); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_3)); - __pyx_r = ((PyObject *)__pyx_t_3); + __pyx_t_3 = __Pyx_PyBytes_FromString(__pyx_cur_scope->__pyx_v_f.c_str()); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); + __pyx_r = __pyx_t_3; __pyx_t_3 = 0; __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __Pyx_XGIVEREF(__pyx_r); @@ -6293,6 +6819,8 @@ static PyObject *__pyx_gb_5moses_7dictree_20PhraseDictionaryTree_5query_4generat __pyx_t_1 = __pyx_cur_scope->__pyx_t_0; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; @@ -6308,7 +6836,7 @@ static PyObject *__pyx_gb_5moses_7dictree_20PhraseDictionaryTree_5query_4generat /* "moses/dictree.pyx":258 * return TargetProduction(words, scores, wa) - * + * * def query(self, line, converter = lambda x: log(x), cmp = lambda x, y: fsign(y.scores[2] - x.scores[2]), key = None): # <<<<<<<<<<<<<< * """ * Returns a list of target productions that translate a given source production @@ -6334,16 +6862,16 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct _ std::vector::iterator __pyx_t_7; struct Moses::StringTgtCand __pyx_t_8; PyObject *__pyx_t_9 = NULL; - PyObject *__pyx_t_10 = NULL; - struct __pyx_opt_args_5moses_7dictree_20PhraseDictionaryTree_getTargetProduction __pyx_t_11; - std::vector *__pyx_t_12; + struct __pyx_opt_args_5moses_7dictree_20PhraseDictionaryTree_getTargetProduction __pyx_t_10; + std::vector *__pyx_t_11; + size_t __pyx_t_12; size_t __pyx_t_13; - size_t __pyx_t_14; + PyObject *__pyx_t_14 = NULL; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("query", 0); - __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_5_query *)__pyx_ptype_5moses_7dictree___pyx_scope_struct_5_query->tp_new(__pyx_ptype_5moses_7dictree___pyx_scope_struct_5_query, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_5_query *)__pyx_tp_new_5moses_7dictree___pyx_scope_struct_5_query(__pyx_ptype_5moses_7dictree___pyx_scope_struct_5_query, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -6357,7 +6885,7 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct _ * cdef vector[string] fphrase = cdictree.Tokenize(text, self.delimiters) * cdef vector[cdictree.StringTgtCand]* rv = new vector[cdictree.StringTgtCand]() */ - __pyx_t_1 = ((PyObject *)__pyx_f_5moses_7dictree_as_str(__pyx_v_line)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_5moses_7dictree_as_str(__pyx_v_line); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 267; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_text = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; @@ -6369,8 +6897,8 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct _ * cdef vector[cdictree.StringTgtCand]* rv = new vector[cdictree.StringTgtCand]() * cdef vector[string]* wa = NULL */ - __pyx_t_2 = __pyx_convert_string_from_py_(((PyObject *)__pyx_v_text)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_v_self->delimiters)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_string_from_py_(__pyx_v_text); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_convert_string_from_py_(__pyx_v_self->delimiters); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 268; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_cur_scope->__pyx_v_fphrase = Moses::Tokenize(__pyx_t_2, __pyx_t_3); /* "moses/dictree.pyx":269 @@ -6380,7 +6908,12 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct _ * cdef vector[string]* wa = NULL * cdef Production source = Production(f.c_str() for f in fphrase) */ - try {__pyx_t_4 = new std::vector();} catch(...) {__Pyx_CppExn2PyErr(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;}} + try { + __pyx_t_4 = new std::vector(); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 269; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } __pyx_v_rv = __pyx_t_4; /* "moses/dictree.pyx":270 @@ -6397,18 +6930,18 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct _ * cdef vector[string]* wa = NULL * cdef Production source = Production(f.c_str() for f in fphrase) # <<<<<<<<<<<<<< * cdef QueryResult results = QueryResult(source) - * + * */ - __pyx_t_1 = __pyx_pf_5moses_7dictree_20PhraseDictionaryTree_5query_2genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_pf_5moses_7dictree_20PhraseDictionaryTree_5query_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_Production)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_Production)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_v_source = ((struct __pyx_obj_5moses_7dictree_Production *)__pyx_t_1); __pyx_t_1 = 0; @@ -6416,7 +6949,7 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct _ * cdef vector[string]* wa = NULL * cdef Production source = Production(f.c_str() for f in fphrase) * cdef QueryResult results = QueryResult(source) # <<<<<<<<<<<<<< - * + * * if not self.wa: */ __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -6424,24 +6957,24 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct _ __Pyx_INCREF(((PyObject *)__pyx_v_source)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_source)); __Pyx_GIVEREF(((PyObject *)__pyx_v_source)); - __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_QueryResult)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_QueryResult)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 272; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_results = ((struct __pyx_obj_5moses_7dictree_QueryResult *)__pyx_t_5); __pyx_t_5 = 0; /* "moses/dictree.pyx":274 * cdef QueryResult results = QueryResult(source) - * + * * if not self.wa: # <<<<<<<<<<<<<< * self.tree.GetTargetCandidates(fphrase, rv[0]) * results.extend([self.getTargetProduction(candidate, None, converter) for candidate in rv[0]]) */ - __pyx_t_6 = (!__pyx_v_self->wa); + __pyx_t_6 = ((!(__pyx_v_self->wa != 0)) != 0); if (__pyx_t_6) { /* "moses/dictree.pyx":275 - * + * * if not self.wa: * self.tree.GetTargetCandidates(fphrase, rv[0]) # <<<<<<<<<<<<<< * results.extend([self.getTargetProduction(candidate, None, converter) for candidate in rv[0]]) @@ -6456,7 +6989,7 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct _ * else: * wa = new vector[string]() */ - __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_results), __pyx_n_s__extend); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_results), __pyx_n_s_extend); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); @@ -6467,27 +7000,23 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct _ __pyx_t_8 = *__pyx_t_7; ++__pyx_t_7; __pyx_v_candidate = __pyx_t_8; - __pyx_t_9 = Py_None; - __Pyx_INCREF(__pyx_t_9); - __pyx_t_11.__pyx_n = 2; - __pyx_t_11.wa = __pyx_t_9; - __pyx_t_11.converter = __pyx_v_converter; - __pyx_t_10 = ((PyObject *)((struct __pyx_vtabstruct_5moses_7dictree_PhraseDictionaryTree *)__pyx_v_self->__pyx_vtab)->getTargetProduction(__pyx_v_self, __pyx_v_candidate, &__pyx_t_11)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_10); + __pyx_t_10.__pyx_n = 2; + __pyx_t_10.wa = Py_None; + __pyx_t_10.converter = __pyx_v_converter; + __pyx_t_9 = ((PyObject *)((struct __pyx_vtabstruct_5moses_7dictree_PhraseDictionaryTree *)__pyx_v_self->__pyx_vtab)->getTargetProduction(__pyx_v_self, __pyx_v_candidate, &__pyx_t_10)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_10))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; } - __pyx_t_10 = PyTuple_New(1); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_10); - __Pyx_INCREF(((PyObject *)__pyx_t_1)); - PyTuple_SET_ITEM(__pyx_t_10, 0, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_10), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + PyTuple_SET_ITEM(__pyx_t_9, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); + __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_9, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 276; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L3; } @@ -6500,8 +7029,13 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct _ * self.tree.GetTargetCandidates(fphrase, rv[0], wa[0]) * results.extend([self.getTargetProduction(rv[0][i], wa[0][i].c_str(), converter) for i in range(rv.size())]) */ - try {__pyx_t_12 = new std::vector();} catch(...) {__Pyx_CppExn2PyErr(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;}} - __pyx_v_wa = __pyx_t_12; + try { + __pyx_t_11 = new std::vector(); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 278; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_v_wa = __pyx_t_11; /* "moses/dictree.pyx":279 * else: @@ -6519,35 +7053,34 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct _ * del wa * del rv */ - __pyx_t_1 = PyObject_GetAttr(((PyObject *)__pyx_v_results), __pyx_n_s__extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_results), __pyx_n_s_extend); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = PyList_New(0); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_13 = __pyx_v_rv->size(); - for (__pyx_t_14 = 0; __pyx_t_14 < __pyx_t_13; __pyx_t_14+=1) { - __pyx_v_i = __pyx_t_14; - __pyx_t_5 = PyBytes_FromString(((__pyx_v_wa[0])[__pyx_v_i]).c_str()); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); - __pyx_t_11.__pyx_n = 2; - __pyx_t_11.wa = ((PyObject *)__pyx_t_5); - __pyx_t_11.converter = __pyx_v_converter; - __pyx_t_9 = ((PyObject *)((struct __pyx_vtabstruct_5moses_7dictree_PhraseDictionaryTree *)__pyx_v_self->__pyx_vtab)->getTargetProduction(__pyx_v_self, ((__pyx_v_rv[0])[__pyx_v_i]), &__pyx_t_11)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_9); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - if (unlikely(__Pyx_PyList_Append(__pyx_t_10, (PyObject*)__pyx_t_9))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; - } - __pyx_t_9 = PyTuple_New(1); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = PyList_New(0); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_12 = __pyx_v_rv->size(); + for (__pyx_t_13 = 0; __pyx_t_13 < __pyx_t_12; __pyx_t_13+=1) { + __pyx_v_i = __pyx_t_13; + __pyx_t_5 = __Pyx_PyBytes_FromString(((__pyx_v_wa[0])[__pyx_v_i]).c_str()); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); + __pyx_t_10.__pyx_n = 2; + __pyx_t_10.wa = __pyx_t_5; + __pyx_t_10.converter = __pyx_v_converter; + __pyx_t_14 = ((PyObject *)((struct __pyx_vtabstruct_5moses_7dictree_PhraseDictionaryTree *)__pyx_v_self->__pyx_vtab)->getTargetProduction(__pyx_v_self, ((__pyx_v_rv[0])[__pyx_v_i]), &__pyx_t_10)); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_14); + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + if (unlikely(__Pyx_ListComp_Append(__pyx_t_9, (PyObject*)__pyx_t_14))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + } + __pyx_t_14 = PyTuple_New(1); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_14); + PyTuple_SET_ITEM(__pyx_t_14, 0, __pyx_t_9); + __Pyx_GIVEREF(__pyx_t_9); + __pyx_t_9 = 0; + __pyx_t_9 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_14, NULL); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); - __Pyx_INCREF(((PyObject *)__pyx_t_10)); - PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_t_10)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_10)); - __Pyx_DECREF(((PyObject *)__pyx_t_10)); __pyx_t_10 = 0; - __pyx_t_10 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_10); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; /* "moses/dictree.pyx":281 * self.tree.GetTargetCandidates(fphrase, rv[0], wa[0]) @@ -6586,16 +7119,16 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct _ * if self.tableLimit > 0: * return QueryResult(source, results[0:self.tableLimit]) */ - __pyx_t_10 = PyObject_GetAttr(((PyObject *)__pyx_v_results), __pyx_n_s__sort); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_9 = PyDict_New(); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_9)); - if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__cmp), __pyx_v_cmp) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_9, ((PyObject *)__pyx_n_s__key), __pyx_v_key) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_1 = PyObject_Call(__pyx_t_10, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_9)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_9 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_results), __pyx_n_s_sort); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_9); + __pyx_t_14 = PyDict_New(); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_14); + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_cmp, __pyx_v_cmp) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_14, __pyx_n_s_key, __pyx_v_key) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_9, __pyx_empty_tuple, __pyx_t_14); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 284; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; goto __pyx_L8; } @@ -6608,7 +7141,7 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct _ * return QueryResult(source, results[0:self.tableLimit]) * else: */ - __pyx_t_6 = (__pyx_v_self->tableLimit > 0); + __pyx_t_6 = ((__pyx_v_self->tableLimit > 0) != 0); if (__pyx_t_6) { /* "moses/dictree.pyx":286 @@ -6619,23 +7152,22 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct _ * return results */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_results), 0, __pyx_v_self->tableLimit); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetSlice(((PyObject *)__pyx_v_results), 0, __pyx_v_self->tableLimit, NULL, NULL, NULL, 1, 1, 1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_9 = PyTuple_New(2); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_9); + __pyx_t_14 = PyTuple_New(2); if (unlikely(!__pyx_t_14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_14); __Pyx_INCREF(((PyObject *)__pyx_v_source)); - PyTuple_SET_ITEM(__pyx_t_9, 0, ((PyObject *)__pyx_v_source)); + PyTuple_SET_ITEM(__pyx_t_14, 0, ((PyObject *)__pyx_v_source)); __Pyx_GIVEREF(((PyObject *)__pyx_v_source)); - PyTuple_SET_ITEM(__pyx_t_9, 1, __pyx_t_1); + PyTuple_SET_ITEM(__pyx_t_14, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_QueryResult)), ((PyObject *)__pyx_t_9), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_QueryResult)), __pyx_t_14, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 286; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_9)); __pyx_t_9 = 0; + __Pyx_DECREF(__pyx_t_14); __pyx_t_14 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - goto __pyx_L9; } /*else*/ { @@ -6643,7 +7175,7 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct _ * return QueryResult(source, results[0:self.tableLimit]) * else: * return results # <<<<<<<<<<<<<< - * + * * cdef class OnDiskWrapper(DictionaryTree): */ __Pyx_XDECREF(__pyx_r); @@ -6651,15 +7183,21 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct _ __pyx_r = ((PyObject *)__pyx_v_results); goto __pyx_L0; } - __pyx_L9:; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":258 + * return TargetProduction(words, scores, wa) + * + * def query(self, line, converter = lambda x: log(x), cmp = lambda x, y: fsign(y.scores[2] - x.scores[2]), key = None): # <<<<<<<<<<<<<< + * """ + * Returns a list of target productions that translate a given source production + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_9); - __Pyx_XDECREF(__pyx_t_10); + __Pyx_XDECREF(__pyx_t_14); __Pyx_AddTraceback("moses.dictree.PhraseDictionaryTree.query", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -6672,6 +7210,14 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_6query(struct _ return __pyx_r; } +/* "moses/dictree.pyx":207 + * + * cdef cdictree.PhraseDictionaryTree* tree + * cdef readonly bytes path # <<<<<<<<<<<<<< + * cdef readonly unsigned nscores + * cdef readonly bint wa + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_4path_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_4path_1__get__(PyObject *__pyx_v_self) { @@ -6679,34 +7225,36 @@ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_4path_1__get__( __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4path___get__(((struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":207 - * - * cdef cdictree.PhraseDictionaryTree* tree - * cdef readonly bytes path # <<<<<<<<<<<<<< - * cdef readonly unsigned nscores - * cdef readonly bint wa - */ - static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_4path___get__(struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_self->path)); - __pyx_r = ((PyObject *)__pyx_v_self->path); + __Pyx_INCREF(__pyx_v_self->path); + __pyx_r = __pyx_v_self->path; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "moses/dictree.pyx":208 + * cdef cdictree.PhraseDictionaryTree* tree + * cdef readonly bytes path + * cdef readonly unsigned nscores # <<<<<<<<<<<<<< + * cdef readonly bint wa + * cdef readonly bytes delimiters + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_7nscores_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_7nscores_1__get__(PyObject *__pyx_v_self) { @@ -6714,18 +7262,12 @@ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_7nscores_1__get __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_20PhraseDictionaryTree_7nscores___get__(((struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":208 - * cdef cdictree.PhraseDictionaryTree* tree - * cdef readonly bytes path - * cdef readonly unsigned nscores # <<<<<<<<<<<<<< - * cdef readonly bint wa - * cdef readonly bytes delimiters - */ - static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_7nscores___get__(struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -6735,14 +7277,13 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_7nscores___get_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_self->nscores); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->nscores); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 208; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("moses.dictree.PhraseDictionaryTree.nscores.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -6753,6 +7294,14 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_7nscores___get_ return __pyx_r; } +/* "moses/dictree.pyx":209 + * cdef readonly bytes path + * cdef readonly unsigned nscores + * cdef readonly bint wa # <<<<<<<<<<<<<< + * cdef readonly bytes delimiters + * cdef readonly unsigned tableLimit + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_2wa_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_2wa_1__get__(PyObject *__pyx_v_self) { @@ -6760,18 +7309,12 @@ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_2wa_1__get__(Py __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_20PhraseDictionaryTree_2wa___get__(((struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":209 - * cdef readonly bytes path - * cdef readonly unsigned nscores - * cdef readonly bint wa # <<<<<<<<<<<<<< - * cdef readonly bytes delimiters - * cdef readonly unsigned tableLimit - */ - static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_2wa___get__(struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -6787,8 +7330,7 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_2wa___get__(str __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("moses.dictree.PhraseDictionaryTree.wa.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -6799,6 +7341,14 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_2wa___get__(str return __pyx_r; } +/* "moses/dictree.pyx":210 + * cdef readonly unsigned nscores + * cdef readonly bint wa + * cdef readonly bytes delimiters # <<<<<<<<<<<<<< + * cdef readonly unsigned tableLimit + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_10delimiters_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_10delimiters_1__get__(PyObject *__pyx_v_self) { @@ -6806,34 +7356,36 @@ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_10delimiters_1_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_20PhraseDictionaryTree_10delimiters___get__(((struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":210 - * cdef readonly unsigned nscores - * cdef readonly bint wa - * cdef readonly bytes delimiters # <<<<<<<<<<<<<< - * cdef readonly unsigned tableLimit - * - */ - static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_10delimiters___get__(struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_self->delimiters)); - __pyx_r = ((PyObject *)__pyx_v_self->delimiters); + __Pyx_INCREF(__pyx_v_self->delimiters); + __pyx_r = __pyx_v_self->delimiters; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "moses/dictree.pyx":211 + * cdef readonly bint wa + * cdef readonly bytes delimiters + * cdef readonly unsigned tableLimit # <<<<<<<<<<<<<< + * + * def __cinit__(self, bytes path, unsigned tableLimit = 20, unsigned nscores = 5, bint wa = False, delimiters = ' \t'): + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_10tableLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_10tableLimit_1__get__(PyObject *__pyx_v_self) { @@ -6841,18 +7393,12 @@ static PyObject *__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_10tableLimit_1_ __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_20PhraseDictionaryTree_10tableLimit___get__(((struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":211 - * cdef readonly bint wa - * cdef readonly bytes delimiters - * cdef readonly unsigned tableLimit # <<<<<<<<<<<<<< - * - * def __cinit__(self, bytes path, unsigned tableLimit = 20, unsigned nscores = 5, bint wa = False, delimiters = ' \t'): - */ - static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_10tableLimit___get__(struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -6862,14 +7408,13 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_10tableLimit___ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_self->tableLimit); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->tableLimit); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 211; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("moses.dictree.PhraseDictionaryTree.tableLimit.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -6880,19 +7425,30 @@ static PyObject *__pyx_pf_5moses_7dictree_20PhraseDictionaryTree_10tableLimit___ return __pyx_r; } +/* "moses/dictree.pyx":297 + * cdef readonly unsigned tableLimit + * + * def __cinit__(self, bytes path, unsigned tableLimit = 20, delimiters = ' \t'): # <<<<<<<<<<<<<< + * self.delimiters = delimiters + * self.tableLimit = tableLimit + */ + /* Python wrapper */ static int __pyx_pw_5moses_7dictree_13OnDiskWrapper_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static int __pyx_pw_5moses_7dictree_13OnDiskWrapper_1__cinit__(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_path = 0; unsigned int __pyx_v_tableLimit; PyObject *__pyx_v_delimiters = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; int __pyx_r; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__cinit__ (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__path,&__pyx_n_s__tableLimit,&__pyx_n_s__delimiters,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_tableLimit,&__pyx_n_s_delimiters,0}; PyObject* values[3] = {0,0,0}; - values[2] = ((PyObject *)__pyx_kp_s_16); + values[2] = ((PyObject *)__pyx_kp_s__9); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); @@ -6906,16 +7462,16 @@ static int __pyx_pw_5moses_7dictree_13OnDiskWrapper_1__cinit__(PyObject *__pyx_v kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__tableLimit); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_tableLimit); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__delimiters); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_delimiters); if (value) { values[2] = value; kw_args--; } } } @@ -6933,7 +7489,7 @@ static int __pyx_pw_5moses_7dictree_13OnDiskWrapper_1__cinit__(PyObject *__pyx_v } __pyx_v_path = ((PyObject*)values[0]); if (values[1]) { - __pyx_v_tableLimit = __Pyx_PyInt_AsUnsignedInt(values[1]); if (unlikely((__pyx_v_tableLimit == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} + __pyx_v_tableLimit = __Pyx_PyInt_As_unsigned_int(values[1]); if (unlikely((__pyx_v_tableLimit == (unsigned int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { __pyx_v_tableLimit = ((unsigned int)20); } @@ -6949,6 +7505,8 @@ static int __pyx_pw_5moses_7dictree_13OnDiskWrapper_1__cinit__(PyObject *__pyx_v __pyx_L4_argument_unpacking_done:; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_path), (&PyBytes_Type), 1, "path", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 297; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_r = __pyx_pf_5moses_7dictree_13OnDiskWrapper___cinit__(((struct __pyx_obj_5moses_7dictree_OnDiskWrapper *)__pyx_v_self), __pyx_v_path, __pyx_v_tableLimit, __pyx_v_delimiters); + + /* function exit code */ goto __pyx_L0; __pyx_L1_error:; __pyx_r = -1; @@ -6957,37 +7515,32 @@ static int __pyx_pw_5moses_7dictree_13OnDiskWrapper_1__cinit__(PyObject *__pyx_v return __pyx_r; } -/* "moses/dictree.pyx":297 - * cdef readonly unsigned tableLimit - * - * def __cinit__(self, bytes path, unsigned tableLimit = 20, delimiters = ' \t'): # <<<<<<<<<<<<<< - * self.delimiters = delimiters - * self.tableLimit = tableLimit - */ - static int __pyx_pf_5moses_7dictree_13OnDiskWrapper___cinit__(struct __pyx_obj_5moses_7dictree_OnDiskWrapper *__pyx_v_self, PyObject *__pyx_v_path, unsigned int __pyx_v_tableLimit, PyObject *__pyx_v_delimiters) { int __pyx_r; __Pyx_RefNannyDeclarations - char *__pyx_t_1; - std::string __pyx_t_2; + PyObject *__pyx_t_1 = NULL; + char *__pyx_t_2; + std::string __pyx_t_3; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__cinit__", 0); /* "moses/dictree.pyx":298 - * + * * def __cinit__(self, bytes path, unsigned tableLimit = 20, delimiters = ' \t'): * self.delimiters = delimiters # <<<<<<<<<<<<<< * self.tableLimit = tableLimit * self.wrapper = new condiskpt.OnDiskWrapper() */ - if (!(likely(PyBytes_CheckExact(__pyx_v_delimiters))||((__pyx_v_delimiters) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected bytes, got %.200s", Py_TYPE(__pyx_v_delimiters)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_INCREF(__pyx_v_delimiters); - __Pyx_GIVEREF(__pyx_v_delimiters); + if (!(likely(PyBytes_CheckExact(__pyx_v_delimiters))||((__pyx_v_delimiters) == Py_None)||(PyErr_Format(PyExc_TypeError, "Expected %.16s, got %.200s", "bytes", Py_TYPE(__pyx_v_delimiters)->tp_name), 0))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 298; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_v_delimiters; + __Pyx_INCREF(__pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); __Pyx_GOTREF(__pyx_v_self->delimiters); - __Pyx_DECREF(((PyObject *)__pyx_v_self->delimiters)); - __pyx_v_self->delimiters = ((PyObject*)__pyx_v_delimiters); + __Pyx_DECREF(__pyx_v_self->delimiters); + __pyx_v_self->delimiters = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; /* "moses/dictree.pyx":299 * def __cinit__(self, bytes path, unsigned tableLimit = 20, delimiters = ' \t'): @@ -7012,24 +7565,39 @@ static int __pyx_pf_5moses_7dictree_13OnDiskWrapper___cinit__(struct __pyx_obj_5 * self.wrapper = new condiskpt.OnDiskWrapper() * self.wrapper.BeginLoad(string(path)) # <<<<<<<<<<<<<< * self.finder = new condiskpt.OnDiskQuery(self.wrapper[0]) - * + * */ - __pyx_t_1 = PyBytes_AsString(((PyObject *)__pyx_v_path)); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - try {__pyx_t_2 = std::string(__pyx_t_1);} catch(...) {__Pyx_CppExn2PyErr(); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;}} - __pyx_v_self->wrapper->BeginLoad(__pyx_t_2); + __pyx_t_2 = __Pyx_PyObject_AsString(__pyx_v_path); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + try { + __pyx_t_3 = std::string(__pyx_t_2); + } catch(...) { + __Pyx_CppExn2PyErr(); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 301; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } + __pyx_v_self->wrapper->BeginLoad(__pyx_t_3); /* "moses/dictree.pyx":302 * self.wrapper = new condiskpt.OnDiskWrapper() * self.wrapper.BeginLoad(string(path)) * self.finder = new condiskpt.OnDiskQuery(self.wrapper[0]) # <<<<<<<<<<<<<< - * + * * @classmethod */ __pyx_v_self->finder = new OnDiskPt::OnDiskQuery((__pyx_v_self->wrapper[0])); + /* "moses/dictree.pyx":297 + * cdef readonly unsigned tableLimit + * + * def __cinit__(self, bytes path, unsigned tableLimit = 20, delimiters = ' \t'): # <<<<<<<<<<<<<< + * self.delimiters = delimiters + * self.tableLimit = tableLimit + */ + + /* function exit code */ __pyx_r = 0; goto __pyx_L0; __pyx_L1_error:; + __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("moses.dictree.OnDiskWrapper.__cinit__", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = -1; __pyx_L0:; @@ -7037,16 +7605,27 @@ static int __pyx_pf_5moses_7dictree_13OnDiskWrapper___cinit__(struct __pyx_obj_5 return __pyx_r; } +/* "moses/dictree.pyx":305 + * + * @classmethod + * def canLoad(cls, stem, bint wa = False): # <<<<<<<<<<<<<< + * return os.path.isfile(stem + "/Misc.dat") \ + * and os.path.isfile(stem + "/Source.dat") \ + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_13OnDiskWrapper_3canLoad(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_13OnDiskWrapper_3canLoad(PyObject *__pyx_v_cls, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_stem = 0; CYTHON_UNUSED int __pyx_v_wa; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("canLoad (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__stem,&__pyx_n_s__wa,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_stem,&__pyx_n_s_wa,0}; PyObject* values[2] = {0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -7060,11 +7639,11 @@ static PyObject *__pyx_pw_5moses_7dictree_13OnDiskWrapper_3canLoad(PyObject *__p kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stem)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_stem)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__wa); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_wa); if (value) { values[1] = value; kw_args--; } } } @@ -7083,14 +7662,6 @@ static PyObject *__pyx_pw_5moses_7dictree_13OnDiskWrapper_3canLoad(PyObject *__p if (values[1]) { __pyx_v_wa = __Pyx_PyObject_IsTrue(values[1]); if (unlikely((__pyx_v_wa == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } else { - - /* "moses/dictree.pyx":305 - * - * @classmethod - * def canLoad(cls, stem, bint wa = False): # <<<<<<<<<<<<<< - * return os.path.isfile(stem + "/Misc.dat") \ - * and os.path.isfile(stem + "/Source.dat") \ - */ __pyx_v_wa = ((int)0); } } @@ -7103,6 +7674,8 @@ static PyObject *__pyx_pw_5moses_7dictree_13OnDiskWrapper_3canLoad(PyObject *__p return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_5moses_7dictree_13OnDiskWrapper_2canLoad(((PyObject*)__pyx_v_cls), __pyx_v_stem, __pyx_v_wa); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -7139,14 +7712,8 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_2canLoad(CYTHON_UNUSED * and os.path.isfile(stem + "/TargetColl.dat") \ * and os.path.isfile(stem + "/TargetInd.dat") \ */ - __pyx_t_1 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__isfile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "moses/dictree.pyx":306 * @classmethod @@ -7155,17 +7722,23 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_2canLoad(CYTHON_UNUSED * and os.path.isfile(stem + "/Source.dat") \ * and os.path.isfile(stem + "/TargetColl.dat") \ */ - __pyx_t_2 = PyNumber_Add(__pyx_v_stem, ((PyObject *)__pyx_kp_s_27)); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_path); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_2); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_2, __pyx_n_s_isfile); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = PyNumber_Add(__pyx_v_stem, __pyx_kp_s_Misc_dat); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_2); __Pyx_GIVEREF(__pyx_t_2); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 306; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_4) { __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -7177,25 +7750,25 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_2canLoad(CYTHON_UNUSED * and os.path.isfile(stem + "/TargetColl.dat") \ * and os.path.isfile(stem + "/TargetInd.dat") \ */ - __pyx_t_3 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__isfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_1, __pyx_n_s_isfile); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyNumber_Add(__pyx_v_stem, ((PyObject *)__pyx_kp_s_28)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyNumber_Add(__pyx_v_stem, __pyx_kp_s_Source_dat); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 307; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_4) { __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; @@ -7207,25 +7780,25 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_2canLoad(CYTHON_UNUSED * and os.path.isfile(stem + "/TargetInd.dat") \ * and os.path.isfile(stem + "/Vocab.dat") */ - __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_3 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__path); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_path); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_GetAttr(__pyx_t_3, __pyx_n_s__isfile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_3, __pyx_n_s_isfile); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyNumber_Add(__pyx_v_stem, ((PyObject *)__pyx_kp_s_29)); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyNumber_Add(__pyx_v_stem, __pyx_kp_s_TargetColl_dat); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_6 = PyTuple_New(1); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); PyTuple_SET_ITEM(__pyx_t_6, 0, __pyx_t_3); __Pyx_GIVEREF(__pyx_t_3); __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_t_6), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_5, __pyx_t_6, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 308; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_6)); __pyx_t_6 = 0; + __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_4) { __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; @@ -7235,27 +7808,27 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_2canLoad(CYTHON_UNUSED * and os.path.isfile(stem + "/TargetColl.dat") \ * and os.path.isfile(stem + "/TargetInd.dat") \ # <<<<<<<<<<<<<< * and os.path.isfile(stem + "/Vocab.dat") - * + * */ - __pyx_t_6 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); - __pyx_t_5 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_path); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__isfile); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_5, __pyx_n_s_isfile); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyNumber_Add(__pyx_v_stem, ((PyObject *)__pyx_kp_s_30)); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = PyNumber_Add(__pyx_v_stem, __pyx_kp_s_TargetInd_dat); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; - __pyx_t_5 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(__pyx_t_6, __pyx_t_7, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 309; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; + __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__pyx_t_4) { __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; @@ -7264,28 +7837,28 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_2canLoad(CYTHON_UNUSED * and os.path.isfile(stem + "/TargetColl.dat") \ * and os.path.isfile(stem + "/TargetInd.dat") \ * and os.path.isfile(stem + "/Vocab.dat") # <<<<<<<<<<<<<< - * + * * cdef Production getSourceProduction(self, vector[string] ftokens): */ - __pyx_t_7 = __Pyx_GetName(__pyx_m, __pyx_n_s__os); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_GetModuleGlobalName(__pyx_n_s_os); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); - __pyx_t_6 = PyObject_GetAttr(__pyx_t_7, __pyx_n_s__path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_GetAttrStr(__pyx_t_7, __pyx_n_s_path); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __pyx_t_7 = PyObject_GetAttr(__pyx_t_6, __pyx_n_s__isfile); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_7 = __Pyx_PyObject_GetAttrStr(__pyx_t_6, __pyx_n_s_isfile); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyNumber_Add(__pyx_v_stem, ((PyObject *)__pyx_kp_s_31)); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = PyNumber_Add(__pyx_v_stem, __pyx_kp_s_Vocab_dat); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __pyx_t_8 = PyTuple_New(1); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); PyTuple_SET_ITEM(__pyx_t_8, 0, __pyx_t_6); __Pyx_GIVEREF(__pyx_t_6); __pyx_t_6 = 0; - __pyx_t_6 = PyObject_Call(__pyx_t_7, ((PyObject *)__pyx_t_8), NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_6 = __Pyx_PyObject_Call(__pyx_t_7, __pyx_t_8, NULL); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 310; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_8)); __pyx_t_8 = 0; + __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; __pyx_t_8 = __pyx_t_6; __pyx_t_6 = 0; } else { @@ -7314,8 +7887,15 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_2canLoad(CYTHON_UNUSED __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":305 + * + * @classmethod + * def canLoad(cls, stem, bint wa = False): # <<<<<<<<<<<<<< + * return os.path.isfile(stem + "/Misc.dat") \ + * and os.path.isfile(stem + "/Source.dat") \ + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -7334,7 +7914,7 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_2canLoad(CYTHON_UNUSED /* "moses/dictree.pyx":312 * and os.path.isfile(stem + "/Vocab.dat") - * + * * cdef Production getSourceProduction(self, vector[string] ftokens): # <<<<<<<<<<<<<< * cdef list tokens = [f.c_str() for f in ftokens] * return Production(tokens[:-1], tokens[-1]) @@ -7356,11 +7936,11 @@ static struct __pyx_obj_5moses_7dictree_Production *__pyx_f_5moses_7dictree_13On __Pyx_RefNannySetupContext("getSourceProduction", 0); /* "moses/dictree.pyx":313 - * + * * cdef Production getSourceProduction(self, vector[string] ftokens): * cdef list tokens = [f.c_str() for f in ftokens] # <<<<<<<<<<<<<< * return Production(tokens[:-1], tokens[-1]) - * + * */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); @@ -7370,44 +7950,50 @@ static struct __pyx_obj_5moses_7dictree_Production *__pyx_f_5moses_7dictree_13On __pyx_t_3 = *__pyx_t_2; ++__pyx_t_2; __pyx_v_f = __pyx_t_3; - __pyx_t_4 = PyBytes_FromString(__pyx_v_f.c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_4)); - if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; + __pyx_t_4 = __Pyx_PyBytes_FromString(__pyx_v_f.c_str()); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 313; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __Pyx_INCREF(((PyObject *)__pyx_t_1)); - __pyx_v_tokens = __pyx_t_1; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_v_tokens = ((PyObject*)__pyx_t_1); + __pyx_t_1 = 0; /* "moses/dictree.pyx":314 * cdef Production getSourceProduction(self, vector[string] ftokens): * cdef list tokens = [f.c_str() for f in ftokens] * return Production(tokens[:-1], tokens[-1]) # <<<<<<<<<<<<<< - * + * * def query(self, line, converter = None, cmp = None, key = None): */ __Pyx_XDECREF(((PyObject *)__pyx_r)); - __pyx_t_1 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_tokens), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __pyx_t_4 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_tokens), -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_4) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyList_GetSlice(__pyx_v_tokens, 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_4 = __Pyx_GetItemInt_List(__pyx_v_tokens, -1, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(__pyx_t_4 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_4); __pyx_t_5 = PyTuple_New(2); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_1)); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_1); + __Pyx_GIVEREF(__pyx_t_1); PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_4); __Pyx_GIVEREF(__pyx_t_4); __pyx_t_1 = 0; __pyx_t_4 = 0; - __pyx_t_4 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_Production)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_Production)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 314; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_r = ((struct __pyx_obj_5moses_7dictree_Production *)__pyx_t_4); __pyx_t_4 = 0; goto __pyx_L0; - __pyx_r = ((struct __pyx_obj_5moses_7dictree_Production *)Py_None); __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":312 + * and os.path.isfile(stem + "/Vocab.dat") + * + * cdef Production getSourceProduction(self, vector[string] ftokens): # <<<<<<<<<<<<<< + * cdef list tokens = [f.c_str() for f in ftokens] + * return Production(tokens[:-1], tokens[-1]) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); @@ -7421,6 +8007,14 @@ static struct __pyx_obj_5moses_7dictree_Production *__pyx_f_5moses_7dictree_13On return __pyx_r; } +/* "moses/dictree.pyx":316 + * return Production(tokens[:-1], tokens[-1]) + * + * def query(self, line, converter = None, cmp = None, key = None): # <<<<<<<<<<<<<< + * """ + * Returns a list of target productions that translate a given source production + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_13OnDiskWrapper_5query(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5moses_7dictree_13OnDiskWrapper_4query[] = "\n Returns a list of target productions that translate a given source production\n :line query (string)\n :converter applies a transformation to the score (function) - defaults to None (since by default OnDiskWrapper store the ln(prob))\n :cmp define it to get a sorted list - defaults to None (since by default OnDiskWrapper is already sorted)\n :key defines the key of the comparison - defauls to none\n :return QueryResult\n "; @@ -7429,20 +8023,15 @@ static PyObject *__pyx_pw_5moses_7dictree_13OnDiskWrapper_5query(PyObject *__pyx PyObject *__pyx_v_converter = 0; PyObject *__pyx_v_cmp = 0; PyObject *__pyx_v_key = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("query (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__line,&__pyx_n_s__converter,&__pyx_n_s__cmp,&__pyx_n_s__key,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_line,&__pyx_n_s_converter,&__pyx_n_s_cmp,&__pyx_n_s_key,0}; PyObject* values[4] = {0,0,0,0}; - - /* "moses/dictree.pyx":316 - * return Production(tokens[:-1], tokens[-1]) - * - * def query(self, line, converter = None, cmp = None, key = None): # <<<<<<<<<<<<<< - * """ - * Returns a list of target productions that translate a given source production - */ values[1] = ((PyObject *)Py_None); values[2] = ((PyObject *)Py_None); values[3] = ((PyObject *)Py_None); @@ -7460,21 +8049,21 @@ static PyObject *__pyx_pw_5moses_7dictree_13OnDiskWrapper_5query(PyObject *__pyx kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__line)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_line)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__converter); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_converter); if (value) { values[1] = value; kw_args--; } } case 2: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__cmp); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_cmp); if (value) { values[2] = value; kw_args--; } } case 3: if (kw_args > 0) { - PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__key); + PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s_key); if (value) { values[3] = value; kw_args--; } } } @@ -7505,6 +8094,8 @@ static PyObject *__pyx_pw_5moses_7dictree_13OnDiskWrapper_5query(PyObject *__pyx return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_5moses_7dictree_13OnDiskWrapper_4query(((struct __pyx_obj_5moses_7dictree_OnDiskWrapper *)__pyx_v_self), __pyx_v_line, __pyx_v_converter, __pyx_v_cmp, __pyx_v_key); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } @@ -7526,7 +8117,7 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_5query_genexpr(PyObjec const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("genexpr", 0); - __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr *)__pyx_ptype_5moses_7dictree___pyx_scope_struct_8_genexpr->tp_new(__pyx_ptype_5moses_7dictree___pyx_scope_struct_8_genexpr, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr *)__pyx_tp_new_5moses_7dictree___pyx_scope_struct_8_genexpr(__pyx_ptype_5moses_7dictree___pyx_scope_struct_8_genexpr, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -7542,6 +8133,7 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_5query_genexpr(PyObjec return (PyObject *) gen; } + /* function exit code */ __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; @@ -7560,9 +8152,11 @@ static PyObject *__pyx_gb_5moses_7dictree_13OnDiskWrapper_5query_2generator4(__p PyObject *__pyx_r = NULL; PyObject *__pyx_t_1 = NULL; Py_ssize_t __pyx_t_2; - PyObject *(*__pyx_t_3)(PyObject *); + PyObject *__pyx_t_3 = NULL; PyObject *__pyx_t_4 = NULL; - PyObject *__pyx_t_5 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("None", 0); switch (__pyx_generator->resume_label) { @@ -7575,60 +8169,36 @@ static PyObject *__pyx_gb_5moses_7dictree_13OnDiskWrapper_5query_2generator4(__p __pyx_L3_first_run:; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_scores)) { __Pyx_RaiseClosureNameError("scores"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - if (PyList_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_scores) || PyTuple_CheckExact(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_scores)) { - __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_scores; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; - __pyx_t_3 = NULL; - } else { - __pyx_t_2 = -1; __pyx_t_1 = PyObject_GetIter(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_scores); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_t_3 = Py_TYPE(__pyx_t_1)->tp_iternext; + if (unlikely(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_scores == Py_None)) { + PyErr_SetString(PyExc_TypeError, "'NoneType' object is not iterable"); + {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } + __pyx_t_1 = __pyx_cur_scope->__pyx_outer_scope->__pyx_v_scores; __Pyx_INCREF(__pyx_t_1); __pyx_t_2 = 0; for (;;) { - if (!__pyx_t_3 && PyList_CheckExact(__pyx_t_1)) { - if (__pyx_t_2 >= PyList_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyList_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - } else if (!__pyx_t_3 && PyTuple_CheckExact(__pyx_t_1)) { - if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; - #if CYTHON_COMPILING_IN_CPYTHON - __pyx_t_4 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_4); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #else - __pyx_t_4 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - #endif - } else { - __pyx_t_4 = __pyx_t_3(__pyx_t_1); - if (unlikely(!__pyx_t_4)) { - if (PyErr_Occurred()) { - if (likely(PyErr_ExceptionMatches(PyExc_StopIteration))) PyErr_Clear(); - else {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } - break; - } - __Pyx_GOTREF(__pyx_t_4); - } + if (__pyx_t_2 >= PyTuple_GET_SIZE(__pyx_t_1)) break; + #if CYTHON_COMPILING_IN_CPYTHON + __pyx_t_3 = PyTuple_GET_ITEM(__pyx_t_1, __pyx_t_2); __Pyx_INCREF(__pyx_t_3); __pyx_t_2++; if (unlikely(0 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #else + __pyx_t_3 = PySequence_ITEM(__pyx_t_1, __pyx_t_2); __pyx_t_2++; if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_score); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_score); - __Pyx_GIVEREF(__pyx_t_4); - __pyx_cur_scope->__pyx_v_score = __pyx_t_4; - __pyx_t_4 = 0; + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_score, __pyx_t_3); + __Pyx_GIVEREF(__pyx_t_3); + __pyx_t_3 = 0; if (unlikely(!__pyx_cur_scope->__pyx_outer_scope->__pyx_v_converter)) { __Pyx_RaiseClosureNameError("converter"); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_t_4 = PyTuple_New(1); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_4); + __pyx_t_3 = PyTuple_New(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_cur_scope->__pyx_v_score); - PyTuple_SET_ITEM(__pyx_t_4, 0, __pyx_cur_scope->__pyx_v_score); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_cur_scope->__pyx_v_score); __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_score); - __pyx_t_5 = PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_converter, ((PyObject *)__pyx_t_4), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_4)); __pyx_t_4 = 0; - __pyx_r = __pyx_t_5; - __pyx_t_5 = 0; + __pyx_t_4 = __Pyx_PyObject_Call(__pyx_cur_scope->__pyx_outer_scope->__pyx_v_converter, __pyx_t_3, NULL); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_4); + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_r = __pyx_t_4; + __pyx_t_4 = 0; __Pyx_XGIVEREF(__pyx_t_1); __pyx_cur_scope->__pyx_t_0 = __pyx_t_1; __pyx_cur_scope->__pyx_t_1 = __pyx_t_2; - __pyx_cur_scope->__pyx_t_2 = __pyx_t_3; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); /* return from generator, yielding value */ @@ -7639,16 +8209,17 @@ static PyObject *__pyx_gb_5moses_7dictree_13OnDiskWrapper_5query_2generator4(__p __pyx_cur_scope->__pyx_t_0 = 0; __Pyx_XGOTREF(__pyx_t_1); __pyx_t_2 = __pyx_cur_scope->__pyx_t_1; - __pyx_t_3 = __pyx_cur_scope->__pyx_t_2; if (unlikely(!__pyx_sent_value)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + + /* function exit code */ PyErr_SetNone(PyExc_StopIteration); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); + __Pyx_XDECREF(__pyx_t_3); __Pyx_XDECREF(__pyx_t_4); - __Pyx_XDECREF(__pyx_t_5); __Pyx_AddTraceback("genexpr", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; __Pyx_XDECREF(__pyx_r); @@ -7660,7 +8231,7 @@ static PyObject *__pyx_gb_5moses_7dictree_13OnDiskWrapper_5query_2generator4(__p /* "moses/dictree.pyx":316 * return Production(tokens[:-1], tokens[-1]) - * + * * def query(self, line, converter = None, cmp = None, key = None): # <<<<<<<<<<<<<< * """ * Returns a list of target productions that translate a given source production @@ -7690,14 +8261,16 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_4query(struct __pyx_ob unsigned int __pyx_t_7; unsigned int __pyx_t_8; unsigned int __pyx_t_9; - PyObject *__pyx_t_10 = NULL; + int __pyx_t_10; PyObject *__pyx_t_11 = NULL; PyObject *__pyx_t_12 = NULL; + PyObject *__pyx_t_13 = NULL; + int __pyx_t_14; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("query", 0); - __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query *)__pyx_ptype_5moses_7dictree___pyx_scope_struct_7_query->tp_new(__pyx_ptype_5moses_7dictree___pyx_scope_struct_7_query, __pyx_empty_tuple, NULL); + __pyx_cur_scope = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query *)__pyx_tp_new_5moses_7dictree___pyx_scope_struct_7_query(__pyx_ptype_5moses_7dictree___pyx_scope_struct_7_query, __pyx_empty_tuple, NULL); if (unlikely(!__pyx_cur_scope)) { __Pyx_RefNannyFinishContext(); return NULL; @@ -7714,7 +8287,7 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_4query(struct __pyx_ob * cdef vector[string] ftokens = cdictree.Tokenize(text, self.delimiters) * cdef condiskpt.PhraseNode *node = self.finder.Query(ftokens) */ - __pyx_t_1 = ((PyObject *)__pyx_f_5moses_7dictree_as_str(__pyx_v_line)); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __pyx_f_5moses_7dictree_as_str(__pyx_v_line); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 325; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_v_text = ((PyObject*)__pyx_t_1); __pyx_t_1 = 0; @@ -7726,8 +8299,8 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_4query(struct __pyx_ob * cdef condiskpt.PhraseNode *node = self.finder.Query(ftokens) * if node == NULL: */ - __pyx_t_2 = __pyx_convert_string_from_py_(((PyObject *)__pyx_v_text)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_3 = __pyx_convert_string_from_py_(((PyObject *)__pyx_v_self->delimiters)); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __pyx_convert_string_from_py_(__pyx_v_text); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __pyx_convert_string_from_py_(__pyx_v_self->delimiters); if (unlikely(PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 326; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_ftokens = Moses::Tokenize(__pyx_t_2, __pyx_t_3); /* "moses/dictree.pyx":327 @@ -7746,7 +8319,7 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_4query(struct __pyx_ob * return [] * cdef Production source = self.getSourceProduction(ftokens) */ - __pyx_t_4 = (__pyx_v_node == NULL); + __pyx_t_4 = ((__pyx_v_node == NULL) != 0); if (__pyx_t_4) { /* "moses/dictree.pyx":329 @@ -7759,12 +8332,10 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_4query(struct __pyx_ob __Pyx_XDECREF(__pyx_r); __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 329; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_r = ((PyObject *)__pyx_t_1); + __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - goto __pyx_L3; } - __pyx_L3:; /* "moses/dictree.pyx":330 * if node == NULL: @@ -7808,9 +8379,9 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_4query(struct __pyx_ob __Pyx_INCREF(((PyObject *)__pyx_v_source)); PyTuple_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_v_source)); __Pyx_GIVEREF(((PyObject *)__pyx_v_source)); - __pyx_t_5 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_QueryResult)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_5 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_QueryResult)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 336; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_v_results = ((struct __pyx_obj_5moses_7dictree_QueryResult *)__pyx_t_5); __pyx_t_5 = 0; @@ -7846,15 +8417,13 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_4query(struct __pyx_ob __pyx_t_8 = __pyx_v_ephr.GetSize(); for (__pyx_t_9 = 0; __pyx_t_9 < __pyx_t_8; __pyx_t_9+=1) { __pyx_v_j = __pyx_t_9; - __pyx_t_1 = PyBytes_FromString(__pyx_v_ephr.GetWord(__pyx_v_j).GetString(__pyx_v_vocab).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - if (unlikely(__Pyx_PyList_Append(__pyx_t_5, (PyObject*)__pyx_t_1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyBytes_FromString(__pyx_v_ephr.GetWord(__pyx_v_j).GetString(__pyx_v_vocab).c_str()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + if (unlikely(__Pyx_ListComp_Append(__pyx_t_5, (PyObject*)__pyx_t_1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 339; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } - __Pyx_INCREF(((PyObject *)__pyx_t_5)); - __Pyx_XDECREF(((PyObject *)__pyx_v_words)); - __pyx_v_words = __pyx_t_5; - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; + __Pyx_XDECREF_SET(__pyx_v_words, ((PyObject*)__pyx_t_5)); + __pyx_t_5 = 0; /* "moses/dictree.pyx":340 * ephr = ephrases.GetTargetPhrase(i) @@ -7864,7 +8433,8 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_4query(struct __pyx_ob * else: */ __pyx_t_4 = (__pyx_cur_scope->__pyx_v_converter == Py_None); - if (__pyx_t_4) { + __pyx_t_10 = (__pyx_t_4 != 0); + if (__pyx_t_10) { /* "moses/dictree.pyx":341 * words = [ephr.GetWord(j).GetString(vocab).c_str() for j in xrange(ephr.GetSize())] @@ -7873,34 +8443,32 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_4query(struct __pyx_ob * else: * scores = tuple(ephr.GetScores()) */ - __pyx_t_5 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_words), 0, -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_5)); + __pyx_t_5 = __Pyx_PyList_GetSlice(__pyx_v_words, 0, -1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_5); __pyx_t_1 = __pyx_convert_vector_to_py___pyx_t_5moses_8cdictree_FValue(__pyx_v_ephr.GetScores()); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_10 = __pyx_convert_vector_to_py_OnDiskPt_3a__3a_AlignPair(__pyx_v_ephr.GetAlign()); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_11 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_words), -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_11) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __pyx_convert_vector_to_py_OnDiskPt_3a__3a_AlignPair(__pyx_v_ephr.GetAlign()); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_12 = PyTuple_New(4); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = __Pyx_GetItemInt_List(__pyx_v_words, -1, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(__pyx_t_12 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_12); - PyTuple_SET_ITEM(__pyx_t_12, 0, ((PyObject *)__pyx_t_5)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_5)); - PyTuple_SET_ITEM(__pyx_t_12, 1, __pyx_t_1); + __pyx_t_13 = PyTuple_New(4); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_5); + __Pyx_GIVEREF(__pyx_t_5); + PyTuple_SET_ITEM(__pyx_t_13, 1, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); - PyTuple_SET_ITEM(__pyx_t_12, 2, __pyx_t_10); - __Pyx_GIVEREF(__pyx_t_10); - PyTuple_SET_ITEM(__pyx_t_12, 3, __pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_13, 2, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_13, 3, __pyx_t_12); + __Pyx_GIVEREF(__pyx_t_12); __pyx_t_5 = 0; __pyx_t_1 = 0; - __pyx_t_10 = 0; __pyx_t_11 = 0; - __pyx_t_11 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_TargetProduction)), ((PyObject *)__pyx_t_12), NULL); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); - __Pyx_DECREF(((PyObject *)__pyx_t_12)); __pyx_t_12 = 0; - __pyx_t_12 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_results), __pyx_t_11); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = 0; + __pyx_t_12 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_TargetProduction)), __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; + __pyx_t_14 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_results), __pyx_t_12); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 341; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_12); __pyx_t_12 = 0; goto __pyx_L8; } @@ -7915,18 +8483,17 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_4query(struct __pyx_ob */ __pyx_t_12 = __pyx_convert_vector_to_py___pyx_t_5moses_8cdictree_FValue(__pyx_v_ephr.GetScores()); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); - __pyx_t_11 = PyTuple_New(1); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_11); - PyTuple_SET_ITEM(__pyx_t_11, 0, __pyx_t_12); + __pyx_t_13 = PyTuple_New(1); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_13, 0, __pyx_t_12); __Pyx_GIVEREF(__pyx_t_12); __pyx_t_12 = 0; - __pyx_t_12 = PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), ((PyObject *)__pyx_t_11), NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)(&PyTuple_Type))), __pyx_t_13, NULL); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 343; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_12); - __Pyx_DECREF(((PyObject *)__pyx_t_11)); __pyx_t_11 = 0; + __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0; __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v_scores); - __Pyx_XDECREF(__pyx_cur_scope->__pyx_v_scores); + __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v_scores, ((PyObject*)__pyx_t_12)); __Pyx_GIVEREF(__pyx_t_12); - __pyx_cur_scope->__pyx_v_scores = __pyx_t_12; __pyx_t_12 = 0; /* "moses/dictree.pyx":344 @@ -7936,35 +8503,33 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_4query(struct __pyx_ob * if cmp: * results.sort(cmp=cmp, key=key) */ - __pyx_t_12 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_words), 0, -1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_12)); - __pyx_t_11 = __pyx_pf_5moses_7dictree_13OnDiskWrapper_5query_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_12 = __Pyx_PyList_GetSlice(__pyx_v_words, 0, -1); if (unlikely(!__pyx_t_12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_12); + __pyx_t_13 = __pyx_pf_5moses_7dictree_13OnDiskWrapper_5query_genexpr(((PyObject*)__pyx_cur_scope)); if (unlikely(!__pyx_t_13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_13); + __pyx_t_11 = __pyx_convert_vector_to_py_OnDiskPt_3a__3a_AlignPair(__pyx_v_ephr.GetAlign()); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_11); - __pyx_t_10 = __pyx_convert_vector_to_py_OnDiskPt_3a__3a_AlignPair(__pyx_v_ephr.GetAlign()); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_10); - __pyx_t_1 = __Pyx_GetItemInt_List(((PyObject *)__pyx_v_words), -1, sizeof(long), PyInt_FromLong); if (!__pyx_t_1) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetItemInt_List(__pyx_v_words, -1, long, 1, __Pyx_PyInt_From_long, 1, 1, 1); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; __Pyx_GOTREF(__pyx_t_1); __pyx_t_5 = PyTuple_New(4); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - PyTuple_SET_ITEM(__pyx_t_5, 0, ((PyObject *)__pyx_t_12)); - __Pyx_GIVEREF(((PyObject *)__pyx_t_12)); - PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_11); + PyTuple_SET_ITEM(__pyx_t_5, 0, __pyx_t_12); + __Pyx_GIVEREF(__pyx_t_12); + PyTuple_SET_ITEM(__pyx_t_5, 1, __pyx_t_13); + __Pyx_GIVEREF(__pyx_t_13); + PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_11); __Pyx_GIVEREF(__pyx_t_11); - PyTuple_SET_ITEM(__pyx_t_5, 2, __pyx_t_10); - __Pyx_GIVEREF(__pyx_t_10); PyTuple_SET_ITEM(__pyx_t_5, 3, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_12 = 0; + __pyx_t_13 = 0; __pyx_t_11 = 0; - __pyx_t_10 = 0; __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_TargetProduction)), ((PyObject *)__pyx_t_5), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_TargetProduction)), __pyx_t_5, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; - __pyx_t_5 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_results), __pyx_t_1); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_5); - __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; + __pyx_t_14 = __Pyx_PyObject_Append(((PyObject *)__pyx_v_results), __pyx_t_1); if (unlikely(__pyx_t_14 == -1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; } __pyx_L8:; } @@ -7976,27 +8541,27 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_4query(struct __pyx_ob * results.sort(cmp=cmp, key=key) * return results */ - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_v_cmp); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (__pyx_t_4) { + __pyx_t_10 = __Pyx_PyObject_IsTrue(__pyx_v_cmp); if (unlikely(__pyx_t_10 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 345; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (__pyx_t_10) { /* "moses/dictree.pyx":346 * results.append(TargetProduction(words[:-1], (converter(score) for score in scores), ephr.GetAlign(), words[-1])) * if cmp: * results.sort(cmp=cmp, key=key) # <<<<<<<<<<<<<< * return results - * + * */ - __pyx_t_5 = PyObject_GetAttr(((PyObject *)__pyx_v_results), __pyx_n_s__sort); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)__pyx_v_results), __pyx_n_s_sort); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); - __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__cmp), __pyx_v_cmp) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - if (PyDict_SetItem(__pyx_t_1, ((PyObject *)__pyx_n_s__key), __pyx_v_key) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_10 = PyObject_Call(__pyx_t_5, ((PyObject *)__pyx_empty_tuple), ((PyObject *)__pyx_t_1)); if (unlikely(!__pyx_t_10)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_10); + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_cmp, __pyx_v_cmp) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_t_5, __pyx_n_s_key, __pyx_v_key) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_11 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_empty_tuple, __pyx_t_5); if (unlikely(!__pyx_t_11)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 346; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_11); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __Pyx_DECREF(__pyx_t_10); __pyx_t_10 = 0; + __Pyx_DECREF(__pyx_t_11); __pyx_t_11 = 0; goto __pyx_L9; } __pyx_L9:; @@ -8005,7 +8570,7 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_4query(struct __pyx_ob * if cmp: * results.sort(cmp=cmp, key=key) * return results # <<<<<<<<<<<<<< - * + * * def load(path, nscores, limit): */ __Pyx_XDECREF(__pyx_r); @@ -8013,14 +8578,21 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_4query(struct __pyx_ob __pyx_r = ((PyObject *)__pyx_v_results); goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":316 + * return Production(tokens[:-1], tokens[-1]) + * + * def query(self, line, converter = None, cmp = None, key = None): # <<<<<<<<<<<<<< + * """ + * Returns a list of target productions that translate a given source production + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_5); - __Pyx_XDECREF(__pyx_t_10); __Pyx_XDECREF(__pyx_t_11); __Pyx_XDECREF(__pyx_t_12); + __Pyx_XDECREF(__pyx_t_13); __Pyx_AddTraceback("moses.dictree.OnDiskWrapper.query", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; __pyx_L0:; @@ -8034,6 +8606,14 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_4query(struct __pyx_ob return __pyx_r; } +/* "moses/dictree.pyx":294 + * cdef condiskpt.OnDiskWrapper *wrapper + * cdef condiskpt.OnDiskQuery *finder + * cdef readonly bytes delimiters # <<<<<<<<<<<<<< + * cdef readonly unsigned tableLimit + * + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_13OnDiskWrapper_10delimiters_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_13OnDiskWrapper_10delimiters_1__get__(PyObject *__pyx_v_self) { @@ -8041,34 +8621,36 @@ static PyObject *__pyx_pw_5moses_7dictree_13OnDiskWrapper_10delimiters_1__get__( __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_13OnDiskWrapper_10delimiters___get__(((struct __pyx_obj_5moses_7dictree_OnDiskWrapper *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":294 - * cdef condiskpt.OnDiskWrapper *wrapper - * cdef condiskpt.OnDiskQuery *finder - * cdef readonly bytes delimiters # <<<<<<<<<<<<<< - * cdef readonly unsigned tableLimit - * - */ - static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_10delimiters___get__(struct __pyx_obj_5moses_7dictree_OnDiskWrapper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __Pyx_INCREF(((PyObject *)__pyx_v_self->delimiters)); - __pyx_r = ((PyObject *)__pyx_v_self->delimiters); + __Pyx_INCREF(__pyx_v_self->delimiters); + __pyx_r = __pyx_v_self->delimiters; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); + /* function exit code */ __pyx_L0:; __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; } +/* "moses/dictree.pyx":295 + * cdef condiskpt.OnDiskQuery *finder + * cdef readonly bytes delimiters + * cdef readonly unsigned tableLimit # <<<<<<<<<<<<<< + * + * def __cinit__(self, bytes path, unsigned tableLimit = 20, delimiters = ' \t'): + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_13OnDiskWrapper_10tableLimit_1__get__(PyObject *__pyx_v_self); /*proto*/ static PyObject *__pyx_pw_5moses_7dictree_13OnDiskWrapper_10tableLimit_1__get__(PyObject *__pyx_v_self) { @@ -8076,18 +8658,12 @@ static PyObject *__pyx_pw_5moses_7dictree_13OnDiskWrapper_10tableLimit_1__get__( __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("__get__ (wrapper)", 0); __pyx_r = __pyx_pf_5moses_7dictree_13OnDiskWrapper_10tableLimit___get__(((struct __pyx_obj_5moses_7dictree_OnDiskWrapper *)__pyx_v_self)); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":295 - * cdef condiskpt.OnDiskQuery *finder - * cdef readonly bytes delimiters - * cdef readonly unsigned tableLimit # <<<<<<<<<<<<<< - * - * def __cinit__(self, bytes path, unsigned tableLimit = 20, delimiters = ' \t'): - */ - static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_10tableLimit___get__(struct __pyx_obj_5moses_7dictree_OnDiskWrapper *__pyx_v_self) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -8097,14 +8673,13 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_10tableLimit___get__(s int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__get__", 0); __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyLong_FromUnsignedLong(__pyx_v_self->tableLimit); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_unsigned_int(__pyx_v_self->tableLimit); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 295; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_AddTraceback("moses.dictree.OnDiskWrapper.tableLimit.__get__", __pyx_clineno, __pyx_lineno, __pyx_filename); @@ -8115,6 +8690,14 @@ static PyObject *__pyx_pf_5moses_7dictree_13OnDiskWrapper_10tableLimit___get__(s return __pyx_r; } +/* "moses/dictree.pyx":349 + * return results + * + * def load(path, nscores, limit): # <<<<<<<<<<<<<< + * """Finds out the correct implementation depending on the content of 'path' and returns the appropriate dictionary tree.""" + * if PhraseDictionaryTree.canLoad(path, False): + */ + /* Python wrapper */ static PyObject *__pyx_pw_5moses_7dictree_3load(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_5moses_7dictree_2load[] = "Finds out the correct implementation depending on the content of 'path' and returns the appropriate dictionary tree."; @@ -8123,11 +8706,14 @@ static PyObject *__pyx_pw_5moses_7dictree_3load(PyObject *__pyx_self, PyObject * PyObject *__pyx_v_path = 0; PyObject *__pyx_v_nscores = 0; PyObject *__pyx_v_limit = 0; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; PyObject *__pyx_r = 0; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("load (wrapper)", 0); { - static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__path,&__pyx_n_s__nscores,&__pyx_n_s__limit,0}; + static PyObject **__pyx_pyargnames[] = {&__pyx_n_s_path,&__pyx_n_s_nscores,&__pyx_n_s_limit,0}; PyObject* values[3] = {0,0,0}; if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; @@ -8142,15 +8728,15 @@ static PyObject *__pyx_pw_5moses_7dictree_3load(PyObject *__pyx_self, PyObject * kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: - if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__path)) != 0)) kw_args--; + if (likely((values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_path)) != 0)) kw_args--; else goto __pyx_L5_argtuple_error; case 1: - if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__nscores)) != 0)) kw_args--; + if (likely((values[1] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_nscores)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("load", 1, 3, 3, 1); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } case 2: - if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__limit)) != 0)) kw_args--; + if (likely((values[2] = PyDict_GetItem(__pyx_kwds, __pyx_n_s_limit)) != 0)) kw_args--; else { __Pyx_RaiseArgtupleInvalid("load", 1, 3, 3, 2); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } @@ -8178,18 +8764,12 @@ static PyObject *__pyx_pw_5moses_7dictree_3load(PyObject *__pyx_self, PyObject * return NULL; __pyx_L4_argument_unpacking_done:; __pyx_r = __pyx_pf_5moses_7dictree_2load(__pyx_self, __pyx_v_path, __pyx_v_nscores, __pyx_v_limit); + + /* function exit code */ __Pyx_RefNannyFinishContext(); return __pyx_r; } -/* "moses/dictree.pyx":349 - * return results - * - * def load(path, nscores, limit): # <<<<<<<<<<<<<< - * """Finds out the correct implementation depending on the content of 'path' and returns the appropriate dictionary tree.""" - * if PhraseDictionaryTree.canLoad(path, False): - */ - static PyObject *__pyx_pf_5moses_7dictree_2load(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_path, PyObject *__pyx_v_nscores, PyObject *__pyx_v_limit) { PyObject *__pyx_r = NULL; __Pyx_RefNannyDeclarations @@ -8209,24 +8789,22 @@ static PyObject *__pyx_pf_5moses_7dictree_2load(CYTHON_UNUSED PyObject *__pyx_se * return PhraseDictionaryTree(path, limit, nscores, False) * elif PhraseDictionaryTree.canLoad(path, True): */ - __pyx_t_1 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_PhraseDictionaryTree)), __pyx_n_s__canLoad); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_PhraseDictionaryTree)), __pyx_n_s_canLoad); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyTuple_New(2); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_path); - PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_path); + PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_v_path); __Pyx_GIVEREF(__pyx_v_path); - PyTuple_SET_ITEM(__pyx_t_3, 1, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(__pyx_t_1, ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); + __Pyx_INCREF(Py_False); + PyTuple_SET_ITEM(__pyx_t_2, 1, Py_False); + __Pyx_GIVEREF(Py_False); + __pyx_t_3 = __Pyx_PyObject_Call(__pyx_t_1, __pyx_t_2, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_3); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 351; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; if (__pyx_t_4) { /* "moses/dictree.pyx":352 @@ -8237,8 +8815,6 @@ static PyObject *__pyx_pf_5moses_7dictree_2load(CYTHON_UNUSED PyObject *__pyx_se * return PhraseDictionaryTree(path, limit, nscores, True) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_2 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_2); __pyx_t_3 = PyTuple_New(4); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __Pyx_INCREF(__pyx_v_path); @@ -8250,16 +8826,15 @@ static PyObject *__pyx_pf_5moses_7dictree_2load(CYTHON_UNUSED PyObject *__pyx_se __Pyx_INCREF(__pyx_v_nscores); PyTuple_SET_ITEM(__pyx_t_3, 2, __pyx_v_nscores); __Pyx_GIVEREF(__pyx_v_nscores); - PyTuple_SET_ITEM(__pyx_t_3, 3, __pyx_t_2); - __Pyx_GIVEREF(__pyx_t_2); - __pyx_t_2 = 0; - __pyx_t_2 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_PhraseDictionaryTree)), ((PyObject *)__pyx_t_3), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_INCREF(Py_False); + PyTuple_SET_ITEM(__pyx_t_3, 3, Py_False); + __Pyx_GIVEREF(Py_False); + __pyx_t_2 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_PhraseDictionaryTree)), __pyx_t_3, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 352; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_3)); __pyx_t_3 = 0; + __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; __pyx_r = __pyx_t_2; __pyx_t_2 = 0; goto __pyx_L0; - goto __pyx_L3; } /* "moses/dictree.pyx":353 @@ -8269,24 +8844,22 @@ static PyObject *__pyx_pf_5moses_7dictree_2load(CYTHON_UNUSED PyObject *__pyx_se * return PhraseDictionaryTree(path, limit, nscores, True) * elif OnDiskWrapper.canLoad(path): */ - __pyx_t_2 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_PhraseDictionaryTree)), __pyx_n_s__canLoad); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_PhraseDictionaryTree)), __pyx_n_s_canLoad); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __pyx_t_1 = PyTuple_New(2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_path); - PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_path); + PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_v_path); __Pyx_GIVEREF(__pyx_v_path); - PyTuple_SET_ITEM(__pyx_t_1, 1, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Call(__pyx_t_2, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); + __Pyx_INCREF(Py_True); + PyTuple_SET_ITEM(__pyx_t_3, 1, Py_True); + __Pyx_GIVEREF(Py_True); + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_t_2, __pyx_t_3, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_3); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; + __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_1); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 353; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; if (__pyx_t_4) { /* "moses/dictree.pyx":354 @@ -8297,8 +8870,6 @@ static PyObject *__pyx_pf_5moses_7dictree_2load(CYTHON_UNUSED PyObject *__pyx_se * return OnDiskWrapper(path, limit) */ __Pyx_XDECREF(__pyx_r); - __pyx_t_3 = __Pyx_PyBool_FromLong(1); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(4); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_path); @@ -8310,16 +8881,15 @@ static PyObject *__pyx_pf_5moses_7dictree_2load(CYTHON_UNUSED PyObject *__pyx_se __Pyx_INCREF(__pyx_v_nscores); PyTuple_SET_ITEM(__pyx_t_1, 2, __pyx_v_nscores); __Pyx_GIVEREF(__pyx_v_nscores); - PyTuple_SET_ITEM(__pyx_t_1, 3, __pyx_t_3); - __Pyx_GIVEREF(__pyx_t_3); - __pyx_t_3 = 0; - __pyx_t_3 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_PhraseDictionaryTree)), ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_INCREF(Py_True); + PyTuple_SET_ITEM(__pyx_t_1, 3, Py_True); + __Pyx_GIVEREF(Py_True); + __pyx_t_3 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_PhraseDictionaryTree)), __pyx_t_1, NULL); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 354; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - goto __pyx_L3; } /* "moses/dictree.pyx":355 @@ -8329,17 +8899,17 @@ static PyObject *__pyx_pf_5moses_7dictree_2load(CYTHON_UNUSED PyObject *__pyx_se * return OnDiskWrapper(path, limit) * else: */ - __pyx_t_3 = PyObject_GetAttr(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_OnDiskWrapper)), __pyx_n_s__canLoad); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = __Pyx_PyObject_GetAttrStr(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_OnDiskWrapper)), __pyx_n_s_canLoad); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); __pyx_t_1 = PyTuple_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_INCREF(__pyx_v_path); PyTuple_SET_ITEM(__pyx_t_1, 0, __pyx_v_path); __Pyx_GIVEREF(__pyx_v_path); - __pyx_t_2 = PyObject_Call(__pyx_t_3, ((PyObject *)__pyx_t_1), NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyObject_Call(__pyx_t_3, __pyx_t_1, NULL); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0; - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely(__pyx_t_4 < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 355; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; if (__pyx_t_4) { @@ -8360,13 +8930,12 @@ static PyObject *__pyx_pf_5moses_7dictree_2load(CYTHON_UNUSED PyObject *__pyx_se __Pyx_INCREF(__pyx_v_limit); PyTuple_SET_ITEM(__pyx_t_2, 1, __pyx_v_limit); __Pyx_GIVEREF(__pyx_v_limit); - __pyx_t_1 = PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_OnDiskWrapper)), ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(((PyObject *)((PyObject*)__pyx_ptype_5moses_7dictree_OnDiskWrapper)), __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 356; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __pyx_r = __pyx_t_1; __pyx_t_1 = 0; goto __pyx_L0; - goto __pyx_L3; } /*else*/ { @@ -8375,16 +8944,22 @@ static PyObject *__pyx_pf_5moses_7dictree_2load(CYTHON_UNUSED PyObject *__pyx_se * else: * raise ValueError, '%s does not seem to be a valid table' % path # <<<<<<<<<<<<<< */ - __pyx_t_1 = PyNumber_Remainder(((PyObject *)__pyx_kp_s_32), __pyx_v_path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_1)); - __Pyx_Raise(__pyx_builtin_ValueError, ((PyObject *)__pyx_t_1), 0, 0); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_PyString_Format(__pyx_kp_s_s_does_not_seem_to_be_a_valid_t, __pyx_v_path); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_t_1); + __Pyx_Raise(__pyx_builtin_ValueError, __pyx_t_1, 0, 0); + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 358; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } - __pyx_L3:; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "moses/dictree.pyx":349 + * return results + * + * def load(path, nscores, limit): # <<<<<<<<<<<<<< + * """Finds out the correct implementation depending on the content of 'path' and returns the appropriate dictionary tree.""" + * if PhraseDictionaryTree.canLoad(path, False): + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -8397,37 +8972,54 @@ static PyObject *__pyx_pf_5moses_7dictree_2load(CYTHON_UNUSED PyObject *__pyx_se return __pyx_r; } -/* "string.from_py":11 - * +/* "string.from_py":13 + * * @cname("__pyx_convert_string_from_py_") * cdef string __pyx_convert_string_from_py_(object o) except *: # <<<<<<<<<<<<<< - * return string(o, len(o)) - * + * cdef Py_ssize_t length + * cdef char* data = __Pyx_PyObject_AsStringAndSize(o, &length) */ static std::string __pyx_convert_string_from_py_(PyObject *__pyx_v_o) { + Py_ssize_t __pyx_v_length; + char *__pyx_v_data; std::string __pyx_r; __Pyx_RefNannyDeclarations char *__pyx_t_1; - Py_ssize_t __pyx_t_2; int __pyx_lineno = 0; const char *__pyx_filename = NULL; int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_convert_string_from_py_", 0); - /* "string.from_py":12 - * @cname("__pyx_convert_string_from_py_") + /* "string.from_py":15 * cdef string __pyx_convert_string_from_py_(object o) except *: - * return string(o, len(o)) # <<<<<<<<<<<<<< - * - * - */ - __pyx_t_1 = PyBytes_AsString(__pyx_v_o); if (unlikely((!__pyx_t_1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_t_2 = PyObject_Length(__pyx_v_o); if (unlikely(__pyx_t_2 == -1)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 12; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_r = std::string(((char *)__pyx_t_1), __pyx_t_2); + * cdef Py_ssize_t length + * cdef char* data = __Pyx_PyObject_AsStringAndSize(o, &length) # <<<<<<<<<<<<<< + * return string(data, length) + * + */ + __pyx_t_1 = __Pyx_PyObject_AsStringAndSize(__pyx_v_o, (&__pyx_v_length)); if (unlikely(__pyx_t_1 == NULL)) {__pyx_filename = __pyx_f[1]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_v_data = __pyx_t_1; + + /* "string.from_py":16 + * cdef Py_ssize_t length + * cdef char* data = __Pyx_PyObject_AsStringAndSize(o, &length) + * return string(data, length) # <<<<<<<<<<<<<< + * + * + */ + __pyx_r = std::string(__pyx_v_data, __pyx_v_length); goto __pyx_L0; - goto __pyx_L0; + /* "string.from_py":13 + * + * @cname("__pyx_convert_string_from_py_") + * cdef string __pyx_convert_string_from_py_(object o) except *: # <<<<<<<<<<<<<< + * cdef Py_ssize_t length + * cdef char* data = __Pyx_PyObject_AsStringAndSize(o, &length) + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_AddTraceback("string.from_py.__pyx_convert_string_from_py_", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_L0:; @@ -8435,12 +9027,12 @@ static std::string __pyx_convert_string_from_py_(PyObject *__pyx_v_o) { return __pyx_r; } -/* "vector.to_py":58 - * +/* "vector.to_py":63 + * * @cname("__pyx_convert_vector_to_py___pyx_t_5moses_8cdictree_FValue") * cdef object __pyx_convert_vector_to_py___pyx_t_5moses_8cdictree_FValue(vector[X]& v): # <<<<<<<<<<<<<< * return [X_to_py(v[i]) for i in range(v.size())] - * + * */ static PyObject *__pyx_convert_vector_to_py___pyx_t_5moses_8cdictree_FValue(const std::vector<__pyx_t_5moses_8cdictree_FValue> &__pyx_v_v) { @@ -8456,31 +9048,37 @@ static PyObject *__pyx_convert_vector_to_py___pyx_t_5moses_8cdictree_FValue(cons int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py___pyx_t_5moses_8cdictree_FValue", 0); - /* "vector.to_py":59 + /* "vector.to_py":64 * @cname("__pyx_convert_vector_to_py___pyx_t_5moses_8cdictree_FValue") * cdef object __pyx_convert_vector_to_py___pyx_t_5moses_8cdictree_FValue(vector[X]& v): * return [X_to_py(v[i]) for i in range(v.size())] # <<<<<<<<<<<<<< - * - * + * + * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_v_v.size(); for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - __pyx_t_4 = PyFloat_FromDouble((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = PyFloat_FromDouble((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[2]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __Pyx_INCREF(((PyObject *)__pyx_t_1)); - __pyx_r = ((PyObject *)__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "vector.to_py":63 + * + * @cname("__pyx_convert_vector_to_py___pyx_t_5moses_8cdictree_FValue") + * cdef object __pyx_convert_vector_to_py___pyx_t_5moses_8cdictree_FValue(vector[X]& v): # <<<<<<<<<<<<<< + * return [X_to_py(v[i]) for i in range(v.size())] + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); @@ -8492,12 +9090,12 @@ static PyObject *__pyx_convert_vector_to_py___pyx_t_5moses_8cdictree_FValue(cons return __pyx_r; } -/* "pair.to_py":174 - * +/* "pair.to_py":180 + * * @cname("__pyx_convert_pair_to_py_int____int") * cdef object __pyx_convert_pair_to_py_int____int(pair[X,Y]& p): # <<<<<<<<<<<<<< * return X_to_py(p.first), Y_to_py(p.second) - * + * */ static PyObject *__pyx_convert_pair_to_py_int____int(const std::pair &__pyx_v_p) { @@ -8511,19 +9109,19 @@ static PyObject *__pyx_convert_pair_to_py_int____int(const std::pair &_ int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_convert_pair_to_py_int____int", 0); - /* "pair.to_py":175 + /* "pair.to_py":181 * @cname("__pyx_convert_pair_to_py_int____int") * cdef object __pyx_convert_pair_to_py_int____int(pair[X,Y]& p): * return X_to_py(p.first), Y_to_py(p.second) # <<<<<<<<<<<<<< - * - * + * + * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyInt_FromLong(__pyx_v_p.first); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyInt_From_int(__pyx_v_p.first); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_t_2 = PyInt_FromLong(__pyx_v_p.second); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_PyInt_From_int(__pyx_v_p.second); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_3 = PyTuple_New(2); if (unlikely(!__pyx_t_3)) {__pyx_filename = __pyx_f[3]; __pyx_lineno = 181; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_3); PyTuple_SET_ITEM(__pyx_t_3, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); @@ -8531,12 +9129,19 @@ static PyObject *__pyx_convert_pair_to_py_int____int(const std::pair &_ __Pyx_GIVEREF(__pyx_t_2); __pyx_t_1 = 0; __pyx_t_2 = 0; - __pyx_r = ((PyObject *)__pyx_t_3); + __pyx_r = __pyx_t_3; __pyx_t_3 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "pair.to_py":180 + * + * @cname("__pyx_convert_pair_to_py_int____int") + * cdef object __pyx_convert_pair_to_py_int____int(pair[X,Y]& p): # <<<<<<<<<<<<<< + * return X_to_py(p.first), Y_to_py(p.second) + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_2); @@ -8549,12 +9154,12 @@ static PyObject *__pyx_convert_pair_to_py_int____int(const std::pair &_ return __pyx_r; } -/* "vector.to_py":58 - * +/* "vector.to_py":63 + * * @cname("__pyx_convert_vector_to_py_OnDiskPt_3a__3a_AlignPair") * cdef object __pyx_convert_vector_to_py_OnDiskPt_3a__3a_AlignPair(vector[X]& v): # <<<<<<<<<<<<<< * return [X_to_py(v[i]) for i in range(v.size())] - * + * */ static PyObject *__pyx_convert_vector_to_py_OnDiskPt_3a__3a_AlignPair(const std::vector &__pyx_v_v) { @@ -8570,31 +9175,37 @@ static PyObject *__pyx_convert_vector_to_py_OnDiskPt_3a__3a_AlignPair(const std: int __pyx_clineno = 0; __Pyx_RefNannySetupContext("__pyx_convert_vector_to_py_OnDiskPt_3a__3a_AlignPair", 0); - /* "vector.to_py":59 + /* "vector.to_py":64 * @cname("__pyx_convert_vector_to_py_OnDiskPt_3a__3a_AlignPair") * cdef object __pyx_convert_vector_to_py_OnDiskPt_3a__3a_AlignPair(vector[X]& v): * return [X_to_py(v[i]) for i in range(v.size())] # <<<<<<<<<<<<<< - * - * + * + * */ __Pyx_XDECREF(__pyx_r); - __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = __pyx_v_v.size(); for (__pyx_t_3 = 0; __pyx_t_3 < __pyx_t_2; __pyx_t_3+=1) { __pyx_v_i = __pyx_t_3; - __pyx_t_4 = __pyx_convert_pair_to_py_int____int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_4 = __pyx_convert_pair_to_py_int____int((__pyx_v_v[__pyx_v_i])); if (unlikely(!__pyx_t_4)) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_4); - if (unlikely(__Pyx_PyList_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 59; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (unlikely(__Pyx_ListComp_Append(__pyx_t_1, (PyObject*)__pyx_t_4))) {__pyx_filename = __pyx_f[4]; __pyx_lineno = 64; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0; } - __Pyx_INCREF(((PyObject *)__pyx_t_1)); - __pyx_r = ((PyObject *)__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; + __pyx_r = __pyx_t_1; + __pyx_t_1 = 0; goto __pyx_L0; - __pyx_r = Py_None; __Pyx_INCREF(Py_None); - goto __pyx_L0; + /* "vector.to_py":63 + * + * @cname("__pyx_convert_vector_to_py_OnDiskPt_3a__3a_AlignPair") + * cdef object __pyx_convert_vector_to_py_OnDiskPt_3a__3a_AlignPair(vector[X]& v): # <<<<<<<<<<<<<< + * return [X_to_py(v[i]) for i in range(v.size())] + * + */ + + /* function exit code */ __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_1); __Pyx_XDECREF(__pyx_t_4); @@ -8608,8 +9219,13 @@ static PyObject *__pyx_convert_vector_to_py_OnDiskPt_3a__3a_AlignPair(const std: static PyObject *__pyx_tp_new_5moses_7dictree_Production(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_5moses_7dictree_Production *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; p = ((struct __pyx_obj_5moses_7dictree_Production *)o); p->lhs = ((PyObject*)Py_None); Py_INCREF(Py_None); p->rhs = ((PyObject*)Py_None); Py_INCREF(Py_None); @@ -8618,6 +9234,12 @@ static PyObject *__pyx_tp_new_5moses_7dictree_Production(PyTypeObject *t, CYTHON static void __pyx_tp_dealloc_5moses_7dictree_Production(PyObject *o) { struct __pyx_obj_5moses_7dictree_Production *p = (struct __pyx_obj_5moses_7dictree_Production *)o; + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); Py_CLEAR(p->lhs); Py_CLEAR(p->rhs); (*Py_TYPE(o)->tp_free)(o); @@ -8626,9 +9248,6 @@ static void __pyx_tp_dealloc_5moses_7dictree_Production(PyObject *o) { static int __pyx_tp_traverse_5moses_7dictree_Production(PyObject *o, visitproc v, void *a) { int e; struct __pyx_obj_5moses_7dictree_Production *p = (struct __pyx_obj_5moses_7dictree_Production *)o; - if (p->lhs) { - e = (*v)(p->lhs, a); if (e) return e; - } if (p->rhs) { e = (*v)(p->rhs, a); if (e) return e; } @@ -8636,11 +9255,8 @@ static int __pyx_tp_traverse_5moses_7dictree_Production(PyObject *o, visitproc v } static int __pyx_tp_clear_5moses_7dictree_Production(PyObject *o) { - struct __pyx_obj_5moses_7dictree_Production *p = (struct __pyx_obj_5moses_7dictree_Production *)o; PyObject* tmp; - tmp = ((PyObject*)p->lhs); - p->lhs = ((PyObject*)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); + struct __pyx_obj_5moses_7dictree_Production *p = (struct __pyx_obj_5moses_7dictree_Production *)o; tmp = ((PyObject*)p->rhs); p->rhs = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); @@ -8674,64 +9290,6 @@ static struct PyGetSetDef __pyx_getsets_5moses_7dictree_Production[] = { {0, 0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_Production = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - static PySequenceMethods __pyx_tp_as_sequence_Production = { __pyx_pw_5moses_7dictree_10Production_3__len__, /*sq_length*/ 0, /*sq_concat*/ @@ -8751,27 +9309,6 @@ static PyMappingMethods __pyx_tp_as_mapping_Production = { 0, /*mp_ass_subscript*/ }; -static PyBufferProcs __pyx_tp_as_buffer_Production = { - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getreadbuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getwritebuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getsegcount*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_releasebuffer*/ - #endif -}; - static PyTypeObject __pyx_type_5moses_7dictree_Production = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("moses.dictree.Production"), /*tp_name*/ @@ -8787,7 +9324,7 @@ static PyTypeObject __pyx_type_5moses_7dictree_Production = { 0, /*reserved*/ #endif __pyx_pw_5moses_7dictree_10Production_18__repr__, /*tp_repr*/ - &__pyx_tp_as_number_Production, /*tp_as_number*/ + 0, /*tp_as_number*/ &__pyx_tp_as_sequence_Production, /*tp_as_sequence*/ &__pyx_tp_as_mapping_Production, /*tp_as_mapping*/ __pyx_pw_5moses_7dictree_10Production_14__hash__, /*tp_hash*/ @@ -8795,8 +9332,8 @@ static PyTypeObject __pyx_type_5moses_7dictree_Production = { __pyx_pw_5moses_7dictree_10Production_16__str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_Production, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("\n General class that represents a context-free production or a flat contiguous phrase.\n Note: we can't extend from tuple yet (Cython 0.17.1 does not support it), so a few protocols are implemented so that\n it feels like Production is a tuple.\n "), /*tp_doc*/ __pyx_tp_traverse_5moses_7dictree_Production, /*tp_traverse*/ __pyx_tp_clear_5moses_7dictree_Production, /*tp_clear*/ @@ -8826,118 +9363,41 @@ static PyTypeObject __pyx_type_5moses_7dictree_Production = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; static PyObject *__pyx_tp_new_5moses_7dictree_Alignment(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (&PyList_Type)->tp_new(t, a, k); - if (!o) return 0; + if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_5moses_7dictree_Alignment(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + PyObject_GC_Track(o); (&PyList_Type)->tp_dealloc(o); } -static PyMethodDef __pyx_methods_5moses_7dictree_Alignment[] = { - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_Alignment = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence_Alignment = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; +static int __pyx_tp_traverse_5moses_7dictree_Alignment(PyObject *o, visitproc v, void *a) { + int e; + if (!(&PyList_Type)->tp_traverse); else { e = (&PyList_Type)->tp_traverse(o,v,a); if (e) return e; } + return 0; +} -static PyMappingMethods __pyx_tp_as_mapping_Alignment = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; +static int __pyx_tp_clear_5moses_7dictree_Alignment(PyObject *o) { + if (!(&PyList_Type)->tp_clear); else (&PyList_Type)->tp_clear(o); + return 0; +} -static PyBufferProcs __pyx_tp_as_buffer_Alignment = { - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getreadbuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getwritebuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getsegcount*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_releasebuffer*/ - #endif +static PyMethodDef __pyx_methods_5moses_7dictree_Alignment[] = { + {0, 0, 0, 0} }; static PyTypeObject __pyx_type_5moses_7dictree_Alignment = { @@ -8955,19 +9415,19 @@ static PyTypeObject __pyx_type_5moses_7dictree_Alignment = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_Alignment, /*tp_as_number*/ - &__pyx_tp_as_sequence_Alignment, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_Alignment, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ __pyx_pw_5moses_7dictree_9Alignment_3__str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_Alignment, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("\n This represents a list of alignment points (pairs of integers).\n It should inherit from tuple, but that is not yet supported in Cython (as for Cython 0.17.1).\n "), /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_5moses_7dictree_Alignment, /*tp_traverse*/ + __pyx_tp_clear_5moses_7dictree_Alignment, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ @@ -8994,118 +9454,41 @@ static PyTypeObject __pyx_type_5moses_7dictree_Alignment = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; static PyObject *__pyx_tp_new_5moses_7dictree_FValues(PyTypeObject *t, PyObject *a, PyObject *k) { PyObject *o = (&PyList_Type)->tp_new(t, a, k); - if (!o) return 0; + if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_5moses_7dictree_FValues(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); + PyObject_GC_Track(o); (&PyList_Type)->tp_dealloc(o); } -static PyMethodDef __pyx_methods_5moses_7dictree_FValues[] = { - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number_FValues = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence_FValues = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; +static int __pyx_tp_traverse_5moses_7dictree_FValues(PyObject *o, visitproc v, void *a) { + int e; + if (!(&PyList_Type)->tp_traverse); else { e = (&PyList_Type)->tp_traverse(o,v,a); if (e) return e; } + return 0; +} -static PyMappingMethods __pyx_tp_as_mapping_FValues = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; +static int __pyx_tp_clear_5moses_7dictree_FValues(PyObject *o) { + if (!(&PyList_Type)->tp_clear); else (&PyList_Type)->tp_clear(o); + return 0; +} -static PyBufferProcs __pyx_tp_as_buffer_FValues = { - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getreadbuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getwritebuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getsegcount*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_releasebuffer*/ - #endif +static PyMethodDef __pyx_methods_5moses_7dictree_FValues[] = { + {0, 0, 0, 0} }; static PyTypeObject __pyx_type_5moses_7dictree_FValues = { @@ -9123,19 +9506,19 @@ static PyTypeObject __pyx_type_5moses_7dictree_FValues = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_FValues, /*tp_as_number*/ - &__pyx_tp_as_sequence_FValues, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_FValues, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ __pyx_pw_5moses_7dictree_7FValues_3__str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_FValues, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("\n This represents a list of feature values (floats).\n It should inherit from tuple, but that is not yet supported in Cython (as for Cython 0.17.1).\n "), /*tp_doc*/ - 0, /*tp_traverse*/ - 0, /*tp_clear*/ + __pyx_tp_traverse_5moses_7dictree_FValues, /*tp_traverse*/ + __pyx_tp_clear_5moses_7dictree_FValues, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ @@ -9162,12 +9545,15 @@ static PyTypeObject __pyx_type_5moses_7dictree_FValues = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; static PyObject *__pyx_tp_new_5moses_7dictree_TargetProduction(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_5moses_7dictree_TargetProduction *p; PyObject *o = __pyx_tp_new_5moses_7dictree_Production(t, a, k); - if (!o) return 0; + if (unlikely(!o)) return 0; p = ((struct __pyx_obj_5moses_7dictree_TargetProduction *)o); p->alignment = ((struct __pyx_obj_5moses_7dictree_Alignment *)Py_None); Py_INCREF(Py_None); p->scores = ((struct __pyx_obj_5moses_7dictree_FValues *)Py_None); Py_INCREF(Py_None); @@ -9176,8 +9562,15 @@ static PyObject *__pyx_tp_new_5moses_7dictree_TargetProduction(PyTypeObject *t, static void __pyx_tp_dealloc_5moses_7dictree_TargetProduction(PyObject *o) { struct __pyx_obj_5moses_7dictree_TargetProduction *p = (struct __pyx_obj_5moses_7dictree_TargetProduction *)o; + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); Py_CLEAR(p->alignment); Py_CLEAR(p->scores); + PyObject_GC_Track(o); __pyx_tp_dealloc_5moses_7dictree_Production(o); } @@ -9195,8 +9588,8 @@ static int __pyx_tp_traverse_5moses_7dictree_TargetProduction(PyObject *o, visit } static int __pyx_tp_clear_5moses_7dictree_TargetProduction(PyObject *o) { - struct __pyx_obj_5moses_7dictree_TargetProduction *p = (struct __pyx_obj_5moses_7dictree_TargetProduction *)o; PyObject* tmp; + struct __pyx_obj_5moses_7dictree_TargetProduction *p = (struct __pyx_obj_5moses_7dictree_TargetProduction *)o; __pyx_tp_clear_5moses_7dictree_Production(o); tmp = ((PyObject*)p->alignment); p->alignment = ((struct __pyx_obj_5moses_7dictree_Alignment *)Py_None); Py_INCREF(Py_None); @@ -9226,145 +9619,31 @@ static struct PyGetSetDef __pyx_getsets_5moses_7dictree_TargetProduction[] = { {0, 0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_TargetProduction = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ +static PyTypeObject __pyx_type_5moses_7dictree_TargetProduction = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("moses.dictree.TargetProduction"), /*tp_name*/ + sizeof(struct __pyx_obj_5moses_7dictree_TargetProduction), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_5moses_7dictree_TargetProduction, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence_TargetProduction = { - #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_5moses_7dictree_10Production_3__len__, /*sq_length*/ - #else - 0, /*sq_length*/ - #endif - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_5moses_7dictree_10Production_10__contains__, /*sq_contains*/ - #else - 0, /*sq_contains*/ - #endif - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping_TargetProduction = { - #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_5moses_7dictree_10Production_3__len__, /*mp_length*/ - #else - 0, /*mp_length*/ - #endif - #if CYTHON_COMPILING_IN_PYPY - __pyx_pw_5moses_7dictree_10Production_5__getitem__, /*mp_subscript*/ - #else - 0, /*mp_subscript*/ - #endif - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_TargetProduction = { - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getreadbuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getwritebuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getsegcount*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_releasebuffer*/ - #endif -}; - -static PyTypeObject __pyx_type_5moses_7dictree_TargetProduction = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("moses.dictree.TargetProduction"), /*tp_name*/ - sizeof(struct __pyx_obj_5moses_7dictree_TargetProduction), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5moses_7dictree_TargetProduction, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ + 0, /*tp_compare*/ #else 0, /*reserved*/ #endif __pyx_pw_5moses_7dictree_16TargetProduction_7__repr__, /*tp_repr*/ - &__pyx_tp_as_number_TargetProduction, /*tp_as_number*/ - &__pyx_tp_as_sequence_TargetProduction, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_TargetProduction, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ __pyx_pw_5moses_7dictree_16TargetProduction_5__str__, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_TargetProduction, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ __Pyx_DOCSTR("This class specializes production making it the target side of a translation rule.\n On top of lhs and rhs it comes with alignment information a tuple of real-valued features.\n "), /*tp_doc*/ __pyx_tp_traverse_5moses_7dictree_TargetProduction, /*tp_traverse*/ __pyx_tp_clear_5moses_7dictree_TargetProduction, /*tp_clear*/ @@ -9398,12 +9677,15 @@ static PyTypeObject __pyx_type_5moses_7dictree_TargetProduction = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; static PyObject *__pyx_tp_new_5moses_7dictree_QueryResult(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_5moses_7dictree_QueryResult *p; PyObject *o = (&PyList_Type)->tp_new(t, a, k); - if (!o) return 0; + if (unlikely(!o)) return 0; p = ((struct __pyx_obj_5moses_7dictree_QueryResult *)o); p->source = ((struct __pyx_obj_5moses_7dictree_Production *)Py_None); Py_INCREF(Py_None); return o; @@ -9411,7 +9693,14 @@ static PyObject *__pyx_tp_new_5moses_7dictree_QueryResult(PyTypeObject *t, PyObj static void __pyx_tp_dealloc_5moses_7dictree_QueryResult(PyObject *o) { struct __pyx_obj_5moses_7dictree_QueryResult *p = (struct __pyx_obj_5moses_7dictree_QueryResult *)o; + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && !_PyGC_FINALIZED(o)) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif + PyObject_GC_UnTrack(o); Py_CLEAR(p->source); + PyObject_GC_Track(o); (&PyList_Type)->tp_dealloc(o); } @@ -9426,8 +9715,8 @@ static int __pyx_tp_traverse_5moses_7dictree_QueryResult(PyObject *o, visitproc } static int __pyx_tp_clear_5moses_7dictree_QueryResult(PyObject *o) { - struct __pyx_obj_5moses_7dictree_QueryResult *p = (struct __pyx_obj_5moses_7dictree_QueryResult *)o; PyObject* tmp; + struct __pyx_obj_5moses_7dictree_QueryResult *p = (struct __pyx_obj_5moses_7dictree_QueryResult *)o; if (!(&PyList_Type)->tp_clear); else (&PyList_Type)->tp_clear(o); tmp = ((PyObject*)p->source); p->source = ((struct __pyx_obj_5moses_7dictree_Production *)Py_None); Py_INCREF(Py_None); @@ -9448,104 +9737,6 @@ static struct PyGetSetDef __pyx_getsets_5moses_7dictree_QueryResult[] = { {0, 0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_QueryResult = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence_QueryResult = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping_QueryResult = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_QueryResult = { - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getreadbuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getwritebuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getsegcount*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_releasebuffer*/ - #endif -}; - static PyTypeObject __pyx_type_5moses_7dictree_QueryResult = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("moses.dictree.QueryResult"), /*tp_name*/ @@ -9561,16 +9752,16 @@ static PyTypeObject __pyx_type_5moses_7dictree_QueryResult = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_QueryResult, /*tp_as_number*/ - &__pyx_tp_as_sequence_QueryResult, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_QueryResult, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_QueryResult, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_5moses_7dictree_QueryResult, /*tp_traverse*/ __pyx_tp_clear_5moses_7dictree_QueryResult, /*tp_clear*/ @@ -9600,15 +9791,28 @@ static PyTypeObject __pyx_type_5moses_7dictree_QueryResult = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; static PyObject *__pyx_tp_new_5moses_7dictree_DictionaryTree(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; + PyObject *o; + if (likely((t->tp_flags & Py_TPFLAGS_IS_ABSTRACT) == 0)) { + o = (*t->tp_alloc)(t, 0); + } else { + o = (PyObject *) PyBaseObject_Type.tp_new(t, __pyx_empty_tuple, 0); + } + if (unlikely(!o)) return 0; return o; } static void __pyx_tp_dealloc_5moses_7dictree_DictionaryTree(PyObject *o) { + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif (*Py_TYPE(o)->tp_free)(o); } @@ -9618,104 +9822,6 @@ static PyMethodDef __pyx_methods_5moses_7dictree_DictionaryTree[] = { {0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_DictionaryTree = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence_DictionaryTree = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping_DictionaryTree = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_DictionaryTree = { - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getreadbuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getwritebuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getsegcount*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_releasebuffer*/ - #endif -}; - static PyTypeObject __pyx_type_5moses_7dictree_DictionaryTree = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("moses.dictree.DictionaryTree"), /*tp_name*/ @@ -9731,16 +9837,16 @@ static PyTypeObject __pyx_type_5moses_7dictree_DictionaryTree = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_DictionaryTree, /*tp_as_number*/ - &__pyx_tp_as_sequence_DictionaryTree, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_DictionaryTree, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_DictionaryTree, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ @@ -9770,18 +9876,21 @@ static PyTypeObject __pyx_type_5moses_7dictree_DictionaryTree = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; static struct __pyx_vtabstruct_5moses_7dictree_PhraseDictionaryTree __pyx_vtable_5moses_7dictree_PhraseDictionaryTree; static PyObject *__pyx_tp_new_5moses_7dictree_PhraseDictionaryTree(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *p; PyObject *o = __pyx_tp_new_5moses_7dictree_DictionaryTree(t, a, k); - if (!o) return 0; + if (unlikely(!o)) return 0; p = ((struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *)o); p->__pyx_vtab = __pyx_vtabptr_5moses_7dictree_PhraseDictionaryTree; p->path = ((PyObject*)Py_None); Py_INCREF(Py_None); p->delimiters = ((PyObject*)Py_None); Py_INCREF(Py_None); - if (__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_1__cinit__(o, a, k) < 0) { + if (unlikely(__pyx_pw_5moses_7dictree_20PhraseDictionaryTree_1__cinit__(o, a, k) < 0)) { Py_DECREF(o); o = 0; } return o; @@ -9789,12 +9898,16 @@ static PyObject *__pyx_tp_new_5moses_7dictree_PhraseDictionaryTree(PyTypeObject static void __pyx_tp_dealloc_5moses_7dictree_PhraseDictionaryTree(PyObject *o) { struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *p = (struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *)o; + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif { PyObject *etype, *eval, *etb; PyErr_Fetch(&etype, &eval, &etb); ++Py_REFCNT(o); __pyx_pw_5moses_7dictree_20PhraseDictionaryTree_3__dealloc__(o); - if (PyErr_Occurred()) PyErr_WriteUnraisable(o); --Py_REFCNT(o); PyErr_Restore(etype, eval, etb); } @@ -9803,32 +9916,6 @@ static void __pyx_tp_dealloc_5moses_7dictree_PhraseDictionaryTree(PyObject *o) { __pyx_tp_dealloc_5moses_7dictree_DictionaryTree(o); } -static int __pyx_tp_traverse_5moses_7dictree_PhraseDictionaryTree(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *p = (struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *)o; - e = ((likely(__pyx_ptype_5moses_7dictree_DictionaryTree)) ? ((__pyx_ptype_5moses_7dictree_DictionaryTree->tp_traverse) ? __pyx_ptype_5moses_7dictree_DictionaryTree->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_5moses_7dictree_PhraseDictionaryTree)); if (e) return e; - if (p->path) { - e = (*v)(p->path, a); if (e) return e; - } - if (p->delimiters) { - e = (*v)(p->delimiters, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_5moses_7dictree_PhraseDictionaryTree(PyObject *o) { - struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *p = (struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *)o; - PyObject* tmp; - if (likely(__pyx_ptype_5moses_7dictree_DictionaryTree)) { if (__pyx_ptype_5moses_7dictree_DictionaryTree->tp_clear) __pyx_ptype_5moses_7dictree_DictionaryTree->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_5moses_7dictree_PhraseDictionaryTree); - tmp = ((PyObject*)p->path); - p->path = ((PyObject*)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - tmp = ((PyObject*)p->delimiters); - p->delimiters = ((PyObject*)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - static PyObject *__pyx_getprop_5moses_7dictree_20PhraseDictionaryTree_path(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_5moses_7dictree_20PhraseDictionaryTree_4path_1__get__(o); } @@ -9864,104 +9951,6 @@ static struct PyGetSetDef __pyx_getsets_5moses_7dictree_PhraseDictionaryTree[] = {0, 0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_PhraseDictionaryTree = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence_PhraseDictionaryTree = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping_PhraseDictionaryTree = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_PhraseDictionaryTree = { - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getreadbuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getwritebuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getsegcount*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_releasebuffer*/ - #endif -}; - static PyTypeObject __pyx_type_5moses_7dictree_PhraseDictionaryTree = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("moses.dictree.PhraseDictionaryTree"), /*tp_name*/ @@ -9977,19 +9966,19 @@ static PyTypeObject __pyx_type_5moses_7dictree_PhraseDictionaryTree = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_PhraseDictionaryTree, /*tp_as_number*/ - &__pyx_tp_as_sequence_PhraseDictionaryTree, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_PhraseDictionaryTree, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_PhraseDictionaryTree, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ __Pyx_DOCSTR("This class encapsulates a Moses::PhraseDictionaryTree for operations over\n binary phrase tables."), /*tp_doc*/ - __pyx_tp_traverse_5moses_7dictree_PhraseDictionaryTree, /*tp_traverse*/ - __pyx_tp_clear_5moses_7dictree_PhraseDictionaryTree, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ @@ -10016,17 +10005,20 @@ static PyTypeObject __pyx_type_5moses_7dictree_PhraseDictionaryTree = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; static struct __pyx_vtabstruct_5moses_7dictree_OnDiskWrapper __pyx_vtable_5moses_7dictree_OnDiskWrapper; static PyObject *__pyx_tp_new_5moses_7dictree_OnDiskWrapper(PyTypeObject *t, PyObject *a, PyObject *k) { struct __pyx_obj_5moses_7dictree_OnDiskWrapper *p; PyObject *o = __pyx_tp_new_5moses_7dictree_DictionaryTree(t, a, k); - if (!o) return 0; + if (unlikely(!o)) return 0; p = ((struct __pyx_obj_5moses_7dictree_OnDiskWrapper *)o); p->__pyx_vtab = __pyx_vtabptr_5moses_7dictree_OnDiskWrapper; p->delimiters = ((PyObject*)Py_None); Py_INCREF(Py_None); - if (__pyx_pw_5moses_7dictree_13OnDiskWrapper_1__cinit__(o, a, k) < 0) { + if (unlikely(__pyx_pw_5moses_7dictree_13OnDiskWrapper_1__cinit__(o, a, k) < 0)) { Py_DECREF(o); o = 0; } return o; @@ -10034,30 +10026,15 @@ static PyObject *__pyx_tp_new_5moses_7dictree_OnDiskWrapper(PyTypeObject *t, PyO static void __pyx_tp_dealloc_5moses_7dictree_OnDiskWrapper(PyObject *o) { struct __pyx_obj_5moses_7dictree_OnDiskWrapper *p = (struct __pyx_obj_5moses_7dictree_OnDiskWrapper *)o; + #if PY_VERSION_HEX >= 0x030400a1 + if (unlikely(Py_TYPE(o)->tp_finalize) && (!PyType_IS_GC(Py_TYPE(o)) || !_PyGC_FINALIZED(o))) { + if (PyObject_CallFinalizerFromDealloc(o)) return; + } + #endif Py_CLEAR(p->delimiters); __pyx_tp_dealloc_5moses_7dictree_DictionaryTree(o); } -static int __pyx_tp_traverse_5moses_7dictree_OnDiskWrapper(PyObject *o, visitproc v, void *a) { - int e; - struct __pyx_obj_5moses_7dictree_OnDiskWrapper *p = (struct __pyx_obj_5moses_7dictree_OnDiskWrapper *)o; - e = ((likely(__pyx_ptype_5moses_7dictree_DictionaryTree)) ? ((__pyx_ptype_5moses_7dictree_DictionaryTree->tp_traverse) ? __pyx_ptype_5moses_7dictree_DictionaryTree->tp_traverse(o, v, a) : 0) : __Pyx_call_next_tp_traverse(o, v, a, __pyx_tp_traverse_5moses_7dictree_OnDiskWrapper)); if (e) return e; - if (p->delimiters) { - e = (*v)(p->delimiters, a); if (e) return e; - } - return 0; -} - -static int __pyx_tp_clear_5moses_7dictree_OnDiskWrapper(PyObject *o) { - struct __pyx_obj_5moses_7dictree_OnDiskWrapper *p = (struct __pyx_obj_5moses_7dictree_OnDiskWrapper *)o; - PyObject* tmp; - if (likely(__pyx_ptype_5moses_7dictree_DictionaryTree)) { if (__pyx_ptype_5moses_7dictree_DictionaryTree->tp_clear) __pyx_ptype_5moses_7dictree_DictionaryTree->tp_clear(o); } else __Pyx_call_next_tp_clear(o, __pyx_tp_clear_5moses_7dictree_OnDiskWrapper); - tmp = ((PyObject*)p->delimiters); - p->delimiters = ((PyObject*)Py_None); Py_INCREF(Py_None); - Py_XDECREF(tmp); - return 0; -} - static PyObject *__pyx_getprop_5moses_7dictree_13OnDiskWrapper_delimiters(PyObject *o, CYTHON_UNUSED void *x) { return __pyx_pw_5moses_7dictree_13OnDiskWrapper_10delimiters_1__get__(o); } @@ -10078,132 +10055,34 @@ static struct PyGetSetDef __pyx_getsets_5moses_7dictree_OnDiskWrapper[] = { {0, 0, 0, 0, 0} }; -static PyNumberMethods __pyx_tp_as_number_OnDiskWrapper = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ +static PyTypeObject __pyx_type_5moses_7dictree_OnDiskWrapper = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("moses.dictree.OnDiskWrapper"), /*tp_name*/ + sizeof(struct __pyx_obj_5moses_7dictree_OnDiskWrapper), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_5moses_7dictree_OnDiskWrapper, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence_OnDiskWrapper = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping_OnDiskWrapper = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer_OnDiskWrapper = { - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getreadbuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getwritebuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getsegcount*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_releasebuffer*/ - #endif -}; - -static PyTypeObject __pyx_type_5moses_7dictree_OnDiskWrapper = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("moses.dictree.OnDiskWrapper"), /*tp_name*/ - sizeof(struct __pyx_obj_5moses_7dictree_OnDiskWrapper), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5moses_7dictree_OnDiskWrapper, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ + 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number_OnDiskWrapper, /*tp_as_number*/ - &__pyx_tp_as_sequence_OnDiskWrapper, /*tp_as_sequence*/ - &__pyx_tp_as_mapping_OnDiskWrapper, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer_OnDiskWrapper, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_BASETYPE, /*tp_flags*/ 0, /*tp_doc*/ - __pyx_tp_traverse_5moses_7dictree_OnDiskWrapper, /*tp_traverse*/ - __pyx_tp_clear_5moses_7dictree_OnDiskWrapper, /*tp_clear*/ + 0, /*tp_traverse*/ + 0, /*tp_clear*/ 0, /*tp_richcompare*/ 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ @@ -10230,25 +10109,39 @@ static PyTypeObject __pyx_type_5moses_7dictree_OnDiskWrapper = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; +static struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__ *__pyx_freelist_5moses_7dictree___pyx_scope_struct____iter__[8]; +static int __pyx_freecount_5moses_7dictree___pyx_scope_struct____iter__ = 0; + static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct____iter__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__ *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__ *)o); - p->__pyx_v_self = 0; - p->__pyx_v_x = 0; - p->__pyx_t_0 = 0; + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5moses_7dictree___pyx_scope_struct____iter__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__)))) { + o = (PyObject*)__pyx_freelist_5moses_7dictree___pyx_scope_struct____iter__[--__pyx_freecount_5moses_7dictree___pyx_scope_struct____iter__]; + memset(o, 0, sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } return o; } static void __pyx_tp_dealloc_5moses_7dictree___pyx_scope_struct____iter__(PyObject *o) { struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__ *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__ *)o; + PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); Py_CLEAR(p->__pyx_v_x); Py_CLEAR(p->__pyx_t_0); - (*Py_TYPE(o)->tp_free)(o); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5moses_7dictree___pyx_scope_struct____iter__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__)))) { + __pyx_freelist_5moses_7dictree___pyx_scope_struct____iter__[__pyx_freecount_5moses_7dictree___pyx_scope_struct____iter__++] = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__ *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } } static int __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct____iter__(PyObject *o, visitproc v, void *a) { @@ -10267,8 +10160,8 @@ static int __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct____iter__(PyObje } static int __pyx_tp_clear_5moses_7dictree___pyx_scope_struct____iter__(PyObject *o) { - struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__ *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__ *)o; PyObject* tmp; + struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__ *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct____iter__ *)o; tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_5moses_7dictree_Production *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); @@ -10281,108 +10174,6 @@ static int __pyx_tp_clear_5moses_7dictree___pyx_scope_struct____iter__(PyObject return 0; } -static PyMethodDef __pyx_methods_5moses_7dictree___pyx_scope_struct____iter__[] = { - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct____iter__ = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct____iter__ = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct____iter__ = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct____iter__ = { - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getreadbuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getwritebuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getsegcount*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_releasebuffer*/ - #endif -}; - static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct____iter__ = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("moses.dictree.__pyx_scope_struct____iter__"), /*tp_name*/ @@ -10398,16 +10189,16 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct____iter__ = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number___pyx_scope_struct____iter__, /*tp_as_number*/ - &__pyx_tp_as_sequence___pyx_scope_struct____iter__, /*tp_as_sequence*/ - &__pyx_tp_as_mapping___pyx_scope_struct____iter__, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer___pyx_scope_struct____iter__, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct____iter__, /*tp_traverse*/ __pyx_tp_clear_5moses_7dictree___pyx_scope_struct____iter__, /*tp_clear*/ @@ -10415,7 +10206,7 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct____iter__ = { 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5moses_7dictree___pyx_scope_struct____iter__, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -10437,21 +10228,37 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct____iter__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; +static struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__ *__pyx_freelist_5moses_7dictree___pyx_scope_struct_1___str__[8]; +static int __pyx_freecount_5moses_7dictree___pyx_scope_struct_1___str__ = 0; + static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct_1___str__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__ *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__ *)o); - p->__pyx_v_self = 0; + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5moses_7dictree___pyx_scope_struct_1___str__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__)))) { + o = (PyObject*)__pyx_freelist_5moses_7dictree___pyx_scope_struct_1___str__[--__pyx_freecount_5moses_7dictree___pyx_scope_struct_1___str__]; + memset(o, 0, sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } return o; } static void __pyx_tp_dealloc_5moses_7dictree___pyx_scope_struct_1___str__(PyObject *o) { struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__ *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__ *)o; + PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - (*Py_TYPE(o)->tp_free)(o); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5moses_7dictree___pyx_scope_struct_1___str__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__)))) { + __pyx_freelist_5moses_7dictree___pyx_scope_struct_1___str__[__pyx_freecount_5moses_7dictree___pyx_scope_struct_1___str__++] = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__ *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } } static int __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_1___str__(PyObject *o, visitproc v, void *a) { @@ -10464,116 +10271,14 @@ static int __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_1___str__(PyObje } static int __pyx_tp_clear_5moses_7dictree___pyx_scope_struct_1___str__(PyObject *o) { - struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__ *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__ *)o; PyObject* tmp; + struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__ *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__ *)o; tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_5moses_7dictree_Alignment *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5moses_7dictree___pyx_scope_struct_1___str__[] = { - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_1___str__ = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_1___str__ = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_1___str__ = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_1___str__ = { - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getreadbuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getwritebuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getsegcount*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_releasebuffer*/ - #endif -}; - static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_1___str__ = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("moses.dictree.__pyx_scope_struct_1___str__"), /*tp_name*/ @@ -10589,16 +10294,16 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_1___str__ = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number___pyx_scope_struct_1___str__, /*tp_as_number*/ - &__pyx_tp_as_sequence___pyx_scope_struct_1___str__, /*tp_as_sequence*/ - &__pyx_tp_as_mapping___pyx_scope_struct_1___str__, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer___pyx_scope_struct_1___str__, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_1___str__, /*tp_traverse*/ __pyx_tp_clear_5moses_7dictree___pyx_scope_struct_1___str__, /*tp_clear*/ @@ -10606,7 +10311,7 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_1___str__ = { 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5moses_7dictree___pyx_scope_struct_1___str__, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -10628,27 +10333,40 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_1___str__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; +static struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr *__pyx_freelist_5moses_7dictree___pyx_scope_struct_2_genexpr[8]; +static int __pyx_freecount_5moses_7dictree___pyx_scope_struct_2_genexpr = 0; + static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct_2_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr *)o); - p->__pyx_outer_scope = 0; - p->__pyx_v_s = 0; - p->__pyx_v_t = 0; - p->__pyx_t_0 = 0; + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5moses_7dictree___pyx_scope_struct_2_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr)))) { + o = (PyObject*)__pyx_freelist_5moses_7dictree___pyx_scope_struct_2_genexpr[--__pyx_freecount_5moses_7dictree___pyx_scope_struct_2_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } return o; } static void __pyx_tp_dealloc_5moses_7dictree___pyx_scope_struct_2_genexpr(PyObject *o) { struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr *)o; + PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_s); Py_CLEAR(p->__pyx_v_t); Py_CLEAR(p->__pyx_t_0); - (*Py_TYPE(o)->tp_free)(o); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5moses_7dictree___pyx_scope_struct_2_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr)))) { + __pyx_freelist_5moses_7dictree___pyx_scope_struct_2_genexpr[__pyx_freecount_5moses_7dictree___pyx_scope_struct_2_genexpr++] = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } } static int __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_2_genexpr(PyObject *o, visitproc v, void *a) { @@ -10670,8 +10388,8 @@ static int __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_2_genexpr(PyObje } static int __pyx_tp_clear_5moses_7dictree___pyx_scope_struct_2_genexpr(PyObject *o) { - struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr *)o; PyObject* tmp; + struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_2_genexpr *)o; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_1___str__ *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); @@ -10687,108 +10405,6 @@ static int __pyx_tp_clear_5moses_7dictree___pyx_scope_struct_2_genexpr(PyObject return 0; } -static PyMethodDef __pyx_methods_5moses_7dictree___pyx_scope_struct_2_genexpr[] = { - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_2_genexpr = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_2_genexpr = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_2_genexpr = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_2_genexpr = { - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getreadbuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getwritebuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getsegcount*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_releasebuffer*/ - #endif -}; - static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_2_genexpr = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("moses.dictree.__pyx_scope_struct_2_genexpr"), /*tp_name*/ @@ -10804,16 +10420,16 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_2_genexpr = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number___pyx_scope_struct_2_genexpr, /*tp_as_number*/ - &__pyx_tp_as_sequence___pyx_scope_struct_2_genexpr, /*tp_as_sequence*/ - &__pyx_tp_as_mapping___pyx_scope_struct_2_genexpr, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer___pyx_scope_struct_2_genexpr, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_2_genexpr, /*tp_traverse*/ __pyx_tp_clear_5moses_7dictree___pyx_scope_struct_2_genexpr, /*tp_clear*/ @@ -10821,7 +10437,7 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_2_genexpr = { 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5moses_7dictree___pyx_scope_struct_2_genexpr, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -10843,21 +10459,37 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_2_genexpr = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; +static struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__ *__pyx_freelist_5moses_7dictree___pyx_scope_struct_3___str__[8]; +static int __pyx_freecount_5moses_7dictree___pyx_scope_struct_3___str__ = 0; + static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct_3___str__(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__ *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__ *)o); - p->__pyx_v_self = 0; + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5moses_7dictree___pyx_scope_struct_3___str__ > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__)))) { + o = (PyObject*)__pyx_freelist_5moses_7dictree___pyx_scope_struct_3___str__[--__pyx_freecount_5moses_7dictree___pyx_scope_struct_3___str__]; + memset(o, 0, sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } return o; } static void __pyx_tp_dealloc_5moses_7dictree___pyx_scope_struct_3___str__(PyObject *o) { struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__ *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__ *)o; + PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_self); - (*Py_TYPE(o)->tp_free)(o); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5moses_7dictree___pyx_scope_struct_3___str__ < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__)))) { + __pyx_freelist_5moses_7dictree___pyx_scope_struct_3___str__[__pyx_freecount_5moses_7dictree___pyx_scope_struct_3___str__++] = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__ *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } } static int __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_3___str__(PyObject *o, visitproc v, void *a) { @@ -10870,141 +10502,39 @@ static int __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_3___str__(PyObje } static int __pyx_tp_clear_5moses_7dictree___pyx_scope_struct_3___str__(PyObject *o) { - struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__ *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__ *)o; PyObject* tmp; + struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__ *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__ *)o; tmp = ((PyObject*)p->__pyx_v_self); p->__pyx_v_self = ((struct __pyx_obj_5moses_7dictree_FValues *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5moses_7dictree___pyx_scope_struct_3___str__[] = { - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_3___str__ = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ +static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_3___str__ = { + PyVarObject_HEAD_INIT(0, 0) + __Pyx_NAMESTR("moses.dictree.__pyx_scope_struct_3___str__"), /*tp_name*/ + sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__), /*tp_basicsize*/ + 0, /*tp_itemsize*/ + __pyx_tp_dealloc_5moses_7dictree___pyx_scope_struct_3___str__, /*tp_dealloc*/ + 0, /*tp_print*/ + 0, /*tp_getattr*/ + 0, /*tp_setattr*/ #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_3___str__ = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_3___str__ = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_3___str__ = { - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getreadbuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getwritebuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getsegcount*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_releasebuffer*/ - #endif -}; - -static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_3___str__ = { - PyVarObject_HEAD_INIT(0, 0) - __Pyx_NAMESTR("moses.dictree.__pyx_scope_struct_3___str__"), /*tp_name*/ - sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__), /*tp_basicsize*/ - 0, /*tp_itemsize*/ - __pyx_tp_dealloc_5moses_7dictree___pyx_scope_struct_3___str__, /*tp_dealloc*/ - 0, /*tp_print*/ - 0, /*tp_getattr*/ - 0, /*tp_setattr*/ - #if PY_MAJOR_VERSION < 3 - 0, /*tp_compare*/ + 0, /*tp_compare*/ #else 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number___pyx_scope_struct_3___str__, /*tp_as_number*/ - &__pyx_tp_as_sequence___pyx_scope_struct_3___str__, /*tp_as_sequence*/ - &__pyx_tp_as_mapping___pyx_scope_struct_3___str__, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer___pyx_scope_struct_3___str__, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_3___str__, /*tp_traverse*/ __pyx_tp_clear_5moses_7dictree___pyx_scope_struct_3___str__, /*tp_clear*/ @@ -11012,7 +10542,7 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_3___str__ = { 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5moses_7dictree___pyx_scope_struct_3___str__, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -11034,25 +10564,39 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_3___str__ = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; +static struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr *__pyx_freelist_5moses_7dictree___pyx_scope_struct_4_genexpr[8]; +static int __pyx_freecount_5moses_7dictree___pyx_scope_struct_4_genexpr = 0; + static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct_4_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr *)o); - p->__pyx_outer_scope = 0; - p->__pyx_v_x = 0; - p->__pyx_t_0 = 0; + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5moses_7dictree___pyx_scope_struct_4_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr)))) { + o = (PyObject*)__pyx_freelist_5moses_7dictree___pyx_scope_struct_4_genexpr[--__pyx_freecount_5moses_7dictree___pyx_scope_struct_4_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } return o; } static void __pyx_tp_dealloc_5moses_7dictree___pyx_scope_struct_4_genexpr(PyObject *o) { struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr *)o; + PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_x); Py_CLEAR(p->__pyx_t_0); - (*Py_TYPE(o)->tp_free)(o); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5moses_7dictree___pyx_scope_struct_4_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr)))) { + __pyx_freelist_5moses_7dictree___pyx_scope_struct_4_genexpr[__pyx_freecount_5moses_7dictree___pyx_scope_struct_4_genexpr++] = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } } static int __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_4_genexpr(PyObject *o, visitproc v, void *a) { @@ -11071,8 +10615,8 @@ static int __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_4_genexpr(PyObje } static int __pyx_tp_clear_5moses_7dictree___pyx_scope_struct_4_genexpr(PyObject *o) { - struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr *)o; PyObject* tmp; + struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_4_genexpr *)o; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_3___str__ *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); @@ -11085,108 +10629,6 @@ static int __pyx_tp_clear_5moses_7dictree___pyx_scope_struct_4_genexpr(PyObject return 0; } -static PyMethodDef __pyx_methods_5moses_7dictree___pyx_scope_struct_4_genexpr[] = { - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_4_genexpr = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_4_genexpr = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_4_genexpr = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_4_genexpr = { - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getreadbuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getwritebuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getsegcount*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_releasebuffer*/ - #endif -}; - static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_4_genexpr = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("moses.dictree.__pyx_scope_struct_4_genexpr"), /*tp_name*/ @@ -11202,16 +10644,16 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_4_genexpr = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number___pyx_scope_struct_4_genexpr, /*tp_as_number*/ - &__pyx_tp_as_sequence___pyx_scope_struct_4_genexpr, /*tp_as_sequence*/ - &__pyx_tp_as_mapping___pyx_scope_struct_4_genexpr, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer___pyx_scope_struct_4_genexpr, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_4_genexpr, /*tp_traverse*/ __pyx_tp_clear_5moses_7dictree___pyx_scope_struct_4_genexpr, /*tp_clear*/ @@ -11219,7 +10661,7 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_4_genexpr = { 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5moses_7dictree___pyx_scope_struct_4_genexpr, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -11241,12 +10683,25 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_4_genexpr = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; +static struct __pyx_obj_5moses_7dictree___pyx_scope_struct_5_query *__pyx_freelist_5moses_7dictree___pyx_scope_struct_5_query[8]; +static int __pyx_freecount_5moses_7dictree___pyx_scope_struct_5_query = 0; + static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct_5_query(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_5moses_7dictree___pyx_scope_struct_5_query *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5moses_7dictree___pyx_scope_struct_5_query > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_5_query)))) { + o = (PyObject*)__pyx_freelist_5moses_7dictree___pyx_scope_struct_5_query[--__pyx_freecount_5moses_7dictree___pyx_scope_struct_5_query]; + memset(o, 0, sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_5_query)); + (void) PyObject_INIT(o, t); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } p = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_5_query *)o); new((void*)&(p->__pyx_v_fphrase)) std::vector(); return o; @@ -11254,112 +10709,14 @@ static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct_5_query(PyTypeO static void __pyx_tp_dealloc_5moses_7dictree___pyx_scope_struct_5_query(PyObject *o) { struct __pyx_obj_5moses_7dictree___pyx_scope_struct_5_query *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_5_query *)o; - p->__pyx_v_fphrase.std::vector::~vector(); - (*Py_TYPE(o)->tp_free)(o); + __Pyx_call_destructor(&p->__pyx_v_fphrase); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5moses_7dictree___pyx_scope_struct_5_query < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_5_query)))) { + __pyx_freelist_5moses_7dictree___pyx_scope_struct_5_query[__pyx_freecount_5moses_7dictree___pyx_scope_struct_5_query++] = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_5_query *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } } -static PyMethodDef __pyx_methods_5moses_7dictree___pyx_scope_struct_5_query[] = { - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_5_query = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_5_query = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_5_query = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_5_query = { - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getreadbuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getwritebuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getsegcount*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_releasebuffer*/ - #endif -}; - static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_5_query = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("moses.dictree.__pyx_scope_struct_5_query"), /*tp_name*/ @@ -11375,16 +10732,16 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_5_query = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number___pyx_scope_struct_5_query, /*tp_as_number*/ - &__pyx_tp_as_sequence___pyx_scope_struct_5_query, /*tp_as_sequence*/ - &__pyx_tp_as_mapping___pyx_scope_struct_5_query, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer___pyx_scope_struct_5_query, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER, /*tp_flags*/ 0, /*tp_doc*/ 0, /*tp_traverse*/ 0, /*tp_clear*/ @@ -11392,7 +10749,7 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_5_query = { 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5moses_7dictree___pyx_scope_struct_5_query, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -11414,25 +10771,43 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_5_query = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; +static struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr *__pyx_freelist_5moses_7dictree___pyx_scope_struct_6_genexpr[8]; +static int __pyx_freecount_5moses_7dictree___pyx_scope_struct_6_genexpr = 0; + static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct_6_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5moses_7dictree___pyx_scope_struct_6_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr)))) { + o = (PyObject*)__pyx_freelist_5moses_7dictree___pyx_scope_struct_6_genexpr[--__pyx_freecount_5moses_7dictree___pyx_scope_struct_6_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } p = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr *)o); new((void*)&(p->__pyx_v_f)) std::string(); new((void*)&(p->__pyx_t_0)) std::vector::iterator(); - p->__pyx_outer_scope = 0; return o; } static void __pyx_tp_dealloc_5moses_7dictree___pyx_scope_struct_6_genexpr(PyObject *o) { struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr *)o; - p->__pyx_v_f.std::string::~string(); - p->__pyx_t_0.std::vector::iterator::~iterator(); + PyObject_GC_UnTrack(o); + __Pyx_call_destructor(&p->__pyx_v_f); + __Pyx_call_destructor(&p->__pyx_t_0); Py_CLEAR(p->__pyx_outer_scope); - (*Py_TYPE(o)->tp_free)(o); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5moses_7dictree___pyx_scope_struct_6_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr)))) { + __pyx_freelist_5moses_7dictree___pyx_scope_struct_6_genexpr[__pyx_freecount_5moses_7dictree___pyx_scope_struct_6_genexpr++] = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } } static int __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_6_genexpr(PyObject *o, visitproc v, void *a) { @@ -11445,116 +10820,14 @@ static int __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_6_genexpr(PyObje } static int __pyx_tp_clear_5moses_7dictree___pyx_scope_struct_6_genexpr(PyObject *o) { - struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr *)o; PyObject* tmp; + struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_6_genexpr *)o; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_5_query *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5moses_7dictree___pyx_scope_struct_6_genexpr[] = { - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_6_genexpr = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_6_genexpr = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_6_genexpr = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_6_genexpr = { - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getreadbuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getwritebuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getsegcount*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_releasebuffer*/ - #endif -}; - static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_6_genexpr = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("moses.dictree.__pyx_scope_struct_6_genexpr"), /*tp_name*/ @@ -11570,16 +10843,16 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_6_genexpr = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number___pyx_scope_struct_6_genexpr, /*tp_as_number*/ - &__pyx_tp_as_sequence___pyx_scope_struct_6_genexpr, /*tp_as_sequence*/ - &__pyx_tp_as_mapping___pyx_scope_struct_6_genexpr, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer___pyx_scope_struct_6_genexpr, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_6_genexpr, /*tp_traverse*/ __pyx_tp_clear_5moses_7dictree___pyx_scope_struct_6_genexpr, /*tp_clear*/ @@ -11587,7 +10860,7 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_6_genexpr = { 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5moses_7dictree___pyx_scope_struct_6_genexpr, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -11609,23 +10882,38 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_6_genexpr = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; +static struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query *__pyx_freelist_5moses_7dictree___pyx_scope_struct_7_query[8]; +static int __pyx_freecount_5moses_7dictree___pyx_scope_struct_7_query = 0; + static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct_7_query(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query *)o); - p->__pyx_v_converter = 0; - p->__pyx_v_scores = 0; + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5moses_7dictree___pyx_scope_struct_7_query > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query)))) { + o = (PyObject*)__pyx_freelist_5moses_7dictree___pyx_scope_struct_7_query[--__pyx_freecount_5moses_7dictree___pyx_scope_struct_7_query]; + memset(o, 0, sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } return o; } static void __pyx_tp_dealloc_5moses_7dictree___pyx_scope_struct_7_query(PyObject *o) { struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query *)o; + PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_v_converter); Py_CLEAR(p->__pyx_v_scores); - (*Py_TYPE(o)->tp_free)(o); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5moses_7dictree___pyx_scope_struct_7_query < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query)))) { + __pyx_freelist_5moses_7dictree___pyx_scope_struct_7_query[__pyx_freecount_5moses_7dictree___pyx_scope_struct_7_query++] = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } } static int __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_7_query(PyObject *o, visitproc v, void *a) { @@ -11641,119 +10929,17 @@ static int __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_7_query(PyObject } static int __pyx_tp_clear_5moses_7dictree___pyx_scope_struct_7_query(PyObject *o) { - struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query *)o; PyObject* tmp; + struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query *)o; tmp = ((PyObject*)p->__pyx_v_converter); p->__pyx_v_converter = Py_None; Py_INCREF(Py_None); Py_XDECREF(tmp); tmp = ((PyObject*)p->__pyx_v_scores); - p->__pyx_v_scores = Py_None; Py_INCREF(Py_None); + p->__pyx_v_scores = ((PyObject*)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); return 0; } -static PyMethodDef __pyx_methods_5moses_7dictree___pyx_scope_struct_7_query[] = { - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_7_query = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_7_query = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_7_query = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_7_query = { - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getreadbuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getwritebuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getsegcount*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_releasebuffer*/ - #endif -}; - static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_7_query = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("moses.dictree.__pyx_scope_struct_7_query"), /*tp_name*/ @@ -11769,16 +10955,16 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_7_query = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number___pyx_scope_struct_7_query, /*tp_as_number*/ - &__pyx_tp_as_sequence___pyx_scope_struct_7_query, /*tp_as_sequence*/ - &__pyx_tp_as_mapping___pyx_scope_struct_7_query, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer___pyx_scope_struct_7_query, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_7_query, /*tp_traverse*/ __pyx_tp_clear_5moses_7dictree___pyx_scope_struct_7_query, /*tp_clear*/ @@ -11786,7 +10972,7 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_7_query = { 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5moses_7dictree___pyx_scope_struct_7_query, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -11808,25 +10994,39 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_7_query = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; +static struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr *__pyx_freelist_5moses_7dictree___pyx_scope_struct_8_genexpr[8]; +static int __pyx_freecount_5moses_7dictree___pyx_scope_struct_8_genexpr = 0; + static PyObject *__pyx_tp_new_5moses_7dictree___pyx_scope_struct_8_genexpr(PyTypeObject *t, CYTHON_UNUSED PyObject *a, CYTHON_UNUSED PyObject *k) { - struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr *p; - PyObject *o = (*t->tp_alloc)(t, 0); - if (!o) return 0; - p = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr *)o); - p->__pyx_outer_scope = 0; - p->__pyx_v_score = 0; - p->__pyx_t_0 = 0; + PyObject *o; + if (CYTHON_COMPILING_IN_CPYTHON && likely((__pyx_freecount_5moses_7dictree___pyx_scope_struct_8_genexpr > 0) & (t->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr)))) { + o = (PyObject*)__pyx_freelist_5moses_7dictree___pyx_scope_struct_8_genexpr[--__pyx_freecount_5moses_7dictree___pyx_scope_struct_8_genexpr]; + memset(o, 0, sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr)); + (void) PyObject_INIT(o, t); + PyObject_GC_Track(o); + } else { + o = (*t->tp_alloc)(t, 0); + if (unlikely(!o)) return 0; + } return o; } static void __pyx_tp_dealloc_5moses_7dictree___pyx_scope_struct_8_genexpr(PyObject *o) { struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr *)o; + PyObject_GC_UnTrack(o); Py_CLEAR(p->__pyx_outer_scope); Py_CLEAR(p->__pyx_v_score); Py_CLEAR(p->__pyx_t_0); - (*Py_TYPE(o)->tp_free)(o); + if (CYTHON_COMPILING_IN_CPYTHON && ((__pyx_freecount_5moses_7dictree___pyx_scope_struct_8_genexpr < 8) & (Py_TYPE(o)->tp_basicsize == sizeof(struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr)))) { + __pyx_freelist_5moses_7dictree___pyx_scope_struct_8_genexpr[__pyx_freecount_5moses_7dictree___pyx_scope_struct_8_genexpr++] = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr *)o); + } else { + (*Py_TYPE(o)->tp_free)(o); + } } static int __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_8_genexpr(PyObject *o, visitproc v, void *a) { @@ -11845,8 +11045,8 @@ static int __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_8_genexpr(PyObje } static int __pyx_tp_clear_5moses_7dictree___pyx_scope_struct_8_genexpr(PyObject *o) { - struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr *)o; PyObject* tmp; + struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr *p = (struct __pyx_obj_5moses_7dictree___pyx_scope_struct_8_genexpr *)o; tmp = ((PyObject*)p->__pyx_outer_scope); p->__pyx_outer_scope = ((struct __pyx_obj_5moses_7dictree___pyx_scope_struct_7_query *)Py_None); Py_INCREF(Py_None); Py_XDECREF(tmp); @@ -11859,108 +11059,6 @@ static int __pyx_tp_clear_5moses_7dictree___pyx_scope_struct_8_genexpr(PyObject return 0; } -static PyMethodDef __pyx_methods_5moses_7dictree___pyx_scope_struct_8_genexpr[] = { - {0, 0, 0, 0} -}; - -static PyNumberMethods __pyx_tp_as_number___pyx_scope_struct_8_genexpr = { - 0, /*nb_add*/ - 0, /*nb_subtract*/ - 0, /*nb_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_divide*/ - #endif - 0, /*nb_remainder*/ - 0, /*nb_divmod*/ - 0, /*nb_power*/ - 0, /*nb_negative*/ - 0, /*nb_positive*/ - 0, /*nb_absolute*/ - 0, /*nb_nonzero*/ - 0, /*nb_invert*/ - 0, /*nb_lshift*/ - 0, /*nb_rshift*/ - 0, /*nb_and*/ - 0, /*nb_xor*/ - 0, /*nb_or*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_coerce*/ - #endif - 0, /*nb_int*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_long*/ - #else - 0, /*reserved*/ - #endif - 0, /*nb_float*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_oct*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*nb_hex*/ - #endif - 0, /*nb_inplace_add*/ - 0, /*nb_inplace_subtract*/ - 0, /*nb_inplace_multiply*/ - #if PY_MAJOR_VERSION < 3 - 0, /*nb_inplace_divide*/ - #endif - 0, /*nb_inplace_remainder*/ - 0, /*nb_inplace_power*/ - 0, /*nb_inplace_lshift*/ - 0, /*nb_inplace_rshift*/ - 0, /*nb_inplace_and*/ - 0, /*nb_inplace_xor*/ - 0, /*nb_inplace_or*/ - 0, /*nb_floor_divide*/ - 0, /*nb_true_divide*/ - 0, /*nb_inplace_floor_divide*/ - 0, /*nb_inplace_true_divide*/ - #if PY_VERSION_HEX >= 0x02050000 - 0, /*nb_index*/ - #endif -}; - -static PySequenceMethods __pyx_tp_as_sequence___pyx_scope_struct_8_genexpr = { - 0, /*sq_length*/ - 0, /*sq_concat*/ - 0, /*sq_repeat*/ - 0, /*sq_item*/ - 0, /*sq_slice*/ - 0, /*sq_ass_item*/ - 0, /*sq_ass_slice*/ - 0, /*sq_contains*/ - 0, /*sq_inplace_concat*/ - 0, /*sq_inplace_repeat*/ -}; - -static PyMappingMethods __pyx_tp_as_mapping___pyx_scope_struct_8_genexpr = { - 0, /*mp_length*/ - 0, /*mp_subscript*/ - 0, /*mp_ass_subscript*/ -}; - -static PyBufferProcs __pyx_tp_as_buffer___pyx_scope_struct_8_genexpr = { - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getreadbuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getwritebuffer*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getsegcount*/ - #endif - #if PY_MAJOR_VERSION < 3 - 0, /*bf_getcharbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_getbuffer*/ - #endif - #if PY_VERSION_HEX >= 0x02060000 - 0, /*bf_releasebuffer*/ - #endif -}; - static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_8_genexpr = { PyVarObject_HEAD_INIT(0, 0) __Pyx_NAMESTR("moses.dictree.__pyx_scope_struct_8_genexpr"), /*tp_name*/ @@ -11976,16 +11074,16 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_8_genexpr = { 0, /*reserved*/ #endif 0, /*tp_repr*/ - &__pyx_tp_as_number___pyx_scope_struct_8_genexpr, /*tp_as_number*/ - &__pyx_tp_as_sequence___pyx_scope_struct_8_genexpr, /*tp_as_sequence*/ - &__pyx_tp_as_mapping___pyx_scope_struct_8_genexpr, /*tp_as_mapping*/ + 0, /*tp_as_number*/ + 0, /*tp_as_sequence*/ + 0, /*tp_as_mapping*/ 0, /*tp_hash*/ 0, /*tp_call*/ 0, /*tp_str*/ 0, /*tp_getattro*/ 0, /*tp_setattro*/ - &__pyx_tp_as_buffer___pyx_scope_struct_8_genexpr, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ + 0, /*tp_as_buffer*/ + Py_TPFLAGS_DEFAULT|Py_TPFLAGS_HAVE_VERSION_TAG|Py_TPFLAGS_CHECKTYPES|Py_TPFLAGS_HAVE_NEWBUFFER|Py_TPFLAGS_HAVE_GC, /*tp_flags*/ 0, /*tp_doc*/ __pyx_tp_traverse_5moses_7dictree___pyx_scope_struct_8_genexpr, /*tp_traverse*/ __pyx_tp_clear_5moses_7dictree___pyx_scope_struct_8_genexpr, /*tp_clear*/ @@ -11993,7 +11091,7 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_8_genexpr = { 0, /*tp_weaklistoffset*/ 0, /*tp_iter*/ 0, /*tp_iternext*/ - __pyx_methods_5moses_7dictree___pyx_scope_struct_8_genexpr, /*tp_methods*/ + 0, /*tp_methods*/ 0, /*tp_members*/ 0, /*tp_getset*/ 0, /*tp_base*/ @@ -12015,6 +11113,9 @@ static PyTypeObject __pyx_type_5moses_7dictree___pyx_scope_struct_8_genexpr = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif + #if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ + #endif }; static PyMethodDef __pyx_methods[] = { @@ -12024,7 +11125,11 @@ static PyMethodDef __pyx_methods[] = { #if PY_MAJOR_VERSION >= 3 static struct PyModuleDef __pyx_moduledef = { + #if PY_VERSION_HEX < 0x03020000 + { PyObject_HEAD_INIT(NULL) NULL, 0, NULL }, + #else PyModuleDef_HEAD_INIT, + #endif __Pyx_NAMESTR("dictree"), 0, /* m_doc */ -1, /* m_size */ @@ -12037,96 +11142,105 @@ static struct PyModuleDef __pyx_moduledef = { #endif static __Pyx_StringTabEntry __pyx_string_tab[] = { - {&__pyx_kp_s_1, __pyx_k_1, sizeof(__pyx_k_1), 0, 0, 1, 0}, - {&__pyx_kp_s_10, __pyx_k_10, sizeof(__pyx_k_10), 0, 0, 1, 0}, - {&__pyx_kp_s_11, __pyx_k_11, sizeof(__pyx_k_11), 0, 0, 1, 0}, - {&__pyx_kp_s_14, __pyx_k_14, sizeof(__pyx_k_14), 0, 0, 1, 0}, - {&__pyx_kp_s_16, __pyx_k_16, sizeof(__pyx_k_16), 0, 0, 1, 0}, - {&__pyx_kp_s_17, __pyx_k_17, sizeof(__pyx_k_17), 0, 0, 1, 0}, - {&__pyx_kp_s_18, __pyx_k_18, sizeof(__pyx_k_18), 0, 0, 1, 0}, - {&__pyx_kp_s_19, __pyx_k_19, sizeof(__pyx_k_19), 0, 0, 1, 0}, - {&__pyx_kp_s_20, __pyx_k_20, sizeof(__pyx_k_20), 0, 0, 1, 0}, - {&__pyx_kp_s_21, __pyx_k_21, sizeof(__pyx_k_21), 0, 0, 1, 0}, - {&__pyx_kp_s_22, __pyx_k_22, sizeof(__pyx_k_22), 0, 0, 1, 0}, - {&__pyx_kp_s_23, __pyx_k_23, sizeof(__pyx_k_23), 0, 0, 1, 0}, - {&__pyx_kp_s_24, __pyx_k_24, sizeof(__pyx_k_24), 0, 0, 1, 0}, - {&__pyx_kp_s_27, __pyx_k_27, sizeof(__pyx_k_27), 0, 0, 1, 0}, - {&__pyx_kp_s_28, __pyx_k_28, sizeof(__pyx_k_28), 0, 0, 1, 0}, - {&__pyx_kp_s_29, __pyx_k_29, sizeof(__pyx_k_29), 0, 0, 1, 0}, - {&__pyx_kp_s_3, __pyx_k_3, sizeof(__pyx_k_3), 0, 0, 1, 0}, - {&__pyx_kp_s_30, __pyx_k_30, sizeof(__pyx_k_30), 0, 0, 1, 0}, - {&__pyx_kp_s_31, __pyx_k_31, sizeof(__pyx_k_31), 0, 0, 1, 0}, - {&__pyx_kp_s_32, __pyx_k_32, sizeof(__pyx_k_32), 0, 0, 1, 0}, - {&__pyx_n_s_33, __pyx_k_33, sizeof(__pyx_k_33), 0, 0, 1, 1}, - {&__pyx_kp_s_36, __pyx_k_36, sizeof(__pyx_k_36), 0, 0, 1, 0}, - {&__pyx_kp_s_4, __pyx_k_4, sizeof(__pyx_k_4), 0, 0, 1, 0}, - {&__pyx_kp_s_5, __pyx_k_5, sizeof(__pyx_k_5), 0, 0, 1, 0}, - {&__pyx_kp_s_6, __pyx_k_6, sizeof(__pyx_k_6), 0, 0, 1, 0}, - {&__pyx_kp_s_8, __pyx_k_8, sizeof(__pyx_k_8), 0, 0, 1, 0}, - {&__pyx_n_s__IndexError, __pyx_k__IndexError, sizeof(__pyx_k__IndexError), 0, 0, 1, 1}, - {&__pyx_n_s__NotImplementedError, __pyx_k__NotImplementedError, sizeof(__pyx_k__NotImplementedError), 0, 0, 1, 1}, - {&__pyx_n_s__TypeError, __pyx_k__TypeError, sizeof(__pyx_k__TypeError), 0, 0, 1, 1}, - {&__pyx_n_s__ValueError, __pyx_k__ValueError, sizeof(__pyx_k__ValueError), 0, 0, 1, 1}, - {&__pyx_n_s____init__, __pyx_k____init__, sizeof(__pyx_k____init__), 0, 0, 1, 1}, - {&__pyx_n_s____main__, __pyx_k____main__, sizeof(__pyx_k____main__), 0, 0, 1, 1}, - {&__pyx_n_s____test__, __pyx_k____test__, sizeof(__pyx_k____test__), 0, 0, 1, 1}, - {&__pyx_n_s__alignment, __pyx_k__alignment, sizeof(__pyx_k__alignment), 0, 0, 1, 1}, - {&__pyx_n_s__as_tuple, __pyx_k__as_tuple, sizeof(__pyx_k__as_tuple), 0, 0, 1, 1}, - {&__pyx_n_s__canLoad, __pyx_k__canLoad, sizeof(__pyx_k__canLoad), 0, 0, 1, 1}, - {&__pyx_n_s__chain, __pyx_k__chain, sizeof(__pyx_k__chain), 0, 0, 1, 1}, - {&__pyx_n_s__cmp, __pyx_k__cmp, sizeof(__pyx_k__cmp), 0, 0, 1, 1}, - {&__pyx_n_s__converter, __pyx_k__converter, sizeof(__pyx_k__converter), 0, 0, 1, 1}, - {&__pyx_n_s__delimiters, __pyx_k__delimiters, sizeof(__pyx_k__delimiters), 0, 0, 1, 1}, - {&__pyx_n_s__desc, __pyx_k__desc, sizeof(__pyx_k__desc), 0, 0, 1, 1}, - {&__pyx_n_s__encode, __pyx_k__encode, sizeof(__pyx_k__encode), 0, 0, 1, 1}, - {&__pyx_n_s__extend, __pyx_k__extend, sizeof(__pyx_k__extend), 0, 0, 1, 1}, - {&__pyx_n_s__isfile, __pyx_k__isfile, sizeof(__pyx_k__isfile), 0, 0, 1, 1}, - {&__pyx_n_s__itertools, __pyx_k__itertools, sizeof(__pyx_k__itertools), 0, 0, 1, 1}, - {&__pyx_n_s__join, __pyx_k__join, sizeof(__pyx_k__join), 0, 0, 1, 1}, - {&__pyx_n_s__key, __pyx_k__key, sizeof(__pyx_k__key), 0, 0, 1, 1}, - {&__pyx_n_s__lhs, __pyx_k__lhs, sizeof(__pyx_k__lhs), 0, 0, 1, 1}, - {&__pyx_n_s__lhs_first, __pyx_k__lhs_first, sizeof(__pyx_k__lhs_first), 0, 0, 1, 1}, - {&__pyx_n_s__limit, __pyx_k__limit, sizeof(__pyx_k__limit), 0, 0, 1, 1}, - {&__pyx_n_s__line, __pyx_k__line, sizeof(__pyx_k__line), 0, 0, 1, 1}, - {&__pyx_n_s__load, __pyx_k__load, sizeof(__pyx_k__load), 0, 0, 1, 1}, - {&__pyx_n_s__log, __pyx_k__log, sizeof(__pyx_k__log), 0, 0, 1, 1}, - {&__pyx_n_s__math, __pyx_k__math, sizeof(__pyx_k__math), 0, 0, 1, 1}, - {&__pyx_n_s__nscores, __pyx_k__nscores, sizeof(__pyx_k__nscores), 0, 0, 1, 1}, - {&__pyx_n_s__os, __pyx_k__os, sizeof(__pyx_k__os), 0, 0, 1, 1}, - {&__pyx_n_s__path, __pyx_k__path, sizeof(__pyx_k__path), 0, 0, 1, 1}, - {&__pyx_n_s__range, __pyx_k__range, sizeof(__pyx_k__range), 0, 0, 1, 1}, - {&__pyx_n_s__reversed, __pyx_k__reversed, sizeof(__pyx_k__reversed), 0, 0, 1, 1}, - {&__pyx_n_s__rhs, __pyx_k__rhs, sizeof(__pyx_k__rhs), 0, 0, 1, 1}, - {&__pyx_n_s__scores, __pyx_k__scores, sizeof(__pyx_k__scores), 0, 0, 1, 1}, - {&__pyx_n_s__sort, __pyx_k__sort, sizeof(__pyx_k__sort), 0, 0, 1, 1}, - {&__pyx_n_s__source, __pyx_k__source, sizeof(__pyx_k__source), 0, 0, 1, 1}, - {&__pyx_n_s__split, __pyx_k__split, sizeof(__pyx_k__split), 0, 0, 1, 1}, - {&__pyx_n_s__staticmethod, __pyx_k__staticmethod, sizeof(__pyx_k__staticmethod), 0, 0, 1, 1}, - {&__pyx_n_s__stem, __pyx_k__stem, sizeof(__pyx_k__stem), 0, 0, 1, 1}, - {&__pyx_n_s__super, __pyx_k__super, sizeof(__pyx_k__super), 0, 0, 1, 1}, - {&__pyx_n_s__tableLimit, __pyx_k__tableLimit, sizeof(__pyx_k__tableLimit), 0, 0, 1, 1}, - {&__pyx_n_s__targets, __pyx_k__targets, sizeof(__pyx_k__targets), 0, 0, 1, 1}, - {&__pyx_n_s__values, __pyx_k__values, sizeof(__pyx_k__values), 0, 0, 1, 1}, - {&__pyx_n_s__wa, __pyx_k__wa, sizeof(__pyx_k__wa), 0, 0, 1, 1}, - {&__pyx_n_s__x, __pyx_k__x, sizeof(__pyx_k__x), 0, 0, 1, 1}, - {&__pyx_n_s__xrange, __pyx_k__xrange, sizeof(__pyx_k__xrange), 0, 0, 1, 1}, - {&__pyx_n_s__y, __pyx_k__y, sizeof(__pyx_k__y), 0, 0, 1, 1}, + {&__pyx_kp_s_Cannot_convert_s_to_string, __pyx_k_Cannot_convert_s_to_string, sizeof(__pyx_k_Cannot_convert_s_to_string), 0, 0, 1, 0}, + {&__pyx_kp_s_Cannot_figure_out_pairs_from_s, __pyx_k_Cannot_figure_out_pairs_from_s, sizeof(__pyx_k_Cannot_figure_out_pairs_from_s), 0, 0, 1, 0}, + {&__pyx_n_s_IndexError, __pyx_k_IndexError, sizeof(__pyx_k_IndexError), 0, 0, 1, 1}, + {&__pyx_kp_s_Index_s_out_of_range, __pyx_k_Index_s_out_of_range, sizeof(__pyx_k_Index_s_out_of_range), 0, 0, 1, 0}, + {&__pyx_kp_s_Misc_dat, __pyx_k_Misc_dat, sizeof(__pyx_k_Misc_dat), 0, 0, 1, 0}, + {&__pyx_n_s_NotImplementedError, __pyx_k_NotImplementedError, sizeof(__pyx_k_NotImplementedError), 0, 0, 1, 1}, + {&__pyx_kp_s_Source_dat, __pyx_k_Source_dat, sizeof(__pyx_k_Source_dat), 0, 0, 1, 0}, + {&__pyx_kp_s_TargetColl_dat, __pyx_k_TargetColl_dat, sizeof(__pyx_k_TargetColl_dat), 0, 0, 1, 0}, + {&__pyx_kp_s_TargetInd_dat, __pyx_k_TargetInd_dat, sizeof(__pyx_k_TargetInd_dat), 0, 0, 1, 0}, + {&__pyx_n_s_TypeError, __pyx_k_TypeError, sizeof(__pyx_k_TypeError), 0, 0, 1, 1}, + {&__pyx_kp_s_UTF_8, __pyx_k_UTF_8, sizeof(__pyx_k_UTF_8), 0, 0, 1, 0}, + {&__pyx_n_s_ValueError, __pyx_k_ValueError, sizeof(__pyx_k_ValueError), 0, 0, 1, 1}, + {&__pyx_kp_s_Vocab_dat, __pyx_k_Vocab_dat, sizeof(__pyx_k_Vocab_dat), 0, 0, 1, 0}, + {&__pyx_kp_s__2, __pyx_k__2, sizeof(__pyx_k__2), 0, 0, 1, 0}, + {&__pyx_kp_s__3, __pyx_k__3, sizeof(__pyx_k__3), 0, 0, 1, 0}, + {&__pyx_kp_s__7, __pyx_k__7, sizeof(__pyx_k__7), 0, 0, 1, 0}, + {&__pyx_kp_s__9, __pyx_k__9, sizeof(__pyx_k__9), 0, 0, 1, 0}, + {&__pyx_n_s_alignment, __pyx_k_alignment, sizeof(__pyx_k_alignment), 0, 0, 1, 1}, + {&__pyx_n_s_append, __pyx_k_append, sizeof(__pyx_k_append), 0, 0, 1, 1}, + {&__pyx_n_s_args, __pyx_k_args, sizeof(__pyx_k_args), 0, 0, 1, 1}, + {&__pyx_n_s_as_tuple, __pyx_k_as_tuple, sizeof(__pyx_k_as_tuple), 0, 0, 1, 1}, + {&__pyx_kp_s_binphr_idx, __pyx_k_binphr_idx, sizeof(__pyx_k_binphr_idx), 0, 0, 1, 0}, + {&__pyx_kp_s_binphr_srctree, __pyx_k_binphr_srctree, sizeof(__pyx_k_binphr_srctree), 0, 0, 1, 0}, + {&__pyx_kp_s_binphr_srctree_wa, __pyx_k_binphr_srctree_wa, sizeof(__pyx_k_binphr_srctree_wa), 0, 0, 1, 0}, + {&__pyx_kp_s_binphr_srcvoc, __pyx_k_binphr_srcvoc, sizeof(__pyx_k_binphr_srcvoc), 0, 0, 1, 0}, + {&__pyx_kp_s_binphr_tgtdata, __pyx_k_binphr_tgtdata, sizeof(__pyx_k_binphr_tgtdata), 0, 0, 1, 0}, + {&__pyx_kp_s_binphr_tgtdata_wa, __pyx_k_binphr_tgtdata_wa, sizeof(__pyx_k_binphr_tgtdata_wa), 0, 0, 1, 0}, + {&__pyx_kp_s_binphr_tgtvoc, __pyx_k_binphr_tgtvoc, sizeof(__pyx_k_binphr_tgtvoc), 0, 0, 1, 0}, + {&__pyx_n_s_canLoad, __pyx_k_canLoad, sizeof(__pyx_k_canLoad), 0, 0, 1, 1}, + {&__pyx_n_s_chain, __pyx_k_chain, sizeof(__pyx_k_chain), 0, 0, 1, 1}, + {&__pyx_n_s_close, __pyx_k_close, sizeof(__pyx_k_close), 0, 0, 1, 1}, + {&__pyx_n_s_cmp, __pyx_k_cmp, sizeof(__pyx_k_cmp), 0, 0, 1, 1}, + {&__pyx_n_s_converter, __pyx_k_converter, sizeof(__pyx_k_converter), 0, 0, 1, 1}, + {&__pyx_kp_s_d_d, __pyx_k_d_d, sizeof(__pyx_k_d_d), 0, 0, 1, 0}, + {&__pyx_n_s_delimiters, __pyx_k_delimiters, sizeof(__pyx_k_delimiters), 0, 0, 1, 1}, + {&__pyx_n_s_desc, __pyx_k_desc, sizeof(__pyx_k_desc), 0, 0, 1, 1}, + {&__pyx_n_s_desc_locals_lambda, __pyx_k_desc_locals_lambda, sizeof(__pyx_k_desc_locals_lambda), 0, 0, 1, 1}, + {&__pyx_n_s_encode, __pyx_k_encode, sizeof(__pyx_k_encode), 0, 0, 1, 1}, + {&__pyx_n_s_extend, __pyx_k_extend, sizeof(__pyx_k_extend), 0, 0, 1, 1}, + {&__pyx_kp_s_home_proycon_work_mosesdecoder, __pyx_k_home_proycon_work_mosesdecoder, sizeof(__pyx_k_home_proycon_work_mosesdecoder), 0, 0, 1, 0}, + {&__pyx_n_s_import, __pyx_k_import, sizeof(__pyx_k_import), 0, 0, 1, 1}, + {&__pyx_n_s_init, __pyx_k_init, sizeof(__pyx_k_init), 0, 0, 1, 1}, + {&__pyx_n_s_isfile, __pyx_k_isfile, sizeof(__pyx_k_isfile), 0, 0, 1, 1}, + {&__pyx_n_s_itertools, __pyx_k_itertools, sizeof(__pyx_k_itertools), 0, 0, 1, 1}, + {&__pyx_n_s_join, __pyx_k_join, sizeof(__pyx_k_join), 0, 0, 1, 1}, + {&__pyx_n_s_key, __pyx_k_key, sizeof(__pyx_k_key), 0, 0, 1, 1}, + {&__pyx_n_s_lhs, __pyx_k_lhs, sizeof(__pyx_k_lhs), 0, 0, 1, 1}, + {&__pyx_n_s_lhs_first, __pyx_k_lhs_first, sizeof(__pyx_k_lhs_first), 0, 0, 1, 1}, + {&__pyx_n_s_limit, __pyx_k_limit, sizeof(__pyx_k_limit), 0, 0, 1, 1}, + {&__pyx_n_s_line, __pyx_k_line, sizeof(__pyx_k_line), 0, 0, 1, 1}, + {&__pyx_n_s_load, __pyx_k_load, sizeof(__pyx_k_load), 0, 0, 1, 1}, + {&__pyx_n_s_log, __pyx_k_log, sizeof(__pyx_k_log), 0, 0, 1, 1}, + {&__pyx_n_s_main, __pyx_k_main, sizeof(__pyx_k_main), 0, 0, 1, 1}, + {&__pyx_n_s_math, __pyx_k_math, sizeof(__pyx_k_math), 0, 0, 1, 1}, + {&__pyx_n_s_moses_dictree, __pyx_k_moses_dictree, sizeof(__pyx_k_moses_dictree), 0, 0, 1, 1}, + {&__pyx_n_s_nscores, __pyx_k_nscores, sizeof(__pyx_k_nscores), 0, 0, 1, 1}, + {&__pyx_n_s_os, __pyx_k_os, sizeof(__pyx_k_os), 0, 0, 1, 1}, + {&__pyx_n_s_path, __pyx_k_path, sizeof(__pyx_k_path), 0, 0, 1, 1}, + {&__pyx_n_s_pyx_vtable, __pyx_k_pyx_vtable, sizeof(__pyx_k_pyx_vtable), 0, 0, 1, 1}, + {&__pyx_n_s_query_locals_lambda, __pyx_k_query_locals_lambda, sizeof(__pyx_k_query_locals_lambda), 0, 0, 1, 1}, + {&__pyx_n_s_range, __pyx_k_range, sizeof(__pyx_k_range), 0, 0, 1, 1}, + {&__pyx_n_s_reversed, __pyx_k_reversed, sizeof(__pyx_k_reversed), 0, 0, 1, 1}, + {&__pyx_n_s_rhs, __pyx_k_rhs, sizeof(__pyx_k_rhs), 0, 0, 1, 1}, + {&__pyx_kp_s_s_does_not_seem_to_be_a_valid_t, __pyx_k_s_does_not_seem_to_be_a_valid_t, sizeof(__pyx_k_s_does_not_seem_to_be_a_valid_t), 0, 0, 1, 0}, + {&__pyx_kp_s_s_doesn_t_seem_a_valid_binary_t, __pyx_k_s_doesn_t_seem_a_valid_binary_t, sizeof(__pyx_k_s_doesn_t_seem_a_valid_binary_t), 0, 0, 1, 0}, + {&__pyx_kp_s_s_s, __pyx_k_s_s, sizeof(__pyx_k_s_s), 0, 0, 1, 0}, + {&__pyx_n_s_scores, __pyx_k_scores, sizeof(__pyx_k_scores), 0, 0, 1, 1}, + {&__pyx_n_s_send, __pyx_k_send, sizeof(__pyx_k_send), 0, 0, 1, 1}, + {&__pyx_n_s_sort, __pyx_k_sort, sizeof(__pyx_k_sort), 0, 0, 1, 1}, + {&__pyx_n_s_source, __pyx_k_source, sizeof(__pyx_k_source), 0, 0, 1, 1}, + {&__pyx_n_s_split, __pyx_k_split, sizeof(__pyx_k_split), 0, 0, 1, 1}, + {&__pyx_n_s_staticmethod, __pyx_k_staticmethod, sizeof(__pyx_k_staticmethod), 0, 0, 1, 1}, + {&__pyx_n_s_stem, __pyx_k_stem, sizeof(__pyx_k_stem), 0, 0, 1, 1}, + {&__pyx_n_s_super, __pyx_k_super, sizeof(__pyx_k_super), 0, 0, 1, 1}, + {&__pyx_n_s_tableLimit, __pyx_k_tableLimit, sizeof(__pyx_k_tableLimit), 0, 0, 1, 1}, + {&__pyx_n_s_targets, __pyx_k_targets, sizeof(__pyx_k_targets), 0, 0, 1, 1}, + {&__pyx_n_s_test, __pyx_k_test, sizeof(__pyx_k_test), 0, 0, 1, 1}, + {&__pyx_n_s_throw, __pyx_k_throw, sizeof(__pyx_k_throw), 0, 0, 1, 1}, + {&__pyx_n_s_values, __pyx_k_values, sizeof(__pyx_k_values), 0, 0, 1, 1}, + {&__pyx_n_s_wa, __pyx_k_wa, sizeof(__pyx_k_wa), 0, 0, 1, 1}, + {&__pyx_n_s_x, __pyx_k_x, sizeof(__pyx_k_x), 0, 0, 1, 1}, + {&__pyx_n_s_xrange, __pyx_k_xrange, sizeof(__pyx_k_xrange), 0, 0, 1, 1}, + {&__pyx_n_s_y, __pyx_k_y, sizeof(__pyx_k_y), 0, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0} }; static int __Pyx_InitCachedBuiltins(void) { - __pyx_builtin_staticmethod = __Pyx_GetName(__pyx_b, __pyx_n_s__staticmethod); if (!__pyx_builtin_staticmethod) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_TypeError = __Pyx_GetName(__pyx_b, __pyx_n_s__TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_IndexError = __Pyx_GetName(__pyx_b, __pyx_n_s__IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_reversed = __Pyx_GetName(__pyx_b, __pyx_n_s__reversed); if (!__pyx_builtin_reversed) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_super = __Pyx_GetName(__pyx_b, __pyx_n_s__super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_ValueError = __Pyx_GetName(__pyx_b, __pyx_n_s__ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __pyx_builtin_NotImplementedError = __Pyx_GetName(__pyx_b, __pyx_n_s__NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_staticmethod = __Pyx_GetBuiltinName(__pyx_n_s_staticmethod); if (!__pyx_builtin_staticmethod) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_TypeError = __Pyx_GetBuiltinName(__pyx_n_s_TypeError); if (!__pyx_builtin_TypeError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_IndexError = __Pyx_GetBuiltinName(__pyx_n_s_IndexError); if (!__pyx_builtin_IndexError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 48; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_reversed = __Pyx_GetBuiltinName(__pyx_n_s_reversed); if (!__pyx_builtin_reversed) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 58; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_super = __Pyx_GetBuiltinName(__pyx_n_s_super); if (!__pyx_builtin_super) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 116; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_ValueError = __Pyx_GetBuiltinName(__pyx_n_s_ValueError); if (!__pyx_builtin_ValueError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 120; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_NotImplementedError = __Pyx_GetBuiltinName(__pyx_n_s_NotImplementedError); if (!__pyx_builtin_NotImplementedError) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 189; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if PY_MAJOR_VERSION >= 3 - __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #else - __pyx_builtin_xrange = __Pyx_GetName(__pyx_b, __pyx_n_s__xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_xrange = __Pyx_GetBuiltinName(__pyx_n_s_xrange); if (!__pyx_builtin_xrange) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 254; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #endif - __pyx_builtin_range = __Pyx_GetName(__pyx_b, __pyx_n_s__range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_builtin_range = __Pyx_GetBuiltinName(__pyx_n_s_range); if (!__pyx_builtin_range) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 280; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -12141,14 +11255,11 @@ static int __Pyx_InitCachedConstants(void) { * elif isinstance(data, unicode): * return data.encode('UTF-8') # <<<<<<<<<<<<<< * raise TypeError('Cannot convert %s to string' % type(data)) - * + * */ - __pyx_k_tuple_2 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_2); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_1)); - PyTuple_SET_ITEM(__pyx_k_tuple_2, 0, ((PyObject *)__pyx_kp_s_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_1)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_2)); + __pyx_tuple_ = PyTuple_Pack(1, __pyx_kp_s_UTF_8); if (unlikely(!__pyx_tuple_)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 20; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple_); + __Pyx_GIVEREF(__pyx_tuple_); /* "moses/dictree.pyx":114 * pairs = [] @@ -12157,54 +11268,33 @@ static int __Pyx_InitCachedConstants(void) { * pairs.append((int(s), int(t))) * super(Alignment, self).__init__(pairs) */ - __pyx_k_tuple_9 = PyTuple_New(1); if (unlikely(!__pyx_k_tuple_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_9); - __Pyx_INCREF(((PyObject *)__pyx_kp_s_8)); - PyTuple_SET_ITEM(__pyx_k_tuple_9, 0, ((PyObject *)__pyx_kp_s_8)); - __Pyx_GIVEREF(((PyObject *)__pyx_kp_s_8)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_9)); + __pyx_tuple__4 = PyTuple_Pack(1, __pyx_kp_s__3); if (unlikely(!__pyx_tuple__4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 114; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__4); + __Pyx_GIVEREF(__pyx_tuple__4); /* "moses/dictree.pyx":156 - * + * * @staticmethod * def desc(x, y, key = lambda r: r.scores[0]): # <<<<<<<<<<<<<< * """Returns the sign of key(y) - key(x). * Can only be used if scores is not an empty vector as */ - __pyx_k_tuple_34 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_34)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_34); - __Pyx_INCREF(((PyObject *)__pyx_n_s__x)); - PyTuple_SET_ITEM(__pyx_k_tuple_34, 0, ((PyObject *)__pyx_n_s__x)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__x)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__y)); - PyTuple_SET_ITEM(__pyx_k_tuple_34, 1, ((PyObject *)__pyx_n_s__y)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__y)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__key)); - PyTuple_SET_ITEM(__pyx_k_tuple_34, 2, ((PyObject *)__pyx_n_s__key)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__key)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_34)); - __pyx_k_codeobj_35 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_34, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_36, __pyx_n_s__desc, 156, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_35)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__12 = PyTuple_Pack(3, __pyx_n_s_x, __pyx_n_s_y, __pyx_n_s_key); if (unlikely(!__pyx_tuple__12)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__12); + __Pyx_GIVEREF(__pyx_tuple__12); + __pyx_codeobj__13 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__12, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_proycon_work_mosesdecoder, __pyx_n_s_desc, 156, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__13)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "moses/dictree.pyx":349 * return results - * + * * def load(path, nscores, limit): # <<<<<<<<<<<<<< * """Finds out the correct implementation depending on the content of 'path' and returns the appropriate dictionary tree.""" * if PhraseDictionaryTree.canLoad(path, False): */ - __pyx_k_tuple_37 = PyTuple_New(3); if (unlikely(!__pyx_k_tuple_37)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_k_tuple_37); - __Pyx_INCREF(((PyObject *)__pyx_n_s__path)); - PyTuple_SET_ITEM(__pyx_k_tuple_37, 0, ((PyObject *)__pyx_n_s__path)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__path)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__nscores)); - PyTuple_SET_ITEM(__pyx_k_tuple_37, 1, ((PyObject *)__pyx_n_s__nscores)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__nscores)); - __Pyx_INCREF(((PyObject *)__pyx_n_s__limit)); - PyTuple_SET_ITEM(__pyx_k_tuple_37, 2, ((PyObject *)__pyx_n_s__limit)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__limit)); - __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_37)); - __pyx_k_codeobj_38 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_k_tuple_37, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_36, __pyx_n_s__load, 349, __pyx_empty_bytes); if (unlikely(!__pyx_k_codeobj_38)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_tuple__14 = PyTuple_Pack(3, __pyx_n_s_path, __pyx_n_s_nscores, __pyx_n_s_limit); if (unlikely(!__pyx_tuple__14)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_GOTREF(__pyx_tuple__14); + __Pyx_GIVEREF(__pyx_tuple__14); + __pyx_codeobj__15 = (PyObject*)__Pyx_PyCode_New(3, 0, 3, 0, 0, __pyx_empty_bytes, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_tuple__14, __pyx_empty_tuple, __pyx_empty_tuple, __pyx_kp_s_home_proycon_work_mosesdecoder, __pyx_n_s_load, 349, __pyx_empty_bytes); if (unlikely(!__pyx_codeobj__15)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_RefNannyFinishContext(); return 0; __pyx_L1_error:; @@ -12214,12 +11304,12 @@ static int __Pyx_InitCachedConstants(void) { static int __Pyx_InitGlobals(void) { if (__Pyx_InitStrings(__pyx_string_tab) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; - __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + __pyx_int_0 = PyInt_FromLong(0); if (unlikely(!__pyx_int_0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_1 = PyInt_FromLong(1); if (unlikely(!__pyx_int_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_2 = PyInt_FromLong(2); if (unlikely(!__pyx_int_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_3 = PyInt_FromLong(3); if (unlikely(!__pyx_int_3)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_4 = PyInt_FromLong(4); if (unlikely(!__pyx_int_4)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_int_5 = PyInt_FromLong(5); if (unlikely(!__pyx_int_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} return 0; __pyx_L1_error:; return -1; @@ -12235,6 +11325,9 @@ PyMODINIT_FUNC PyInit_dictree(void) { PyObject *__pyx_t_1 = NULL; PyObject *__pyx_t_2 = NULL; + int __pyx_lineno = 0; + const char *__pyx_filename = NULL; + int __pyx_clineno = 0; __Pyx_RefNannyDeclarations #if CYTHON_REFNANNY __Pyx_RefNanny = __Pyx_RefNannyImportAPI("refnanny"); @@ -12272,6 +11365,8 @@ PyMODINIT_FUNC PyInit_dictree(void) __pyx_m = PyModule_Create(&__pyx_moduledef); #endif if (unlikely(!__pyx_m)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_d = PyModule_GetDict(__pyx_m); if (unlikely(!__pyx_d)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + Py_INCREF(__pyx_d); __pyx_b = PyImport_AddModule(__Pyx_NAMESTR(__Pyx_BUILTIN_MODULE_NAME)); if (unlikely(!__pyx_b)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} #if CYTHON_COMPILING_IN_PYPY Py_INCREF(__pyx_b); @@ -12279,9 +11374,20 @@ PyMODINIT_FUNC PyInit_dictree(void) if (__Pyx_SetAttrString(__pyx_m, "__builtins__", __pyx_b) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; /*--- Initialize various global constants etc. ---*/ if (unlikely(__Pyx_InitGlobals() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #if PY_MAJOR_VERSION < 3 && (__PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT) + if (__Pyx_init_sys_getdefaultencoding_params() < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + #endif if (__pyx_module_is_main_moses__dictree) { - if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s____main__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + if (__Pyx_SetAttrString(__pyx_m, "__name__", __pyx_n_s_main) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;}; + } + #if PY_MAJOR_VERSION >= 3 + { + PyObject *modules = PyImport_GetModuleDict(); if (unlikely(!modules)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (!PyDict_GetItemString(modules, "moses.dictree")) { + if (unlikely(PyDict_SetItemString(modules, "moses.dictree", __pyx_m) < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + } } + #endif /*--- Builtin init code ---*/ if (unlikely(__Pyx_InitCachedBuiltins() < 0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /*--- Constants init code ---*/ @@ -12291,6 +11397,7 @@ PyMODINIT_FUNC PyInit_dictree(void) /*--- Function export code ---*/ /*--- Type init code ---*/ if (PyType_Ready(&__pyx_type_5moses_7dictree_Production) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_5moses_7dictree_Production.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5moses_7dictree_Production, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 23; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -12305,14 +11412,17 @@ PyMODINIT_FUNC PyInit_dictree(void) __pyx_ptype_5moses_7dictree_Production = &__pyx_type_5moses_7dictree_Production; __pyx_type_5moses_7dictree_Alignment.tp_base = (&PyList_Type); if (PyType_Ready(&__pyx_type_5moses_7dictree_Alignment) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_5moses_7dictree_Alignment.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "Alignment", (PyObject *)&__pyx_type_5moses_7dictree_Alignment) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 104; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5moses_7dictree_Alignment = &__pyx_type_5moses_7dictree_Alignment; __pyx_type_5moses_7dictree_FValues.tp_base = (&PyList_Type); if (PyType_Ready(&__pyx_type_5moses_7dictree_FValues) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_5moses_7dictree_FValues.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "FValues", (PyObject *)&__pyx_type_5moses_7dictree_FValues) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 125; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5moses_7dictree_FValues = &__pyx_type_5moses_7dictree_FValues; __pyx_type_5moses_7dictree_TargetProduction.tp_base = __pyx_ptype_5moses_7dictree_Production; if (PyType_Ready(&__pyx_type_5moses_7dictree_TargetProduction) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_5moses_7dictree_TargetProduction.tp_print = 0; #if CYTHON_COMPILING_IN_CPYTHON { PyObject *wrapper = __Pyx_GetAttrString((PyObject *)&__pyx_type_5moses_7dictree_TargetProduction, "__init__"); if (unlikely(!wrapper)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 137; __pyx_clineno = __LINE__; goto __pyx_L1_error;} @@ -12337,15 +11447,18 @@ PyMODINIT_FUNC PyInit_dictree(void) __pyx_ptype_5moses_7dictree_TargetProduction = &__pyx_type_5moses_7dictree_TargetProduction; __pyx_type_5moses_7dictree_QueryResult.tp_base = (&PyList_Type); if (PyType_Ready(&__pyx_type_5moses_7dictree_QueryResult) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_5moses_7dictree_QueryResult.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "QueryResult", (PyObject *)&__pyx_type_5moses_7dictree_QueryResult) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 175; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5moses_7dictree_QueryResult = &__pyx_type_5moses_7dictree_QueryResult; if (PyType_Ready(&__pyx_type_5moses_7dictree_DictionaryTree) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_5moses_7dictree_DictionaryTree.tp_print = 0; if (__Pyx_SetAttrString(__pyx_m, "DictionaryTree", (PyObject *)&__pyx_type_5moses_7dictree_DictionaryTree) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 184; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5moses_7dictree_DictionaryTree = &__pyx_type_5moses_7dictree_DictionaryTree; __pyx_vtabptr_5moses_7dictree_PhraseDictionaryTree = &__pyx_vtable_5moses_7dictree_PhraseDictionaryTree; __pyx_vtable_5moses_7dictree_PhraseDictionaryTree.getTargetProduction = (struct __pyx_obj_5moses_7dictree_TargetProduction *(*)(struct __pyx_obj_5moses_7dictree_PhraseDictionaryTree *, struct Moses::StringTgtCand &, struct __pyx_opt_args_5moses_7dictree_20PhraseDictionaryTree_getTargetProduction *__pyx_optional_args))__pyx_f_5moses_7dictree_20PhraseDictionaryTree_getTargetProduction; __pyx_type_5moses_7dictree_PhraseDictionaryTree.tp_base = __pyx_ptype_5moses_7dictree_DictionaryTree; if (PyType_Ready(&__pyx_type_5moses_7dictree_PhraseDictionaryTree) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_5moses_7dictree_PhraseDictionaryTree.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_5moses_7dictree_PhraseDictionaryTree.tp_dict, __pyx_vtabptr_5moses_7dictree_PhraseDictionaryTree) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "PhraseDictionaryTree", (PyObject *)&__pyx_type_5moses_7dictree_PhraseDictionaryTree) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 202; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5moses_7dictree_PhraseDictionaryTree = &__pyx_type_5moses_7dictree_PhraseDictionaryTree; @@ -12353,26 +11466,36 @@ PyMODINIT_FUNC PyInit_dictree(void) __pyx_vtable_5moses_7dictree_OnDiskWrapper.getSourceProduction = (struct __pyx_obj_5moses_7dictree_Production *(*)(struct __pyx_obj_5moses_7dictree_OnDiskWrapper *, std::vector))__pyx_f_5moses_7dictree_13OnDiskWrapper_getSourceProduction; __pyx_type_5moses_7dictree_OnDiskWrapper.tp_base = __pyx_ptype_5moses_7dictree_DictionaryTree; if (PyType_Ready(&__pyx_type_5moses_7dictree_OnDiskWrapper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_5moses_7dictree_OnDiskWrapper.tp_print = 0; if (__Pyx_SetVtable(__pyx_type_5moses_7dictree_OnDiskWrapper.tp_dict, __pyx_vtabptr_5moses_7dictree_OnDiskWrapper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} if (__Pyx_SetAttrString(__pyx_m, "OnDiskWrapper", (PyObject *)&__pyx_type_5moses_7dictree_OnDiskWrapper) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 290; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_ptype_5moses_7dictree_OnDiskWrapper = &__pyx_type_5moses_7dictree_OnDiskWrapper; if (PyType_Ready(&__pyx_type_5moses_7dictree___pyx_scope_struct____iter__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 50; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_5moses_7dictree___pyx_scope_struct____iter__.tp_print = 0; __pyx_ptype_5moses_7dictree___pyx_scope_struct____iter__ = &__pyx_type_5moses_7dictree___pyx_scope_struct____iter__; if (PyType_Ready(&__pyx_type_5moses_7dictree___pyx_scope_struct_1___str__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 122; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_5moses_7dictree___pyx_scope_struct_1___str__.tp_print = 0; __pyx_ptype_5moses_7dictree___pyx_scope_struct_1___str__ = &__pyx_type_5moses_7dictree___pyx_scope_struct_1___str__; if (PyType_Ready(&__pyx_type_5moses_7dictree___pyx_scope_struct_2_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 123; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_5moses_7dictree___pyx_scope_struct_2_genexpr.tp_print = 0; __pyx_ptype_5moses_7dictree___pyx_scope_struct_2_genexpr = &__pyx_type_5moses_7dictree___pyx_scope_struct_2_genexpr; if (PyType_Ready(&__pyx_type_5moses_7dictree___pyx_scope_struct_3___str__) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 134; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_5moses_7dictree___pyx_scope_struct_3___str__.tp_print = 0; __pyx_ptype_5moses_7dictree___pyx_scope_struct_3___str__ = &__pyx_type_5moses_7dictree___pyx_scope_struct_3___str__; if (PyType_Ready(&__pyx_type_5moses_7dictree___pyx_scope_struct_4_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 135; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_5moses_7dictree___pyx_scope_struct_4_genexpr.tp_print = 0; __pyx_ptype_5moses_7dictree___pyx_scope_struct_4_genexpr = &__pyx_type_5moses_7dictree___pyx_scope_struct_4_genexpr; if (PyType_Ready(&__pyx_type_5moses_7dictree___pyx_scope_struct_5_query) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_5moses_7dictree___pyx_scope_struct_5_query.tp_print = 0; __pyx_ptype_5moses_7dictree___pyx_scope_struct_5_query = &__pyx_type_5moses_7dictree___pyx_scope_struct_5_query; if (PyType_Ready(&__pyx_type_5moses_7dictree___pyx_scope_struct_6_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 271; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_5moses_7dictree___pyx_scope_struct_6_genexpr.tp_print = 0; __pyx_ptype_5moses_7dictree___pyx_scope_struct_6_genexpr = &__pyx_type_5moses_7dictree___pyx_scope_struct_6_genexpr; if (PyType_Ready(&__pyx_type_5moses_7dictree___pyx_scope_struct_7_query) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 316; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_5moses_7dictree___pyx_scope_struct_7_query.tp_print = 0; __pyx_ptype_5moses_7dictree___pyx_scope_struct_7_query = &__pyx_type_5moses_7dictree___pyx_scope_struct_7_query; if (PyType_Ready(&__pyx_type_5moses_7dictree___pyx_scope_struct_8_genexpr) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 344; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_type_5moses_7dictree___pyx_scope_struct_8_genexpr.tp_print = 0; __pyx_ptype_5moses_7dictree___pyx_scope_struct_8_genexpr = &__pyx_type_5moses_7dictree___pyx_scope_struct_8_genexpr; /*--- Type import code ---*/ /*--- Variable import code ---*/ @@ -12388,19 +11511,15 @@ PyMODINIT_FUNC PyInit_dictree(void) */ __pyx_t_1 = PyList_New(1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_INCREF(((PyObject *)__pyx_n_s__chain)); - PyList_SET_ITEM(__pyx_t_1, 0, ((PyObject *)__pyx_n_s__chain)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__chain)); - __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__itertools), ((PyObject *)__pyx_t_1), -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_INCREF(__pyx_n_s_chain); + PyList_SET_ITEM(__pyx_t_1, 0, __pyx_n_s_chain); + __Pyx_GIVEREF(__pyx_n_s_chain); + __pyx_t_2 = __Pyx_Import(__pyx_n_s_itertools, __pyx_t_1, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_GetAttr(__pyx_t_2, __pyx_n_s__chain); - if (__pyx_t_1 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__chain); - if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; + __pyx_t_1 = __Pyx_ImportFrom(__pyx_t_2, __pyx_n_s_chain); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__chain, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_chain, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 5; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; @@ -12411,224 +11530,239 @@ PyMODINIT_FUNC PyInit_dictree(void) * import cython * cimport cdictree */ - __pyx_t_2 = __Pyx_Import(((PyObject *)__pyx_n_s__os), 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_Import(__pyx_n_s_os, 0, -1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__os, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_os, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 6; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "moses/dictree.pyx":10 * cimport cdictree * cimport condiskpt * from math import log # <<<<<<<<<<<<<< - * + * * cpdef int fsign(float x): */ __pyx_t_2 = PyList_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - __Pyx_INCREF(((PyObject *)__pyx_n_s__log)); - PyList_SET_ITEM(__pyx_t_2, 0, ((PyObject *)__pyx_n_s__log)); - __Pyx_GIVEREF(((PyObject *)__pyx_n_s__log)); - __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__math), ((PyObject *)__pyx_t_2), -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_INCREF(__pyx_n_s_log); + PyList_SET_ITEM(__pyx_t_2, 0, __pyx_n_s_log); + __Pyx_GIVEREF(__pyx_n_s_log); + __pyx_t_1 = __Pyx_Import(__pyx_n_s_math, __pyx_t_2, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - __pyx_t_2 = PyObject_GetAttr(__pyx_t_1, __pyx_n_s__log); - if (__pyx_t_2 == NULL) { - if (PyErr_ExceptionMatches(PyExc_AttributeError)) __Pyx_RaiseImportError(__pyx_n_s__log); - if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - } + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + __pyx_t_2 = __Pyx_ImportFrom(__pyx_t_1, __pyx_n_s_log); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__log, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_log, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 10; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - /* "moses/dictree.pyx":72 - * return repr(self.as_tuple()) - * - * def as_tuple(self, lhs_first = False): # <<<<<<<<<<<<<< - * """ - * Returns a tuple (lhs) + rhs or rhs + (lhs) depending on the flag 'lhs_first'. - */ - __pyx_t_1 = __Pyx_PyBool_FromLong(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 72; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(__pyx_t_1); - __pyx_k_7 = __pyx_t_1; - __Pyx_GIVEREF(__pyx_t_1); - __pyx_t_1 = 0; - /* "moses/dictree.pyx":144 * cdef readonly FValues scores - * + * * def __init__(self, rhs, scores, alignment = [], lhs = None): # <<<<<<<<<<<<<< * """ * :rhs right-hand side tokens (sequence of terminals and nonterminals) */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 144; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_k_12 = ((PyObject *)__pyx_t_1); + __pyx_k__5 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "moses/dictree.pyx":156 - * + * * @staticmethod * def desc(x, y, key = lambda r: r.scores[0]): # <<<<<<<<<<<<<< * """Returns the sign of key(y) - key(x). * Can only be used if scores is not an empty vector as */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5moses_7dictree_16TargetProduction_4desc_lambda1, 0, NULL, __pyx_n_s_33, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5moses_7dictree_4lambda1, 0, __pyx_n_s_desc_locals_lambda, NULL, __pyx_n_s_moses_dictree, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_k_13 = __pyx_t_1; + __pyx_k__6 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "moses/dictree.pyx":155 * self.alignment = Alignment(alignment) - * + * * @staticmethod # <<<<<<<<<<<<<< * def desc(x, y, key = lambda r: r.scores[0]): * """Returns the sign of key(y) - key(x). */ - __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5moses_7dictree_16TargetProduction_3desc, NULL, __pyx_n_s_33); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_5moses_7dictree_16TargetProduction_3desc, NULL, __pyx_n_s_moses_dictree); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(__pyx_builtin_staticmethod, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_5moses_7dictree_TargetProduction->tp_dict, __pyx_n_s__desc, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_5moses_7dictree_TargetProduction->tp_dict, __pyx_n_s_desc, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_5moses_7dictree_TargetProduction); /* "moses/dictree.pyx":156 - * + * * @staticmethod * def desc(x, y, key = lambda r: r.scores[0]): # <<<<<<<<<<<<<< * """Returns the sign of key(y) - key(x). * Can only be used if scores is not an empty vector as */ - __pyx_t_1 = __Pyx_GetName((PyObject *)__pyx_ptype_5moses_7dictree_TargetProduction, __pyx_n_s__desc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5moses_7dictree_TargetProduction, __pyx_n_s_desc); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); + + /* "moses/dictree.pyx":155 + * self.alignment = Alignment(alignment) + * + * @staticmethod # <<<<<<<<<<<<<< + * def desc(x, y, key = lambda r: r.scores[0]): + * """Returns the sign of key(y) - key(x). + */ __pyx_t_2 = PyTuple_New(1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); PyTuple_SET_ITEM(__pyx_t_2, 0, __pyx_t_1); __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = PyObject_Call(__pyx_builtin_staticmethod, ((PyObject *)__pyx_t_2), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_PyObject_Call(__pyx_builtin_staticmethod, __pyx_t_2, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 155; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_5moses_7dictree_TargetProduction->tp_dict, __pyx_n_s__desc, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; + if (PyDict_SetItem((PyObject *)__pyx_ptype_5moses_7dictree_TargetProduction->tp_dict, __pyx_n_s_desc, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 156; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_5moses_7dictree_TargetProduction); /* "moses/dictree.pyx":179 * cdef readonly Production source - * + * * def __init__(self, source, targets = []): # <<<<<<<<<<<<<< * super(QueryResult, self).__init__(targets) * self.source = source */ __pyx_t_1 = PyList_New(0); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 179; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_k_15 = ((PyObject *)__pyx_t_1); + __pyx_k__8 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "moses/dictree.pyx":187 - * + * * @classmethod * def canLoad(cls, path, bint wa = False): # <<<<<<<<<<<<<< * """Whether or not the path represents a valid table for that class.""" * raise NotImplementedError */ - __pyx_t_1 = __Pyx_GetName((PyObject *)__pyx_ptype_5moses_7dictree_DictionaryTree, __pyx_n_s__canLoad); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5moses_7dictree_DictionaryTree, __pyx_n_s_canLoad); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); + + /* "moses/dictree.pyx":186 + * cdef class DictionaryTree(object): + * + * @classmethod # <<<<<<<<<<<<<< + * def canLoad(cls, path, bint wa = False): + * """Whether or not the path represents a valid table for that class.""" + */ __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 186; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_5moses_7dictree_DictionaryTree->tp_dict, __pyx_n_s__canLoad, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_5moses_7dictree_DictionaryTree->tp_dict, __pyx_n_s_canLoad, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 187; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_5moses_7dictree_DictionaryTree); /* "moses/dictree.pyx":236 - * + * * @classmethod * def canLoad(cls, stem, bint wa = False): # <<<<<<<<<<<<<< * """This sanity check was added to the constructor, but you can access it from outside this class * to determine whether or not you are providing a valid stem to BinaryPhraseTable.""" */ - __pyx_t_2 = __Pyx_GetName((PyObject *)__pyx_ptype_5moses_7dictree_PhraseDictionaryTree, __pyx_n_s__canLoad); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5moses_7dictree_PhraseDictionaryTree, __pyx_n_s_canLoad); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); + + /* "moses/dictree.pyx":235 + * del self.tree + * + * @classmethod # <<<<<<<<<<<<<< + * def canLoad(cls, stem, bint wa = False): + * """This sanity check was added to the constructor, but you can access it from outside this class + */ __pyx_t_1 = __Pyx_Method_ClassMethod(__pyx_t_2); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 235; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_5moses_7dictree_PhraseDictionaryTree->tp_dict, __pyx_n_s__canLoad, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_5moses_7dictree_PhraseDictionaryTree->tp_dict, __pyx_n_s_canLoad, __pyx_t_1) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 236; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; PyType_Modified(__pyx_ptype_5moses_7dictree_PhraseDictionaryTree); /* "moses/dictree.pyx":258 * return TargetProduction(words, scores, wa) - * + * * def query(self, line, converter = lambda x: log(x), cmp = lambda x, y: fsign(y.scores[2] - x.scores[2]), key = None): # <<<<<<<<<<<<<< * """ * Returns a list of target productions that translate a given source production */ - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5moses_7dictree_20PhraseDictionaryTree_5query_lambda2, 0, NULL, __pyx_n_s_33, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5moses_7dictree_5lambda2, 0, __pyx_n_s_query_locals_lambda, NULL, __pyx_n_s_moses_dictree, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_k_25 = __pyx_t_1; + __pyx_k__10 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; - __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5moses_7dictree_20PhraseDictionaryTree_5query_1lambda3, 0, NULL, __pyx_n_s_33, NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_CyFunction_NewEx(&__pyx_mdef_5moses_7dictree_6lambda3, 0, __pyx_n_s_query_locals_lambda, NULL, __pyx_n_s_moses_dictree, PyModule_GetDict(__pyx_m), NULL); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 258; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); - __pyx_k_26 = __pyx_t_1; + __pyx_k__11 = __pyx_t_1; __Pyx_GIVEREF(__pyx_t_1); __pyx_t_1 = 0; /* "moses/dictree.pyx":305 - * + * * @classmethod * def canLoad(cls, stem, bint wa = False): # <<<<<<<<<<<<<< * return os.path.isfile(stem + "/Misc.dat") \ * and os.path.isfile(stem + "/Source.dat") \ */ - __pyx_t_1 = __Pyx_GetName((PyObject *)__pyx_ptype_5moses_7dictree_OnDiskWrapper, __pyx_n_s__canLoad); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_1 = __Pyx_GetNameInClass((PyObject *)__pyx_ptype_5moses_7dictree_OnDiskWrapper, __pyx_n_s_canLoad); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); + + /* "moses/dictree.pyx":304 + * self.finder = new condiskpt.OnDiskQuery(self.wrapper[0]) + * + * @classmethod # <<<<<<<<<<<<<< + * def canLoad(cls, stem, bint wa = False): + * return os.path.isfile(stem + "/Misc.dat") \ + */ __pyx_t_2 = __Pyx_Method_ClassMethod(__pyx_t_1); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 304; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0; - if (PyDict_SetItem((PyObject *)__pyx_ptype_5moses_7dictree_OnDiskWrapper->tp_dict, __pyx_n_s__canLoad, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem((PyObject *)__pyx_ptype_5moses_7dictree_OnDiskWrapper->tp_dict, __pyx_n_s_canLoad, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 305; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; PyType_Modified(__pyx_ptype_5moses_7dictree_OnDiskWrapper); /* "moses/dictree.pyx":349 * return results - * + * * def load(path, nscores, limit): # <<<<<<<<<<<<<< * """Finds out the correct implementation depending on the content of 'path' and returns the appropriate dictionary tree.""" * if PhraseDictionaryTree.canLoad(path, False): */ - __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5moses_7dictree_3load, NULL, __pyx_n_s_33); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __pyx_t_2 = PyCFunction_NewEx(&__pyx_mdef_5moses_7dictree_3load, NULL, __pyx_n_s_moses_dictree); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_2); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s__load, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + if (PyDict_SetItem(__pyx_d, __pyx_n_s_load, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 349; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; /* "moses/dictree.pyx":1 * # This module wraps phrase/rule tables # <<<<<<<<<<<<<< - * + * * from libcpp.string cimport string */ __pyx_t_2 = PyDict_New(); if (unlikely(!__pyx_t_2)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_GOTREF(((PyObject *)__pyx_t_2)); - if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_2)) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} - __Pyx_DECREF(((PyObject *)__pyx_t_2)); __pyx_t_2 = 0; + __Pyx_GOTREF(__pyx_t_2); + if (PyDict_SetItem(__pyx_d, __pyx_n_s_test, __pyx_t_2) < 0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} + __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0; - /* "vector.to_py":58 - * + /* "vector.to_py":63 + * * @cname("__pyx_convert_vector_to_py_OnDiskPt_3a__3a_AlignPair") * cdef object __pyx_convert_vector_to_py_OnDiskPt_3a__3a_AlignPair(vector[X]& v): # <<<<<<<<<<<<<< * return [X_to_py(v[i]) for i in range(v.size())] - * + * */ goto __pyx_L0; __pyx_L1_error:; @@ -12666,202 +11800,162 @@ static __Pyx_RefNannyAPIStruct *__Pyx_RefNannyImportAPI(const char *modname) { } #endif /* CYTHON_REFNANNY */ -static PyObject *__Pyx_GetName(PyObject *dict, PyObject *name) { - PyObject *result; - result = PyObject_GetAttr(dict, name); - if (!result) { - if (dict != __pyx_b) { - PyErr_Clear(); - result = PyObject_GetAttr(__pyx_b, name); - } - if (!result) { - PyErr_SetObject(PyExc_NameError, name); - } +static PyObject *__Pyx_GetBuiltinName(PyObject *name) { + PyObject* result = __Pyx_PyObject_GetAttrStr(__pyx_b, name); + if (unlikely(!result)) { + PyErr_Format(PyExc_NameError, +#if PY_MAJOR_VERSION >= 3 + "name '%U' is not defined", name); +#else + "name '%.200s' is not defined", PyString_AS_STRING(name)); +#endif } return result; } -static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Generic(PyObject *o, PyObject* j) { + PyObject *r; + if (!j) return NULL; + r = PyObject_GetItem(o, j); + Py_DECREF(j); + return r; +} +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_List_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON - PyObject *tmp_type, *tmp_value, *tmp_tb; - PyThreadState *tstate = PyThreadState_GET(); - tmp_type = tstate->curexc_type; - tmp_value = tstate->curexc_value; - tmp_tb = tstate->curexc_traceback; - tstate->curexc_type = type; - tstate->curexc_value = value; - tstate->curexc_traceback = tb; - Py_XDECREF(tmp_type); - Py_XDECREF(tmp_value); - Py_XDECREF(tmp_tb); + if (wraparound & unlikely(i < 0)) i += PyList_GET_SIZE(o); + if ((!boundscheck) || likely((0 <= i) & (i < PyList_GET_SIZE(o)))) { + PyObject *r = PyList_GET_ITEM(o, i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else - PyErr_Restore(type, value, tb); + return PySequence_GetItem(o, i); #endif } -static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Tuple_Fast(PyObject *o, Py_ssize_t i, + int wraparound, int boundscheck) { #if CYTHON_COMPILING_IN_CPYTHON - PyThreadState *tstate = PyThreadState_GET(); - *type = tstate->curexc_type; - *value = tstate->curexc_value; - *tb = tstate->curexc_traceback; - tstate->curexc_type = 0; - tstate->curexc_value = 0; - tstate->curexc_traceback = 0; + if (wraparound & unlikely(i < 0)) i += PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely((0 <= i) & (i < PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, i); + Py_INCREF(r); + return r; + } + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); #else - PyErr_Fetch(type, value, tb); + return PySequence_GetItem(o, i); #endif } - -#if PY_MAJOR_VERSION < 3 -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, - CYTHON_UNUSED PyObject *cause) { - Py_XINCREF(type); - if (!value || value == Py_None) - value = NULL; - else - Py_INCREF(value); - if (!tb || tb == Py_None) - tb = NULL; - else { - Py_INCREF(tb); - if (!PyTraceBack_Check(tb)) { - PyErr_SetString(PyExc_TypeError, - "raise: arg 3 must be a traceback or None"); - goto raise_error; +static CYTHON_INLINE PyObject *__Pyx_GetItemInt_Fast(PyObject *o, Py_ssize_t i, + int is_list, int wraparound, int boundscheck) { +#if CYTHON_COMPILING_IN_CPYTHON + if (is_list || PyList_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyList_GET_SIZE(o); + if ((!boundscheck) || (likely((n >= 0) & (n < PyList_GET_SIZE(o))))) { + PyObject *r = PyList_GET_ITEM(o, n); + Py_INCREF(r); + return r; } } - #if PY_VERSION_HEX < 0x02050000 - if (PyClass_Check(type)) { - #else - if (PyType_Check(type)) { - #endif -#if CYTHON_COMPILING_IN_PYPY - if (!value) { - Py_INCREF(Py_None); - value = Py_None; + else if (PyTuple_CheckExact(o)) { + Py_ssize_t n = ((!wraparound) | likely(i >= 0)) ? i : i + PyTuple_GET_SIZE(o); + if ((!boundscheck) || likely((n >= 0) & (n < PyTuple_GET_SIZE(o)))) { + PyObject *r = PyTuple_GET_ITEM(o, n); + Py_INCREF(r); + return r; } -#endif - PyErr_NormalizeException(&type, &value, &tb); } else { - if (value) { - PyErr_SetString(PyExc_TypeError, - "instance exception may not have a separate value"); - goto raise_error; - } - value = type; - #if PY_VERSION_HEX < 0x02050000 - if (PyInstance_Check(type)) { - type = (PyObject*) ((PyInstanceObject*)type)->in_class; - Py_INCREF(type); - } - else { - type = 0; - PyErr_SetString(PyExc_TypeError, - "raise: exception must be an old-style class or instance"); - goto raise_error; - } - #else - type = (PyObject*) Py_TYPE(type); - Py_INCREF(type); - if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { - PyErr_SetString(PyExc_TypeError, - "raise: exception class must be a subclass of BaseException"); - goto raise_error; + PySequenceMethods *m = Py_TYPE(o)->tp_as_sequence; + if (likely(m && m->sq_item)) { + if (wraparound && unlikely(i < 0) && likely(m->sq_length)) { + Py_ssize_t l = m->sq_length(o); + if (likely(l >= 0)) { + i += l; + } else { + if (PyErr_ExceptionMatches(PyExc_OverflowError)) + PyErr_Clear(); + else + return NULL; + } } - #endif + return m->sq_item(o, i); + } } - __Pyx_ErrRestore(type, value, tb); - return; -raise_error: - Py_XDECREF(value); - Py_XDECREF(type); - Py_XDECREF(tb); - return; -} -#else /* Python 3+ */ -static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { - PyObject* owned_instance = NULL; - if (tb == Py_None) { - tb = 0; - } else if (tb && !PyTraceBack_Check(tb)) { - PyErr_SetString(PyExc_TypeError, - "raise: arg 3 must be a traceback or None"); - goto bad; +#else + if (is_list || PySequence_Check(o)) { + return PySequence_GetItem(o, i); } - if (value == Py_None) - value = 0; - if (PyExceptionInstance_Check(type)) { - if (value) { - PyErr_SetString(PyExc_TypeError, - "instance exception may not have a separate value"); - goto bad; - } - value = type; - type = (PyObject*) Py_TYPE(value); - } else if (PyExceptionClass_Check(type)) { - PyObject *args; - if (!value) - args = PyTuple_New(0); - else if (PyTuple_Check(value)) { - Py_INCREF(value); - args = value; - } - else - args = PyTuple_Pack(1, value); - if (!args) - goto bad; - owned_instance = PyEval_CallObject(type, args); - Py_DECREF(args); - if (!owned_instance) - goto bad; - value = owned_instance; - if (!PyExceptionInstance_Check(value)) { - PyErr_Format(PyExc_TypeError, - "calling %R should have returned an instance of " - "BaseException, not %R", - type, Py_TYPE(value)); - goto bad; - } +#endif + return __Pyx_GetItemInt_Generic(o, PyInt_FromSsize_t(i)); +} + +static CYTHON_INLINE PyObject *__Pyx_GetModuleGlobalName(PyObject *name) { + PyObject *result; +#if CYTHON_COMPILING_IN_CPYTHON + result = PyDict_GetItem(__pyx_d, name); + if (result) { + Py_INCREF(result); } else { - PyErr_SetString(PyExc_TypeError, - "raise: exception class must be a subclass of BaseException"); - goto bad; +#else + result = PyObject_GetItem(__pyx_d, name); + if (!result) { + PyErr_Clear(); +#endif + result = __Pyx_GetBuiltinName(name); } - if (cause && cause != Py_None) { - PyObject *fixed_cause; - if (PyExceptionClass_Check(cause)) { - fixed_cause = PyObject_CallObject(cause, NULL); - if (fixed_cause == NULL) - goto bad; - } - else if (PyExceptionInstance_Check(cause)) { - fixed_cause = cause; - Py_INCREF(fixed_cause); - } - else { - PyErr_SetString(PyExc_TypeError, - "exception causes must derive from " - "BaseException"); - goto bad; - } - PyException_SetCause(value, fixed_cause); - } - PyErr_SetObject(type, value); - if (tb) { - PyThreadState *tstate = PyThreadState_GET(); - PyObject* tmp_tb = tstate->curexc_traceback; - if (tb != tmp_tb) { - Py_INCREF(tb); - tstate->curexc_traceback = tb; - Py_XDECREF(tmp_tb); - } + return result; +} + +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyObject_Call(PyObject *func, PyObject *arg, PyObject *kw) { + PyObject *result; + ternaryfunc call = func->ob_type->tp_call; + if (unlikely(!call)) + return PyObject_Call(func, arg, kw); +#if PY_VERSION_HEX >= 0x02060000 + if (unlikely(Py_EnterRecursiveCall((char*)" while calling a Python object"))) + return NULL; +#endif + result = (*call)(func, arg, kw); +#if PY_VERSION_HEX >= 0x02060000 + Py_LeaveRecursiveCall(); +#endif + if (unlikely(!result) && unlikely(!PyErr_Occurred())) { + PyErr_SetString( + PyExc_SystemError, + "NULL result without error in PyObject_Call"); } -bad: - Py_XDECREF(owned_instance); - return; + return result; } #endif +static void __Pyx_RaiseArgtupleInvalid( + const char* func_name, + int exact, + Py_ssize_t num_min, + Py_ssize_t num_max, + Py_ssize_t num_found) +{ + Py_ssize_t num_expected; + const char *more_or_less; + if (num_found < num_min) { + num_expected = num_min; + more_or_less = "at least"; + } else { + num_expected = num_max; + more_or_less = "at most"; + } + if (exact) { + more_or_less = "exactly"; + } + PyErr_Format(PyExc_TypeError, + "%.200s() takes %.8s %" CYTHON_FORMAT_SSIZE_T "d positional argument%.1s (%" CYTHON_FORMAT_SSIZE_T "d given)", + func_name, more_or_less, num_expected, + (num_expected == 1) ? "" : "s", num_found); +} + static void __Pyx_RaiseDoubleKeywordsError( const char* func_name, PyObject* kw_name) @@ -12961,12 +12055,12 @@ static int __Pyx_ParseOptionalKeywords( goto bad; invalid_keyword_type: PyErr_Format(PyExc_TypeError, - "%s() keywords must be strings", function_name); + "%.200s() keywords must be strings", function_name); goto bad; invalid_keyword: PyErr_Format(PyExc_TypeError, #if PY_MAJOR_VERSION < 3 - "%s() got an unexpected keyword argument '%s'", + "%.200s() got an unexpected keyword argument '%.200s'", function_name, PyString_AsString(key)); #else "%s() got an unexpected keyword argument '%U'", @@ -12976,30 +12070,207 @@ static int __Pyx_ParseOptionalKeywords( return -1; } -static void __Pyx_RaiseArgtupleInvalid( - const char* func_name, - int exact, - Py_ssize_t num_min, - Py_ssize_t num_max, - Py_ssize_t num_found) -{ - Py_ssize_t num_expected; - const char *more_or_less; - if (num_found < num_min) { - num_expected = num_min; - more_or_less = "at least"; +static CYTHON_INLINE void __Pyx_ErrRestore(PyObject *type, PyObject *value, PyObject *tb) { +#if CYTHON_COMPILING_IN_CPYTHON + PyObject *tmp_type, *tmp_value, *tmp_tb; + PyThreadState *tstate = PyThreadState_GET(); + tmp_type = tstate->curexc_type; + tmp_value = tstate->curexc_value; + tmp_tb = tstate->curexc_traceback; + tstate->curexc_type = type; + tstate->curexc_value = value; + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_type); + Py_XDECREF(tmp_value); + Py_XDECREF(tmp_tb); +#else + PyErr_Restore(type, value, tb); +#endif +} +static CYTHON_INLINE void __Pyx_ErrFetch(PyObject **type, PyObject **value, PyObject **tb) { +#if CYTHON_COMPILING_IN_CPYTHON + PyThreadState *tstate = PyThreadState_GET(); + *type = tstate->curexc_type; + *value = tstate->curexc_value; + *tb = tstate->curexc_traceback; + tstate->curexc_type = 0; + tstate->curexc_value = 0; + tstate->curexc_traceback = 0; +#else + PyErr_Fetch(type, value, tb); +#endif +} + +#if PY_MAJOR_VERSION < 3 +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, + CYTHON_UNUSED PyObject *cause) { + Py_XINCREF(type); + if (!value || value == Py_None) + value = NULL; + else + Py_INCREF(value); + if (!tb || tb == Py_None) + tb = NULL; + else { + Py_INCREF(tb); + if (!PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto raise_error; + } + } + #if PY_VERSION_HEX < 0x02050000 + if (PyClass_Check(type)) { + #else + if (PyType_Check(type)) { + #endif +#if CYTHON_COMPILING_IN_PYPY + if (!value) { + Py_INCREF(Py_None); + value = Py_None; + } +#endif + PyErr_NormalizeException(&type, &value, &tb); } else { - num_expected = num_max; - more_or_less = "at most"; + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto raise_error; + } + value = type; + #if PY_VERSION_HEX < 0x02050000 + if (PyInstance_Check(type)) { + type = (PyObject*) ((PyInstanceObject*)type)->in_class; + Py_INCREF(type); + } else { + type = 0; + PyErr_SetString(PyExc_TypeError, + "raise: exception must be an old-style class or instance"); + goto raise_error; + } + #else + type = (PyObject*) Py_TYPE(type); + Py_INCREF(type); + if (!PyType_IsSubtype((PyTypeObject *)type, (PyTypeObject *)PyExc_BaseException)) { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto raise_error; + } + #endif } - if (exact) { - more_or_less = "exactly"; + __Pyx_ErrRestore(type, value, tb); + return; +raise_error: + Py_XDECREF(value); + Py_XDECREF(type); + Py_XDECREF(tb); + return; +} +#else /* Python 3+ */ +static void __Pyx_Raise(PyObject *type, PyObject *value, PyObject *tb, PyObject *cause) { + PyObject* owned_instance = NULL; + if (tb == Py_None) { + tb = 0; + } else if (tb && !PyTraceBack_Check(tb)) { + PyErr_SetString(PyExc_TypeError, + "raise: arg 3 must be a traceback or None"); + goto bad; } - PyErr_Format(PyExc_TypeError, - "%s() takes %s %" CYTHON_FORMAT_SSIZE_T "d positional argument%s (%" CYTHON_FORMAT_SSIZE_T "d given)", - func_name, more_or_less, num_expected, - (num_expected == 1) ? "" : "s", num_found); + if (value == Py_None) + value = 0; + if (PyExceptionInstance_Check(type)) { + if (value) { + PyErr_SetString(PyExc_TypeError, + "instance exception may not have a separate value"); + goto bad; + } + value = type; + type = (PyObject*) Py_TYPE(value); + } else if (PyExceptionClass_Check(type)) { + PyObject *instance_class = NULL; + if (value && PyExceptionInstance_Check(value)) { + instance_class = (PyObject*) Py_TYPE(value); + if (instance_class != type) { + if (PyObject_IsSubclass(instance_class, type)) { + type = instance_class; + } else { + instance_class = NULL; + } + } + } + if (!instance_class) { + PyObject *args; + if (!value) + args = PyTuple_New(0); + else if (PyTuple_Check(value)) { + Py_INCREF(value); + args = value; + } else + args = PyTuple_Pack(1, value); + if (!args) + goto bad; + owned_instance = PyObject_Call(type, args, NULL); + Py_DECREF(args); + if (!owned_instance) + goto bad; + value = owned_instance; + if (!PyExceptionInstance_Check(value)) { + PyErr_Format(PyExc_TypeError, + "calling %R should have returned an instance of " + "BaseException, not %R", + type, Py_TYPE(value)); + goto bad; + } + } + } else { + PyErr_SetString(PyExc_TypeError, + "raise: exception class must be a subclass of BaseException"); + goto bad; + } +#if PY_VERSION_HEX >= 0x03030000 + if (cause) { +#else + if (cause && cause != Py_None) { +#endif + PyObject *fixed_cause; + if (cause == Py_None) { + fixed_cause = NULL; + } else if (PyExceptionClass_Check(cause)) { + fixed_cause = PyObject_CallObject(cause, NULL); + if (fixed_cause == NULL) + goto bad; + } else if (PyExceptionInstance_Check(cause)) { + fixed_cause = cause; + Py_INCREF(fixed_cause); + } else { + PyErr_SetString(PyExc_TypeError, + "exception causes must derive from " + "BaseException"); + goto bad; + } + PyException_SetCause(value, fixed_cause); + } + PyErr_SetObject(type, value); + if (tb) { + PyThreadState *tstate = PyThreadState_GET(); + PyObject* tmp_tb = tstate->curexc_traceback; + if (tb != tmp_tb) { + Py_INCREF(tb); + tstate->curexc_traceback = tb; + Py_XDECREF(tmp_tb); + } + } +bad: + Py_XDECREF(owned_instance); + return; +} +#endif + +#if !CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE PyObject* __Pyx_PyBytes_Join(PyObject* sep, PyObject* values) { + return PyObject_CallMethodObjArgs(sep, __pyx_n_s_join, values, NULL); } +#endif static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { PyErr_Format(PyExc_ValueError, @@ -13008,7 +12279,7 @@ static CYTHON_INLINE void __Pyx_RaiseTooManyValuesError(Py_ssize_t expected) { static CYTHON_INLINE void __Pyx_RaiseNeedMoreValuesError(Py_ssize_t index) { PyErr_Format(PyExc_ValueError, - "need more than %" CYTHON_FORMAT_SSIZE_T "d value%s to unpack", + "need more than %" CYTHON_FORMAT_SSIZE_T "d value%.1s to unpack", index, (index == 1) ? "" : "s"); } @@ -13063,7 +12334,7 @@ static CYTHON_INLINE void __Pyx_RaiseClosureNameError(const char *varname) { static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { if (unlikely(!type)) { - PyErr_Format(PyExc_SystemError, "Missing type object"); + PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (likely(PyObject_TypeCheck(obj, type))) @@ -13073,134 +12344,283 @@ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) { return 0; } -static int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, +static void __Pyx_RaiseArgumentTypeInvalid(const char* name, PyObject *obj, PyTypeObject *type) { + PyErr_Format(PyExc_TypeError, + "Argument '%.200s' has incorrect type (expected %.200s, got %.200s)", + name, type->tp_name, Py_TYPE(obj)->tp_name); +} +static CYTHON_INLINE int __Pyx_ArgTypeTest(PyObject *obj, PyTypeObject *type, int none_allowed, const char *name, int exact) { - if (!type) { - PyErr_Format(PyExc_SystemError, "Missing type object"); + if (unlikely(!type)) { + PyErr_SetString(PyExc_SystemError, "Missing type object"); return 0; } if (none_allowed && obj == Py_None) return 1; else if (exact) { - if (Py_TYPE(obj) == type) return 1; + if (likely(Py_TYPE(obj) == type)) return 1; + #if PY_MAJOR_VERSION == 2 + else if ((type == &PyBaseString_Type) && likely(__Pyx_PyBaseString_CheckExact(obj))) return 1; + #endif } else { - if (PyObject_TypeCheck(obj, type)) return 1; + if (likely(PyObject_TypeCheck(obj, type))) return 1; } - PyErr_Format(PyExc_TypeError, - "Argument '%s' has incorrect type (expected %s, got %s)", - name, type->tp_name, Py_TYPE(obj)->tp_name); + __Pyx_RaiseArgumentTypeInvalid(name, obj, type); return 0; } -static int __Pyx_call_next_tp_traverse(PyObject* obj, visitproc v, void *a, traverseproc current_tp_traverse) { - PyTypeObject* type = Py_TYPE(obj); - while (type && type->tp_traverse != current_tp_traverse) - type = type->tp_base; - if (type && type->tp_base && type->tp_base->tp_traverse) - return type->tp_base->tp_traverse(obj, v, a); - return 0; -} - -static void __Pyx_call_next_tp_clear(PyObject* obj, inquiry current_tp_clear) { - PyTypeObject* type = Py_TYPE(obj); - while (type && type->tp_clear != current_tp_clear) - type = type->tp_base; - if (type && type->tp_base && type->tp_base->tp_clear) - type->tp_base->tp_clear(obj); -} - -static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, long level) { - PyObject *py_import = 0; - PyObject *empty_list = 0; - PyObject *module = 0; - PyObject *global_dict = 0; - PyObject *empty_dict = 0; - PyObject *list; - py_import = __Pyx_GetAttrString(__pyx_b, "__import__"); - if (!py_import) - goto bad; - if (from_list) - list = from_list; - else { - empty_list = PyList_New(0); - if (!empty_list) - goto bad; - list = empty_list; +static CYTHON_INLINE PyObject* __Pyx_PyObject_GetSlice( + PyObject* obj, Py_ssize_t cstart, Py_ssize_t cstop, + PyObject** _py_start, PyObject** _py_stop, PyObject** _py_slice, + int has_cstart, int has_cstop, CYTHON_UNUSED int wraparound) { +#if CYTHON_COMPILING_IN_CPYTHON + PyMappingMethods* mp; +#if PY_MAJOR_VERSION < 3 + PySequenceMethods* ms = Py_TYPE(obj)->tp_as_sequence; + if (likely(ms && ms->sq_slice)) { + if (!has_cstart) { + if (_py_start && (*_py_start != Py_None)) { + cstart = __Pyx_PyIndex_AsSsize_t(*_py_start); + if ((cstart == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstart = 0; + } + if (!has_cstop) { + if (_py_stop && (*_py_stop != Py_None)) { + cstop = __Pyx_PyIndex_AsSsize_t(*_py_stop); + if ((cstop == (Py_ssize_t)-1) && PyErr_Occurred()) goto bad; + } else + cstop = PY_SSIZE_T_MAX; + } + if (wraparound && unlikely((cstart < 0) | (cstop < 0)) && likely(ms->sq_length)) { + Py_ssize_t l = ms->sq_length(obj); + if (likely(l >= 0)) { + if (cstop < 0) { + cstop += l; + if (cstop < 0) cstop = 0; + } + if (cstart < 0) { + cstart += l; + if (cstart < 0) cstart = 0; + } + } else { + if (PyErr_ExceptionMatches(PyExc_OverflowError)) + PyErr_Clear(); + else + goto bad; + } + } + return ms->sq_slice(obj, cstart, cstop); } - global_dict = PyModule_GetDict(__pyx_m); - if (!global_dict) - goto bad; - empty_dict = PyDict_New(); - if (!empty_dict) - goto bad; - #if PY_VERSION_HEX >= 0x02050000 +#endif + mp = Py_TYPE(obj)->tp_as_mapping; + if (likely(mp && mp->mp_subscript)) +#endif { - #if PY_MAJOR_VERSION >= 3 - if (level == -1) { - if (strchr(__Pyx_MODULE_NAME, '.')) { - /* try package relative import first */ - PyObject *py_level = PyInt_FromLong(1); - if (!py_level) - goto bad; - module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, py_level, NULL); - Py_DECREF(py_level); - if (!module) { - if (!PyErr_ExceptionMatches(PyExc_ImportError)) + PyObject* result; + PyObject *py_slice, *py_start, *py_stop; + if (_py_slice) { + py_slice = *_py_slice; + } else { + PyObject* owned_start = NULL; + PyObject* owned_stop = NULL; + if (_py_start) { + py_start = *_py_start; + } else { + if (has_cstart) { + owned_start = py_start = PyInt_FromSsize_t(cstart); + if (unlikely(!py_start)) goto bad; + } else + py_start = Py_None; + } + if (_py_stop) { + py_stop = *_py_stop; + } else { + if (has_cstop) { + owned_stop = py_stop = PyInt_FromSsize_t(cstop); + if (unlikely(!py_stop)) { + Py_XDECREF(owned_start); goto bad; - PyErr_Clear(); - } + } + } else + py_stop = Py_None; } - level = 0; /* try absolute import on failure */ + py_slice = PySlice_New(py_start, py_stop, Py_None); + Py_XDECREF(owned_start); + Py_XDECREF(owned_stop); + if (unlikely(!py_slice)) goto bad; } - #endif - if (!module) { - PyObject *py_level = PyInt_FromLong(level); - if (!py_level) - goto bad; - module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, py_level, NULL); - Py_DECREF(py_level); +#if CYTHON_COMPILING_IN_CPYTHON + result = mp->mp_subscript(obj, py_slice); +#else + result = PyObject_GetItem(obj, py_slice); +#endif + if (!_py_slice) { + Py_DECREF(py_slice); } + return result; } - #else - if (level>0) { - PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); - goto bad; - } - module = PyObject_CallFunctionObjArgs(py_import, - name, global_dict, empty_dict, list, NULL); - #endif + PyErr_Format(PyExc_TypeError, + "'%.200s' object is unsliceable", Py_TYPE(obj)->tp_name); bad: - Py_XDECREF(empty_list); - Py_XDECREF(py_import); - Py_XDECREF(empty_dict); - return module; + return NULL; } -static CYTHON_INLINE void __Pyx_RaiseImportError(PyObject *name) { -#if PY_MAJOR_VERSION < 3 - PyErr_Format(PyExc_ImportError, "cannot import name %.230s", - PyString_AsString(name)); +#if CYTHON_COMPILING_IN_CPYTHON +static CYTHON_INLINE void __Pyx_crop_slice(Py_ssize_t* _start, Py_ssize_t* _stop, Py_ssize_t* _length) { + Py_ssize_t start = *_start, stop = *_stop, length = *_length; + if (start < 0) { + start += length; + if (start < 0) + start = 0; + } + if (stop < 0) + stop += length; + else if (stop > length) + stop = length; + *_length = stop - start; + *_start = start; + *_stop = stop; +} +static CYTHON_INLINE void __Pyx_copy_object_array(PyObject** CYTHON_RESTRICT src, PyObject** CYTHON_RESTRICT dest, Py_ssize_t length) { + PyObject *v; + Py_ssize_t i; + for (i = 0; i < length; i++) { + v = dest[i] = src[i]; + Py_INCREF(v); + } +} +static CYTHON_INLINE PyObject* __Pyx_PyList_GetSlice( + PyObject* src, Py_ssize_t start, Py_ssize_t stop) { + PyObject* dest; + Py_ssize_t length = PyList_GET_SIZE(src); + __Pyx_crop_slice(&start, &stop, &length); + if (unlikely(length <= 0)) + return PyList_New(0); + dest = PyList_New(length); + if (unlikely(!dest)) + return NULL; + __Pyx_copy_object_array( + ((PyListObject*)src)->ob_item + start, + ((PyListObject*)dest)->ob_item, + length); + return dest; +} +static CYTHON_INLINE PyObject* __Pyx_PyTuple_GetSlice( + PyObject* src, Py_ssize_t start, Py_ssize_t stop) { + PyObject* dest; + Py_ssize_t length = PyTuple_GET_SIZE(src); + __Pyx_crop_slice(&start, &stop, &length); + if (unlikely(length <= 0)) + return PyTuple_New(0); + dest = PyTuple_New(length); + if (unlikely(!dest)) + return NULL; + __Pyx_copy_object_array( + ((PyTupleObject*)src)->ob_item + start, + ((PyTupleObject*)dest)->ob_item, + length); + return dest; +} +#endif + +static CYTHON_INLINE int __Pyx_PyObject_Append(PyObject* L, PyObject* x) { + if (likely(PyList_CheckExact(L))) { + if (unlikely(__Pyx_PyList_Append(L, x) < 0)) return -1; + } else { + PyObject* retval = __Pyx_PyObject_CallMethod1(L, __pyx_n_s_append, x); + if (unlikely(!retval)) + return -1; + Py_DECREF(retval); + } + return 0; +} + +static int __Pyx_SetVtable(PyObject *dict, void *vtable) { +#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) + PyObject *ob = PyCapsule_New(vtable, 0, 0); #else - PyErr_Format(PyExc_ImportError, "cannot import name %S", name); + PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); #endif + if (!ob) + goto bad; + if (PyDict_SetItem(dict, __pyx_n_s_pyx_vtable, ob) < 0) + goto bad; + Py_DECREF(ob); + return 0; +bad: + Py_XDECREF(ob); + return -1; +} + +static PyObject* __Pyx_ImportFrom(PyObject* module, PyObject* name) { + PyObject* value = __Pyx_PyObject_GetAttrStr(module, name); + if (unlikely(!value) && PyErr_ExceptionMatches(PyExc_AttributeError)) { + PyErr_Format(PyExc_ImportError, + #if PY_MAJOR_VERSION < 3 + "cannot import name %.230s", PyString_AS_STRING(name)); + #else + "cannot import name %S", name); + #endif + } + return value; +} + +static PyTypeObject* __Pyx_FetchCommonType(PyTypeObject* type) { + PyObject* fake_module; + PyTypeObject* cached_type = NULL; + fake_module = PyImport_AddModule((char*) "_cython_" CYTHON_ABI); + if (!fake_module) return NULL; + Py_INCREF(fake_module); + cached_type = (PyTypeObject*) PyObject_GetAttrString(fake_module, type->tp_name); + if (cached_type) { + if (!PyType_Check((PyObject*)cached_type)) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s is not a type object", + type->tp_name); + goto bad; + } + if (cached_type->tp_basicsize != type->tp_basicsize) { + PyErr_Format(PyExc_TypeError, + "Shared Cython type %.200s has the wrong size, try recompiling", + type->tp_name); + goto bad; + } + } else { + if (!PyErr_ExceptionMatches(PyExc_AttributeError)) goto bad; + PyErr_Clear(); + if (PyType_Ready(type) < 0) goto bad; + if (PyObject_SetAttrString(fake_module, type->tp_name, (PyObject*) type) < 0) + goto bad; + Py_INCREF(type); + cached_type = type; + } +done: + Py_DECREF(fake_module); + return cached_type; +bad: + Py_XDECREF(cached_type); + cached_type = NULL; + goto done; } static PyObject * __Pyx_CyFunction_get_doc(__pyx_CyFunctionObject *op, CYTHON_UNUSED void *closure) { - if (op->func_doc == NULL && op->func.m_ml->ml_doc) { + if (unlikely(op->func_doc == NULL)) { + if (op->func.m_ml->ml_doc) { #if PY_MAJOR_VERSION >= 3 - op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); + op->func_doc = PyUnicode_FromString(op->func.m_ml->ml_doc); #else - op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); + op->func_doc = PyString_FromString(op->func.m_ml->ml_doc); #endif - } - if (op->func_doc == 0) { - Py_INCREF(Py_None); - return Py_None; + if (unlikely(op->func_doc == NULL)) + return NULL; + } else { + Py_INCREF(Py_None); + return Py_None; + } } Py_INCREF(op->func_doc); return op->func_doc; @@ -13210,22 +12630,23 @@ __Pyx_CyFunction_set_doc(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp = op->func_doc; if (value == NULL) - op->func_doc = Py_None; /* Mark as deleted */ - else - op->func_doc = value; - Py_INCREF(op->func_doc); + value = Py_None; /* Mark as deleted */ + Py_INCREF(value); + op->func_doc = value; Py_XDECREF(tmp); return 0; } static PyObject * __Pyx_CyFunction_get_name(__pyx_CyFunctionObject *op) { - if (op->func_name == NULL) { + if (unlikely(op->func_name == NULL)) { #if PY_MAJOR_VERSION >= 3 op->func_name = PyUnicode_InternFromString(op->func.m_ml->ml_name); #else op->func_name = PyString_InternFromString(op->func.m_ml->ml_name); #endif + if (unlikely(op->func_name == NULL)) + return NULL; } Py_INCREF(op->func_name); return op->func_name; @@ -13235,9 +12656,9 @@ __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; #if PY_MAJOR_VERSION >= 3 - if (value == NULL || !PyUnicode_Check(value)) { + if (unlikely(value == NULL || !PyUnicode_Check(value))) { #else - if (value == NULL || !PyString_Check(value)) { + if (unlikely(value == NULL || !PyString_Check(value))) { #endif PyErr_SetString(PyExc_TypeError, "__name__ must be set to a string object"); @@ -13250,6 +12671,31 @@ __Pyx_CyFunction_set_name(__pyx_CyFunctionObject *op, PyObject *value) return 0; } static PyObject * +__Pyx_CyFunction_get_qualname(__pyx_CyFunctionObject *op) +{ + Py_INCREF(op->func_qualname); + return op->func_qualname; +} +static int +__Pyx_CyFunction_set_qualname(__pyx_CyFunctionObject *op, PyObject *value) +{ + PyObject *tmp; +#if PY_MAJOR_VERSION >= 3 + if (unlikely(value == NULL || !PyUnicode_Check(value))) { +#else + if (unlikely(value == NULL || !PyString_Check(value))) { +#endif + PyErr_SetString(PyExc_TypeError, + "__qualname__ must be set to a string object"); + return -1; + } + tmp = op->func_qualname; + Py_INCREF(value); + op->func_qualname = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure) { PyObject *self; @@ -13262,9 +12708,9 @@ __Pyx_CyFunction_get_self(__pyx_CyFunctionObject *m, CYTHON_UNUSED void *closure static PyObject * __Pyx_CyFunction_get_dict(__pyx_CyFunctionObject *op) { - if (op->func_dict == NULL) { + if (unlikely(op->func_dict == NULL)) { op->func_dict = PyDict_New(); - if (op->func_dict == NULL) + if (unlikely(op->func_dict == NULL)) return NULL; } Py_INCREF(op->func_dict); @@ -13274,12 +12720,12 @@ static int __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) { PyObject *tmp; - if (value == NULL) { + if (unlikely(value == NULL)) { PyErr_SetString(PyExc_TypeError, "function's dictionary may not be deleted"); return -1; } - if (!PyDict_Check(value)) { + if (unlikely(!PyDict_Check(value))) { PyErr_SetString(PyExc_TypeError, "setting function's dictionary to a non-dict"); return -1; @@ -13291,11 +12737,10 @@ __Pyx_CyFunction_set_dict(__pyx_CyFunctionObject *op, PyObject *value) return 0; } static PyObject * -__Pyx_CyFunction_get_globals(CYTHON_UNUSED __pyx_CyFunctionObject *op) +__Pyx_CyFunction_get_globals(__pyx_CyFunctionObject *op) { - PyObject* dict = PyModule_GetDict(__pyx_m); - Py_XINCREF(dict); - return dict; + Py_INCREF(op->func_globals); + return op->func_globals; } static PyObject * __Pyx_CyFunction_get_closure(CYTHON_UNUSED __pyx_CyFunctionObject *op) @@ -13310,29 +12755,111 @@ __Pyx_CyFunction_get_code(__pyx_CyFunctionObject *op) Py_INCREF(result); return result; } +static int +__Pyx_CyFunction_init_defaults(__pyx_CyFunctionObject *op) { + PyObject *res = op->defaults_getter((PyObject *) op); + if (unlikely(!res)) + return -1; + op->defaults_tuple = PyTuple_GET_ITEM(res, 0); + Py_INCREF(op->defaults_tuple); + op->defaults_kwdict = PyTuple_GET_ITEM(res, 1); + Py_INCREF(op->defaults_kwdict); + Py_DECREF(res); + return 0; +} +static int +__Pyx_CyFunction_set_defaults(__pyx_CyFunctionObject *op, PyObject* value) { + PyObject* tmp; + if (!value) { + value = Py_None; + } else if (value != Py_None && !PyTuple_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__defaults__ must be set to a tuple object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_tuple; + op->defaults_tuple = value; + Py_XDECREF(tmp); + return 0; +} static PyObject * -__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) -{ - if (op->defaults_tuple) { - Py_INCREF(op->defaults_tuple); - return op->defaults_tuple; - } - if (op->defaults_getter) { - PyObject *res = op->defaults_getter((PyObject *) op); - if (res) { - Py_INCREF(res); - op->defaults_tuple = res; +__Pyx_CyFunction_get_defaults(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_tuple; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_tuple; + } else { + result = Py_None; } - return res; } - Py_INCREF(Py_None); - return Py_None; + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_kwdefaults(__pyx_CyFunctionObject *op, PyObject* value) { + PyObject* tmp; + if (!value) { + value = Py_None; + } else if (value != Py_None && !PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__kwdefaults__ must be set to a dict object"); + return -1; + } + Py_INCREF(value); + tmp = op->defaults_kwdict; + op->defaults_kwdict = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_kwdefaults(__pyx_CyFunctionObject *op) { + PyObject* result = op->defaults_kwdict; + if (unlikely(!result)) { + if (op->defaults_getter) { + if (__Pyx_CyFunction_init_defaults(op) < 0) return NULL; + result = op->defaults_kwdict; + } else { + result = Py_None; + } + } + Py_INCREF(result); + return result; +} +static int +__Pyx_CyFunction_set_annotations(__pyx_CyFunctionObject *op, PyObject* value) { + PyObject* tmp; + if (!value || value == Py_None) { + value = NULL; + } else if (!PyDict_Check(value)) { + PyErr_SetString(PyExc_TypeError, + "__annotations__ must be set to a dict object"); + return -1; + } + Py_XINCREF(value); + tmp = op->func_annotations; + op->func_annotations = value; + Py_XDECREF(tmp); + return 0; +} +static PyObject * +__Pyx_CyFunction_get_annotations(__pyx_CyFunctionObject *op) { + PyObject* result = op->func_annotations; + if (unlikely(!result)) { + result = PyDict_New(); + if (unlikely(!result)) return NULL; + op->func_annotations = result; + } + Py_INCREF(result); + return result; } static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "func_doc", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "__doc__", (getter)__Pyx_CyFunction_get_doc, (setter)__Pyx_CyFunction_set_doc, 0, 0}, {(char *) "func_name", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, {(char *) "__name__", (getter)__Pyx_CyFunction_get_name, (setter)__Pyx_CyFunction_set_name, 0, 0}, + {(char *) "__qualname__", (getter)__Pyx_CyFunction_get_qualname, (setter)__Pyx_CyFunction_set_qualname, 0, 0}, {(char *) "__self__", (getter)__Pyx_CyFunction_get_self, 0, 0, 0}, {(char *) "func_dict", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, {(char *) "__dict__", (getter)__Pyx_CyFunction_get_dict, (setter)__Pyx_CyFunction_set_dict, 0, 0}, @@ -13342,8 +12869,10 @@ static PyGetSetDef __pyx_CyFunction_getsets[] = { {(char *) "__closure__", (getter)__Pyx_CyFunction_get_closure, 0, 0, 0}, {(char *) "func_code", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, {(char *) "__code__", (getter)__Pyx_CyFunction_get_code, 0, 0, 0}, - {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0}, - {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, 0, 0, 0}, + {(char *) "func_defaults", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__defaults__", (getter)__Pyx_CyFunction_get_defaults, (setter)__Pyx_CyFunction_set_defaults, 0, 0}, + {(char *) "__kwdefaults__", (getter)__Pyx_CyFunction_get_kwdefaults, (setter)__Pyx_CyFunction_set_kwdefaults, 0, 0}, + {(char *) "__annotations__", (getter)__Pyx_CyFunction_get_annotations, (setter)__Pyx_CyFunction_set_annotations, 0, 0}, {0, 0, 0, 0, 0} }; #ifndef PY_WRITE_RESTRICTED /* < Py2.5 */ @@ -13366,8 +12895,8 @@ static PyMethodDef __pyx_CyFunction_methods[] = { {__Pyx_NAMESTR("__reduce__"), (PyCFunction)__Pyx_CyFunction_reduce, METH_VARARGS, 0}, {0, 0, 0, 0} }; -static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, - PyObject *closure, PyObject *module, PyObject* code) { +static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int flags, PyObject* qualname, + PyObject *closure, PyObject *module, PyObject* globals, PyObject* code) { __pyx_CyFunctionObject *op = PyObject_GC_New(__pyx_CyFunctionObject, type); if (op == NULL) return NULL; @@ -13381,14 +12910,20 @@ static PyObject *__Pyx_CyFunction_New(PyTypeObject *type, PyMethodDef *ml, int f op->func.m_module = module; op->func_dict = NULL; op->func_name = NULL; + Py_INCREF(qualname); + op->func_qualname = qualname; op->func_doc = NULL; op->func_classobj = NULL; + op->func_globals = globals; + Py_INCREF(op->func_globals); Py_XINCREF(code); op->func_code = code; op->defaults_pyobjects = 0; op->defaults = NULL; op->defaults_tuple = NULL; + op->defaults_kwdict = NULL; op->defaults_getter = NULL; + op->func_annotations = NULL; PyObject_GC_Track(op); return (PyObject *) op; } @@ -13399,10 +12934,14 @@ __Pyx_CyFunction_clear(__pyx_CyFunctionObject *m) Py_CLEAR(m->func.m_module); Py_CLEAR(m->func_dict); Py_CLEAR(m->func_name); + Py_CLEAR(m->func_qualname); Py_CLEAR(m->func_doc); + Py_CLEAR(m->func_globals); Py_CLEAR(m->func_code); Py_CLEAR(m->func_classobj); Py_CLEAR(m->defaults_tuple); + Py_CLEAR(m->defaults_kwdict); + Py_CLEAR(m->func_annotations); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; @@ -13427,10 +12966,13 @@ static int __Pyx_CyFunction_traverse(__pyx_CyFunctionObject *m, visitproc visit, Py_VISIT(m->func.m_module); Py_VISIT(m->func_dict); Py_VISIT(m->func_name); + Py_VISIT(m->func_qualname); Py_VISIT(m->func_doc); + Py_VISIT(m->func_globals); Py_VISIT(m->func_code); Py_VISIT(m->func_classobj); Py_VISIT(m->defaults_tuple); + Py_VISIT(m->defaults_kwdict); if (m->defaults) { PyObject **pydefaults = __Pyx_CyFunction_Defaults(PyObject *, m); int i; @@ -13459,13 +13001,12 @@ static PyObject *__Pyx_CyFunction_descr_get(PyObject *func, PyObject *obj, PyObj static PyObject* __Pyx_CyFunction_repr(__pyx_CyFunctionObject *op) { - PyObject *func_name = __Pyx_CyFunction_get_name(op); #if PY_MAJOR_VERSION >= 3 return PyUnicode_FromFormat("", - func_name, (void *)op); + op->func_qualname, (void *)op); #else return PyString_FromFormat("", - PyString_AsString(func_name), (void *)op); + PyString_AsString(op->func_qualname), (void *)op); #endif } #if CYTHON_COMPILING_IN_PYPY @@ -13572,14 +13113,18 @@ static PyTypeObject __pyx_CyFunctionType_type = { #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif +#if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_finalize*/ +#endif }; static int __Pyx_CyFunction_init(void) { #if !CYTHON_COMPILING_IN_PYPY __pyx_CyFunctionType_type.tp_call = PyCFunction_Call; #endif - if (PyType_Ready(&__pyx_CyFunctionType_type) < 0) + __pyx_CyFunctionType = __Pyx_FetchCommonType(&__pyx_CyFunctionType_type); + if (__pyx_CyFunctionType == NULL) { return -1; - __pyx_CyFunctionType = &__pyx_CyFunctionType_type; + } return 0; } static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t size, int pyobjects) { @@ -13587,7 +13132,7 @@ static CYTHON_INLINE void *__Pyx_CyFunction_InitDefaults(PyObject *func, size_t m->defaults = PyMem_Malloc(size); if (!m->defaults) return PyErr_NoMemory(); - memset(m->defaults, 0, sizeof(size)); + memset(m->defaults, 0, size); m->defaults_pyobjects = pyobjects; return m->defaults; } @@ -13596,442 +13141,636 @@ static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsTuple(PyObject *func, PyOb m->defaults_tuple = tuple; Py_INCREF(tuple); } - -static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { -#if CYTHON_COMPILING_IN_PYPY - if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { /* cdef classes */ - return PyClassMethod_New(method); - } -#else - static PyTypeObject *methoddescr_type = NULL; - if (methoddescr_type == NULL) { - PyObject *meth = __Pyx_GetAttrString((PyObject*)&PyList_Type, "append"); - if (!meth) return NULL; - methoddescr_type = Py_TYPE(meth); - Py_DECREF(meth); - } - if (PyObject_TypeCheck(method, methoddescr_type)) { /* cdef classes */ - PyMethodDescrObject *descr = (PyMethodDescrObject *)method; - #if PY_VERSION_HEX < 0x03020000 - PyTypeObject *d_type = descr->d_type; - #else - PyTypeObject *d_type = descr->d_common.d_type; - #endif - return PyDescr_NewClassMethod(d_type, descr->d_method); - } -#endif - else if (PyMethod_Check(method)) { /* python classes */ - return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); - } - else if (PyCFunction_Check(method)) { - return PyClassMethod_New(method); - } -#ifdef __Pyx_CyFunction_USED - else if (PyObject_TypeCheck(method, __pyx_CyFunctionType)) { - return PyClassMethod_New(method); - } -#endif - PyErr_Format(PyExc_TypeError, - "Class-level classmethod() can only be called on " - "a method_descriptor or instance method."); - return NULL; +static CYTHON_INLINE void __Pyx_CyFunction_SetDefaultsKwDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->defaults_kwdict = dict; + Py_INCREF(dict); } - -static CYTHON_INLINE unsigned char __Pyx_PyInt_AsUnsignedChar(PyObject* x) { - const unsigned char neg_one = (unsigned char)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (sizeof(unsigned char) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(unsigned char)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to unsigned char" : - "value too large to convert to unsigned char"); - } - return (unsigned char)-1; - } - return (unsigned char)val; - } - return (unsigned char)__Pyx_PyInt_AsUnsignedLong(x); +static CYTHON_INLINE void __Pyx_CyFunction_SetAnnotationsDict(PyObject *func, PyObject *dict) { + __pyx_CyFunctionObject *m = (__pyx_CyFunctionObject *) func; + m->func_annotations = dict; + Py_INCREF(dict); } -static CYTHON_INLINE unsigned short __Pyx_PyInt_AsUnsignedShort(PyObject* x) { - const unsigned short neg_one = (unsigned short)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (sizeof(unsigned short) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(unsigned short)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to unsigned short" : - "value too large to convert to unsigned short"); - } - return (unsigned short)-1; - } - return (unsigned short)val; - } - return (unsigned short)__Pyx_PyInt_AsUnsignedLong(x); +static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name) { + PyObject *result; + result = __Pyx_PyObject_GetAttrStr(nmspace, name); + if (!result) + result = __Pyx_GetModuleGlobalName(name); + return result; } -static CYTHON_INLINE unsigned int __Pyx_PyInt_AsUnsignedInt(PyObject* x) { - const unsigned int neg_one = (unsigned int)-1, const_zero = 0; +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_unsigned_int(unsigned int value) { + const unsigned int neg_one = (unsigned int) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; - if (sizeof(unsigned int) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(unsigned int)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to unsigned int" : - "value too large to convert to unsigned int"); - } - return (unsigned int)-1; + if (is_unsigned) { + if (sizeof(unsigned int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + } else if (sizeof(unsigned int) <= sizeof(unsigned long long)) { + return PyLong_FromUnsignedLongLong((unsigned long long) value); } - return (unsigned int)val; - } - return (unsigned int)__Pyx_PyInt_AsUnsignedLong(x); -} - -static CYTHON_INLINE char __Pyx_PyInt_AsChar(PyObject* x) { - const char neg_one = (char)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (sizeof(char) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(char)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to char" : - "value too large to convert to char"); - } - return (char)-1; + } else { + if (sizeof(unsigned int) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(unsigned int) <= sizeof(long long)) { + return PyLong_FromLongLong((long long) value); } - return (char)val; } - return (char)__Pyx_PyInt_AsLong(x); -} - -static CYTHON_INLINE short __Pyx_PyInt_AsShort(PyObject* x) { - const short neg_one = (short)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (sizeof(short) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(short)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to short" : - "value too large to convert to short"); - } - return (short)-1; - } - return (short)val; + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(unsigned int), + little, !is_unsigned); } - return (short)__Pyx_PyInt_AsLong(x); } -static CYTHON_INLINE int __Pyx_PyInt_AsInt(PyObject* x) { - const int neg_one = (int)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (sizeof(int) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(int)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to int" : - "value too large to convert to int"); +static PyObject *__Pyx_Import(PyObject *name, PyObject *from_list, int level) { + PyObject *empty_list = 0; + PyObject *module = 0; + PyObject *global_dict = 0; + PyObject *empty_dict = 0; + PyObject *list; + #if PY_VERSION_HEX < 0x03030000 + PyObject *py_import; + py_import = __Pyx_PyObject_GetAttrStr(__pyx_b, __pyx_n_s_import); + if (!py_import) + goto bad; + #endif + if (from_list) + list = from_list; + else { + empty_list = PyList_New(0); + if (!empty_list) + goto bad; + list = empty_list; + } + global_dict = PyModule_GetDict(__pyx_m); + if (!global_dict) + goto bad; + empty_dict = PyDict_New(); + if (!empty_dict) + goto bad; + #if PY_VERSION_HEX >= 0x02050000 + { + #if PY_MAJOR_VERSION >= 3 + if (level == -1) { + if (strchr(__Pyx_MODULE_NAME, '.')) { + #if PY_VERSION_HEX < 0x03030000 + PyObject *py_level = PyInt_FromLong(1); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, 1); + #endif + if (!module) { + if (!PyErr_ExceptionMatches(PyExc_ImportError)) + goto bad; + PyErr_Clear(); + } } - return (int)-1; + level = 0; /* try absolute import on failure */ } - return (int)val; - } - return (int)__Pyx_PyInt_AsLong(x); -} - -static CYTHON_INLINE signed char __Pyx_PyInt_AsSignedChar(PyObject* x) { - const signed char neg_one = (signed char)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (sizeof(signed char) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(signed char)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to signed char" : - "value too large to convert to signed char"); - } - return (signed char)-1; + #endif + if (!module) { + #if PY_VERSION_HEX < 0x03030000 + PyObject *py_level = PyInt_FromLong(level); + if (!py_level) + goto bad; + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, py_level, NULL); + Py_DECREF(py_level); + #else + module = PyImport_ImportModuleLevelObject( + name, global_dict, empty_dict, list, level); + #endif } - return (signed char)val; } - return (signed char)__Pyx_PyInt_AsSignedLong(x); -} - -static CYTHON_INLINE signed short __Pyx_PyInt_AsSignedShort(PyObject* x) { - const signed short neg_one = (signed short)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (sizeof(signed short) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(signed short)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to signed short" : - "value too large to convert to signed short"); - } - return (signed short)-1; - } - return (signed short)val; + #else + if (level>0) { + PyErr_SetString(PyExc_RuntimeError, "Relative import is not supported for Python <=2.4."); + goto bad; } - return (signed short)__Pyx_PyInt_AsSignedLong(x); + module = PyObject_CallFunctionObjArgs(py_import, + name, global_dict, empty_dict, list, NULL); + #endif +bad: + #if PY_VERSION_HEX < 0x03030000 + Py_XDECREF(py_import); + #endif + Py_XDECREF(empty_list); + Py_XDECREF(empty_dict); + return module; } -static CYTHON_INLINE signed int __Pyx_PyInt_AsSignedInt(PyObject* x) { - const signed int neg_one = (signed int)-1, const_zero = 0; +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_int(int value) { + const int neg_one = (int) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; - if (sizeof(signed int) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(signed int)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to signed int" : - "value too large to convert to signed int"); - } - return (signed int)-1; + if (is_unsigned) { + if (sizeof(int) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + } else if (sizeof(int) <= sizeof(unsigned long long)) { + return PyLong_FromUnsignedLongLong((unsigned long long) value); } - return (signed int)val; - } - return (signed int)__Pyx_PyInt_AsSignedLong(x); -} - -static CYTHON_INLINE int __Pyx_PyInt_AsLongDouble(PyObject* x) { - const int neg_one = (int)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; - if (sizeof(int) < sizeof(long)) { - long val = __Pyx_PyInt_AsLong(x); - if (unlikely(val != (long)(int)val)) { - if (!unlikely(val == -1 && PyErr_Occurred())) { - PyErr_SetString(PyExc_OverflowError, - (is_unsigned && unlikely(val < 0)) ? - "can't convert negative value to int" : - "value too large to convert to int"); - } - return (int)-1; + } else { + if (sizeof(int) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(int) <= sizeof(long long)) { + return PyLong_FromLongLong((long long) value); } - return (int)val; } - return (int)__Pyx_PyInt_AsLong(x); -} - -static CYTHON_INLINE unsigned long __Pyx_PyInt_AsUnsignedLong(PyObject* x) { - const unsigned long neg_one = (unsigned long)-1, const_zero = 0; + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(int), + little, !is_unsigned); + } +} + +#define __PYX_VERIFY_RETURN_INT(target_type, func_type, func) \ + { \ + func_type value = func(x); \ + if (sizeof(target_type) < sizeof(func_type)) { \ + if (unlikely(value != (func_type) (target_type) value)) { \ + func_type zero = 0; \ + PyErr_SetString(PyExc_OverflowError, \ + (is_unsigned && unlikely(value < zero)) ? \ + "can't convert negative value to " #target_type : \ + "value too large to convert to " #target_type); \ + return (target_type) -1; \ + } \ + } \ + return (target_type) value; \ + } + +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #endif +#endif +static CYTHON_INLINE unsigned int __Pyx_PyInt_As_unsigned_int(PyObject *x) { + const unsigned int neg_one = (unsigned int) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; -#if PY_VERSION_HEX < 0x03000000 +#if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned long"); - return (unsigned long)-1; + if (sizeof(unsigned int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, PyInt_AS_LONG) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to unsigned int"); + return (unsigned int) -1; + } + return (unsigned int) val; } - return (unsigned long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(unsigned int)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return (unsigned int) ((PyLongObject*)x)->ob_digit[0]; + } + } + #endif +#endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned long"); - return (unsigned long)-1; + "can't convert negative value to unsigned int"); + return (unsigned int) -1; + } + if (sizeof(unsigned int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long, PyLong_AsUnsignedLong) + } else if (sizeof(unsigned int) <= sizeof(unsigned long long)) { + __PYX_VERIFY_RETURN_INT(unsigned int, unsigned long long, PyLong_AsUnsignedLongLong) } - return (unsigned long)PyLong_AsUnsignedLong(x); } else { - return (unsigned long)PyLong_AsLong(x); +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(unsigned int)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return +(unsigned int) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(unsigned int) ((PyLongObject*)x)->ob_digit[0]; + } + } + #endif +#endif + if (sizeof(unsigned int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long, PyLong_AsLong) + } else if (sizeof(unsigned int) <= sizeof(long long)) { + __PYX_VERIFY_RETURN_INT(unsigned int, long long, PyLong_AsLongLong) + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + unsigned int val; + PyObject *v = __Pyx_PyNumber_Int(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (unsigned int) -1; } } else { - unsigned long val; + unsigned int val; PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (unsigned long)-1; - val = __Pyx_PyInt_AsUnsignedLong(tmp); + if (!tmp) return (unsigned int) -1; + val = __Pyx_PyInt_As_unsigned_int(tmp); Py_DECREF(tmp); return val; } } -static CYTHON_INLINE unsigned PY_LONG_LONG __Pyx_PyInt_AsUnsignedLongLong(PyObject* x) { - const unsigned PY_LONG_LONG neg_one = (unsigned PY_LONG_LONG)-1, const_zero = 0; +static CYTHON_INLINE PyObject* __Pyx_PyInt_From_long(long value) { + const long neg_one = (long) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; -#if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_Check(x))) { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned PY_LONG_LONG"); - return (unsigned PY_LONG_LONG)-1; - } - return (unsigned PY_LONG_LONG)val; - } else -#endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { - if (unlikely(Py_SIZE(x) < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to unsigned PY_LONG_LONG"); - return (unsigned PY_LONG_LONG)-1; - } - return (unsigned PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); - } else { - return (unsigned PY_LONG_LONG)PyLong_AsLongLong(x); + if (is_unsigned) { + if (sizeof(long) < sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(unsigned long)) { + return PyLong_FromUnsignedLong((unsigned long) value); + } else if (sizeof(long) <= sizeof(unsigned long long)) { + return PyLong_FromUnsignedLongLong((unsigned long long) value); } } else { - unsigned PY_LONG_LONG val; - PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (unsigned PY_LONG_LONG)-1; - val = __Pyx_PyInt_AsUnsignedLongLong(tmp); - Py_DECREF(tmp); - return val; + if (sizeof(long) <= sizeof(long)) { + return PyInt_FromLong((long) value); + } else if (sizeof(long) <= sizeof(long long)) { + return PyLong_FromLongLong((long long) value); + } + } + { + int one = 1; int little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&value; + return _PyLong_FromByteArray(bytes, sizeof(long), + little, !is_unsigned); } } -static CYTHON_INLINE long __Pyx_PyInt_AsLong(PyObject* x) { - const long neg_one = (long)-1, const_zero = 0; +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #endif +#endif +static CYTHON_INLINE size_t __Pyx_PyInt_As_size_t(PyObject *x) { + const size_t neg_one = (size_t) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; -#if PY_VERSION_HEX < 0x03000000 +#if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to long"); - return (long)-1; + if (sizeof(size_t) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(size_t, long, PyInt_AS_LONG) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to size_t"); + return (size_t) -1; + } + return (size_t) val; } - return (long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(size_t)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return (size_t) ((PyLongObject*)x)->ob_digit[0]; + } + } + #endif +#endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to long"); - return (long)-1; + "can't convert negative value to size_t"); + return (size_t) -1; + } + if (sizeof(size_t) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long, PyLong_AsUnsignedLong) + } else if (sizeof(size_t) <= sizeof(unsigned long long)) { + __PYX_VERIFY_RETURN_INT(size_t, unsigned long long, PyLong_AsUnsignedLongLong) } - return (long)PyLong_AsUnsignedLong(x); } else { - return (long)PyLong_AsLong(x); +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(size_t)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return +(size_t) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(size_t) ((PyLongObject*)x)->ob_digit[0]; + } + } + #endif +#endif + if (sizeof(size_t) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT(size_t, long, PyLong_AsLong) + } else if (sizeof(size_t) <= sizeof(long long)) { + __PYX_VERIFY_RETURN_INT(size_t, long long, PyLong_AsLongLong) + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + size_t val; + PyObject *v = __Pyx_PyNumber_Int(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (size_t) -1; } } else { - long val; + size_t val; PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (long)-1; - val = __Pyx_PyInt_AsLong(tmp); + if (!tmp) return (size_t) -1; + val = __Pyx_PyInt_As_size_t(tmp); Py_DECREF(tmp); return val; } } -static CYTHON_INLINE PY_LONG_LONG __Pyx_PyInt_AsLongLong(PyObject* x) { - const PY_LONG_LONG neg_one = (PY_LONG_LONG)-1, const_zero = 0; - const int is_unsigned = neg_one > const_zero; -#if PY_VERSION_HEX < 0x03000000 - if (likely(PyInt_Check(x))) { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to PY_LONG_LONG"); - return (PY_LONG_LONG)-1; - } - return (PY_LONG_LONG)val; - } else +static PyObject* __Pyx_Method_ClassMethod(PyObject *method) { +#if CYTHON_COMPILING_IN_PYPY + if (PyObject_TypeCheck(method, &PyWrapperDescr_Type)) { /* cdef classes */ + return PyClassMethod_New(method); + } +#else + static PyTypeObject *methoddescr_type = NULL; + if (methoddescr_type == NULL) { + PyObject *meth = __Pyx_GetAttrString((PyObject*)&PyList_Type, "append"); + if (!meth) return NULL; + methoddescr_type = Py_TYPE(meth); + Py_DECREF(meth); + } + if (PyObject_TypeCheck(method, methoddescr_type)) { /* cdef classes */ + PyMethodDescrObject *descr = (PyMethodDescrObject *)method; + #if PY_VERSION_HEX < 0x03020000 + PyTypeObject *d_type = descr->d_type; + #else + PyTypeObject *d_type = descr->d_common.d_type; + #endif + return PyDescr_NewClassMethod(d_type, descr->d_method); + } #endif - if (likely(PyLong_Check(x))) { - if (is_unsigned) { - if (unlikely(Py_SIZE(x) < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to PY_LONG_LONG"); - return (PY_LONG_LONG)-1; - } - return (PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); - } else { - return (PY_LONG_LONG)PyLong_AsLongLong(x); - } - } else { - PY_LONG_LONG val; - PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (PY_LONG_LONG)-1; - val = __Pyx_PyInt_AsLongLong(tmp); - Py_DECREF(tmp); - return val; + else if (PyMethod_Check(method)) { /* python classes */ + return PyClassMethod_New(PyMethod_GET_FUNCTION(method)); + } + else if (PyCFunction_Check(method)) { + return PyClassMethod_New(method); } +#ifdef __Pyx_CyFunction_USED + else if (PyObject_TypeCheck(method, __pyx_CyFunctionType)) { + return PyClassMethod_New(method); + } +#endif + PyErr_SetString(PyExc_TypeError, + "Class-level classmethod() can only be called on " + "a method_descriptor or instance method."); + return NULL; } -static CYTHON_INLINE signed long __Pyx_PyInt_AsSignedLong(PyObject* x) { - const signed long neg_one = (signed long)-1, const_zero = 0; +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #endif +#endif +static CYTHON_INLINE long __Pyx_PyInt_As_long(PyObject *x) { + const long neg_one = (long) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; -#if PY_VERSION_HEX < 0x03000000 +#if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to signed long"); - return (signed long)-1; + if (sizeof(long) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyInt_AS_LONG) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to long"); + return (long) -1; + } + return (long) val; } - return (signed long)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(long)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return (long) ((PyLongObject*)x)->ob_digit[0]; + } + } + #endif +#endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to signed long"); - return (signed long)-1; + "can't convert negative value to long"); + return (long) -1; + } + if (sizeof(long) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long, PyLong_AsUnsignedLong) + } else if (sizeof(long) <= sizeof(unsigned long long)) { + __PYX_VERIFY_RETURN_INT(long, unsigned long long, PyLong_AsUnsignedLongLong) } - return (signed long)PyLong_AsUnsignedLong(x); } else { - return (signed long)PyLong_AsLong(x); +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(long)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return +(long) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(long) ((PyLongObject*)x)->ob_digit[0]; + } + } + #endif +#endif + if (sizeof(long) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT(long, long, PyLong_AsLong) + } else if (sizeof(long) <= sizeof(long long)) { + __PYX_VERIFY_RETURN_INT(long, long long, PyLong_AsLongLong) + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + long val; + PyObject *v = __Pyx_PyNumber_Int(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (long) -1; } } else { - signed long val; + long val; PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (signed long)-1; - val = __Pyx_PyInt_AsSignedLong(tmp); + if (!tmp) return (long) -1; + val = __Pyx_PyInt_As_long(tmp); Py_DECREF(tmp); return val; } } -static CYTHON_INLINE signed PY_LONG_LONG __Pyx_PyInt_AsSignedLongLong(PyObject* x) { - const signed PY_LONG_LONG neg_one = (signed PY_LONG_LONG)-1, const_zero = 0; +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #endif +#endif +static CYTHON_INLINE int __Pyx_PyInt_As_int(PyObject *x) { + const int neg_one = (int) -1, const_zero = 0; const int is_unsigned = neg_one > const_zero; -#if PY_VERSION_HEX < 0x03000000 +#if PY_MAJOR_VERSION < 3 if (likely(PyInt_Check(x))) { - long val = PyInt_AS_LONG(x); - if (is_unsigned && unlikely(val < 0)) { - PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to signed PY_LONG_LONG"); - return (signed PY_LONG_LONG)-1; + if (sizeof(int) < sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyInt_AS_LONG) + } else { + long val = PyInt_AS_LONG(x); + if (is_unsigned && unlikely(val < 0)) { + PyErr_SetString(PyExc_OverflowError, + "can't convert negative value to int"); + return (int) -1; + } + return (int) val; } - return (signed PY_LONG_LONG)val; } else #endif if (likely(PyLong_Check(x))) { if (is_unsigned) { +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(int)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return (int) ((PyLongObject*)x)->ob_digit[0]; + } + } + #endif +#endif if (unlikely(Py_SIZE(x) < 0)) { PyErr_SetString(PyExc_OverflowError, - "can't convert negative value to signed PY_LONG_LONG"); - return (signed PY_LONG_LONG)-1; + "can't convert negative value to int"); + return (int) -1; + } + if (sizeof(int) <= sizeof(unsigned long)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long, PyLong_AsUnsignedLong) + } else if (sizeof(int) <= sizeof(unsigned long long)) { + __PYX_VERIFY_RETURN_INT(int, unsigned long long, PyLong_AsUnsignedLongLong) } - return (signed PY_LONG_LONG)PyLong_AsUnsignedLongLong(x); } else { - return (signed PY_LONG_LONG)PyLong_AsLongLong(x); +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + if (sizeof(digit) <= sizeof(int)) { + switch (Py_SIZE(x)) { + case 0: return 0; + case 1: return +(int) ((PyLongObject*)x)->ob_digit[0]; + case -1: return -(int) ((PyLongObject*)x)->ob_digit[0]; + } + } + #endif +#endif + if (sizeof(int) <= sizeof(long)) { + __PYX_VERIFY_RETURN_INT(int, long, PyLong_AsLong) + } else if (sizeof(int) <= sizeof(long long)) { + __PYX_VERIFY_RETURN_INT(int, long long, PyLong_AsLongLong) + } + } + { +#if CYTHON_COMPILING_IN_PYPY && !defined(_PyLong_AsByteArray) + PyErr_SetString(PyExc_RuntimeError, + "_PyLong_AsByteArray() not available in PyPy, cannot convert large numbers"); +#else + int val; + PyObject *v = __Pyx_PyNumber_Int(x); + #if PY_MAJOR_VERSION < 3 + if (likely(v) && !PyLong_Check(v)) { + PyObject *tmp = v; + v = PyNumber_Long(tmp); + Py_DECREF(tmp); + } + #endif + if (likely(v)) { + int one = 1; int is_little = (int)*(unsigned char *)&one; + unsigned char *bytes = (unsigned char *)&val; + int ret = _PyLong_AsByteArray((PyLongObject *)v, + bytes, sizeof(val), + is_little, !is_unsigned); + Py_DECREF(v); + if (likely(!ret)) + return val; + } +#endif + return (int) -1; } } else { - signed PY_LONG_LONG val; + int val; PyObject *tmp = __Pyx_PyNumber_Int(x); - if (!tmp) return (signed PY_LONG_LONG)-1; - val = __Pyx_PyInt_AsSignedLongLong(tmp); + if (!tmp) return (int) -1; + val = __Pyx_PyInt_As_int(tmp); Py_DECREF(tmp); return val; } @@ -14105,7 +13844,7 @@ static int __Pyx_PyGen_FetchStopIterationValue(PyObject **pvalue) { Py_DECREF(ev); #else { - PyObject* args = PyObject_GetAttrString(ev, "args"); + PyObject* args = PyObject_GetAttr(ev, __pyx_n_s_args); Py_DECREF(ev); if (likely(args)) { value = PyObject_GetItem(args, 0); @@ -14241,7 +13980,7 @@ static PyObject *__Pyx_Generator_Send(PyObject *self, PyObject *value) { if (value == Py_None) ret = PyIter_Next(yf); else - ret = PyObject_CallMethod(yf, (char*)"send", (char*)"O", value); + ret = __Pyx_PyObject_CallMethod1(yf, __pyx_n_s_send, value); } gen->is_running = 0; if (likely(ret)) { @@ -14261,7 +14000,7 @@ static int __Pyx_Generator_CloseIter(__pyx_GeneratorObject *gen, PyObject *yf) { } else { PyObject *meth; gen->is_running = 1; - meth = PyObject_GetAttrString(yf, "close"); + meth = PyObject_GetAttr(yf, __pyx_n_s_close); if (unlikely(!meth)) { if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { PyErr_WriteUnraisable(yf); @@ -14346,7 +14085,7 @@ static PyObject *__Pyx_Generator_Throw(PyObject *self, PyObject *args) { if (__Pyx_Generator_CheckExact(yf)) { ret = __Pyx_Generator_Throw(yf, args); } else { - PyObject *meth = PyObject_GetAttrString(yf, "throw"); + PyObject *meth = PyObject_GetAttr(yf, __pyx_n_s_throw); if (unlikely(!meth)) { Py_DECREF(yf); if (!PyErr_ExceptionMatches(PyExc_AttributeError)) { @@ -14397,13 +14136,17 @@ static void __Pyx_Generator_dealloc(PyObject *self) { PyObject_GC_UnTrack(gen); if (gen->gi_weakreflist != NULL) PyObject_ClearWeakRefs(self); - PyObject_GC_Track(self); if (gen->resume_label > 0) { + PyObject_GC_Track(self); +#if PY_VERSION_HEX >= 0x030400a1 + if (PyObject_CallFinalizerFromDealloc(self)) +#else Py_TYPE(gen)->tp_del(self); if (self->ob_refcnt > 0) +#endif return; /* resurrected. :( */ + PyObject_GC_UnTrack(self); } - PyObject_GC_UnTrack(self); __Pyx_Generator_clear(self); PyObject_GC_Del(gen); } @@ -14413,8 +14156,10 @@ static void __Pyx_Generator_del(PyObject *self) { __pyx_GeneratorObject *gen = (__pyx_GeneratorObject *) self; if (gen->resume_label <= 0) return ; +#if PY_VERSION_HEX < 0x030400a1 assert(self->ob_refcnt == 0); self->ob_refcnt = 1; +#endif __Pyx_ErrFetch(&error_type, &error_value, &error_traceback); res = __Pyx_Generator_Close(self); if (res == NULL) @@ -14422,6 +14167,7 @@ static void __Pyx_Generator_del(PyObject *self) { else Py_DECREF(res); __Pyx_ErrRestore(error_type, error_value, error_traceback); +#if PY_VERSION_HEX < 0x030400a1 /* Undo the temporary resurrection; can't use DECREF here, it would * cause a recursive call. */ @@ -14436,7 +14182,7 @@ static void __Pyx_Generator_del(PyObject *self) { _Py_NewReference(self); self->ob_refcnt = refcnt; } -#if CYTHON_COMPILING_FOR_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON assert(PyType_IS_GC(self->ob_type) && _Py_AS_GC(self)->gc.gc_refs != _PyGC_REFS_UNTRACKED); /* If Py_REF_DEBUG, _Py_NewReference bumped _Py_RefTotal, so @@ -14453,6 +14199,7 @@ static void __Pyx_Generator_del(PyObject *self) { --Py_TYPE(self)->tp_frees; --Py_TYPE(self)->tp_allocs; #endif +#endif } static PyMemberDef __pyx_Generator_memberlist[] = { {(char *) "gi_running", @@ -14496,7 +14243,7 @@ static PyTypeObject __pyx_GeneratorType_type = { 0, /*tp_getattro*/ 0, /*tp_setattro*/ 0, /*tp_as_buffer*/ - Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC, /* tp_flags*/ + Py_TPFLAGS_DEFAULT | Py_TPFLAGS_HAVE_GC | Py_TPFLAGS_HAVE_FINALIZE, /* tp_flags*/ 0, /*tp_doc*/ (traverseproc) __Pyx_Generator_traverse, /*tp_traverse*/ 0, /*tp_clear*/ @@ -14522,10 +14269,17 @@ static PyTypeObject __pyx_GeneratorType_type = { 0, /*tp_cache*/ 0, /*tp_subclasses*/ 0, /*tp_weaklist*/ +#if PY_VERSION_HEX >= 0x030400a1 + 0, /*tp_del*/ +#else __Pyx_Generator_del, /*tp_del*/ +#endif #if PY_VERSION_HEX >= 0x02060000 0, /*tp_version_tag*/ #endif +#if PY_VERSION_HEX >= 0x030400a1 + __Pyx_Generator_del, /*tp_finalize*/ +#endif }; static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, PyObject *closure) { @@ -14550,10 +14304,10 @@ static __pyx_GeneratorObject *__Pyx_Generator_New(__pyx_generator_body_t body, static int __pyx_Generator_init(void) { __pyx_GeneratorType_type.tp_getattro = PyObject_GenericGetAttr; __pyx_GeneratorType_type.tp_iter = PyObject_SelfIter; - if (PyType_Ready(&__pyx_GeneratorType_type)) { + __pyx_GeneratorType = __Pyx_FetchCommonType(&__pyx_GeneratorType_type); + if (__pyx_GeneratorType == NULL) { return -1; } - __pyx_GeneratorType = &__pyx_GeneratorType_type; return 0; } @@ -14576,23 +14330,6 @@ static int __Pyx_check_binary_version(void) { return 0; } -static int __Pyx_SetVtable(PyObject *dict, void *vtable) { -#if PY_VERSION_HEX >= 0x02070000 && !(PY_MAJOR_VERSION==3&&PY_MINOR_VERSION==0) - PyObject *ob = PyCapsule_New(vtable, 0, 0); -#else - PyObject *ob = PyCObject_FromVoidPtr(vtable, 0); -#endif - if (!ob) - goto bad; - if (PyDict_SetItemString(dict, "__pyx_vtable__", ob) < 0) - goto bad; - Py_DECREF(ob); - return 0; -bad: - Py_XDECREF(ob); - return -1; -} - static int __pyx_bisect_code_objects(__Pyx_CodeObjectCacheEntry* entries, int count, int code_line) { int start = 0, mid = 0, end = count - 1; if (end >= 0 && code_line > entries[end].code_line) { @@ -14785,27 +14522,90 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) { return 0; } - -/* Type Conversion Functions */ - +static CYTHON_INLINE PyObject* __Pyx_PyUnicode_FromString(const char* c_str) { + return __Pyx_PyUnicode_FromStringAndSize(c_str, strlen(c_str)); +} +static CYTHON_INLINE char* __Pyx_PyObject_AsString(PyObject* o) { + Py_ssize_t ignore; + return __Pyx_PyObject_AsStringAndSize(o, &ignore); +} +static CYTHON_INLINE char* __Pyx_PyObject_AsStringAndSize(PyObject* o, Py_ssize_t *length) { +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT + if ( +#if PY_MAJOR_VERSION < 3 && __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + __Pyx_sys_getdefaultencoding_not_ascii && +#endif + PyUnicode_Check(o)) { +#if PY_VERSION_HEX < 0x03030000 + char* defenc_c; + PyObject* defenc = _PyUnicode_AsDefaultEncodedString(o, NULL); + if (!defenc) return NULL; + defenc_c = PyBytes_AS_STRING(defenc); +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + { + char* end = defenc_c + PyBytes_GET_SIZE(defenc); + char* c; + for (c = defenc_c; c < end; c++) { + if ((unsigned char) (*c) >= 128) { + PyUnicode_AsASCIIString(o); + return NULL; + } + } + } +#endif /*__PYX_DEFAULT_STRING_ENCODING_IS_ASCII*/ + *length = PyBytes_GET_SIZE(defenc); + return defenc_c; +#else /* PY_VERSION_HEX < 0x03030000 */ + if (PyUnicode_READY(o) == -1) return NULL; +#if __PYX_DEFAULT_STRING_ENCODING_IS_ASCII + if (PyUnicode_IS_ASCII(o)) { + *length = PyUnicode_GET_LENGTH(o); + return PyUnicode_AsUTF8(o); + } else { + PyUnicode_AsASCIIString(o); + return NULL; + } +#else /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ + return PyUnicode_AsUTF8AndSize(o, length); +#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII */ +#endif /* PY_VERSION_HEX < 0x03030000 */ + } else +#endif /* __PYX_DEFAULT_STRING_ENCODING_IS_ASCII || __PYX_DEFAULT_STRING_ENCODING_IS_DEFAULT */ +#if !CYTHON_COMPILING_IN_PYPY +#if PY_VERSION_HEX >= 0x02060000 + if (PyByteArray_Check(o)) { + *length = PyByteArray_GET_SIZE(o); + return PyByteArray_AS_STRING(o); + } else +#endif +#endif + { + char* result; + int r = PyBytes_AsStringAndSize(o, &result, length); + if (unlikely(r < 0)) { + return NULL; + } else { + return result; + } + } +} static CYTHON_INLINE int __Pyx_PyObject_IsTrue(PyObject* x) { int is_true = x == Py_True; if (is_true | (x == Py_False) | (x == Py_None)) return is_true; else return PyObject_IsTrue(x); } - static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { PyNumberMethods *m; const char *name = NULL; PyObject *res = NULL; -#if PY_VERSION_HEX < 0x03000000 +#if PY_MAJOR_VERSION < 3 if (PyInt_Check(x) || PyLong_Check(x)) #else if (PyLong_Check(x)) #endif return Py_INCREF(x), x; m = Py_TYPE(x)->tp_as_number; -#if PY_VERSION_HEX < 0x03000000 +#if PY_MAJOR_VERSION < 3 if (m && m->nb_int) { name = "int"; res = PyNumber_Int(x); @@ -14821,13 +14621,13 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { } #endif if (res) { -#if PY_VERSION_HEX < 0x03000000 +#if PY_MAJOR_VERSION < 3 if (!PyInt_Check(res) && !PyLong_Check(res)) { #else if (!PyLong_Check(res)) { #endif PyErr_Format(PyExc_TypeError, - "__%s__ returned non-%s (type %.200s)", + "__%.4s__ returned non-%.4s (type %.200s)", name, name, Py_TYPE(res)->tp_name); Py_DECREF(res); return NULL; @@ -14839,16 +14639,40 @@ static CYTHON_INLINE PyObject* __Pyx_PyNumber_Int(PyObject* x) { } return res; } - +#if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + #include "longintrepr.h" + #endif +#endif static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject* b) { Py_ssize_t ival; - PyObject* x = PyNumber_Index(b); + PyObject *x; +#if PY_MAJOR_VERSION < 3 + if (likely(PyInt_CheckExact(b))) + return PyInt_AS_LONG(b); +#endif + if (likely(PyLong_CheckExact(b))) { + #if CYTHON_COMPILING_IN_CPYTHON && PY_MAJOR_VERSION >= 3 + #if CYTHON_USE_PYLONG_INTERNALS + switch (Py_SIZE(b)) { + case -1: return -(sdigit)((PyLongObject*)b)->ob_digit[0]; + case 0: return 0; + case 1: return ((PyLongObject*)b)->ob_digit[0]; + } + #endif + #endif + #if PY_VERSION_HEX < 0x02060000 + return PyInt_AsSsize_t(b); + #else + return PyLong_AsSsize_t(b); + #endif + } + x = PyNumber_Index(b); if (!x) return -1; ival = PyInt_AsSsize_t(x); Py_DECREF(x); return ival; } - static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { #if PY_VERSION_HEX < 0x02050000 if (ival <= LONG_MAX) @@ -14863,17 +14687,5 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) { #endif } -static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject* x) { - unsigned PY_LONG_LONG val = __Pyx_PyInt_AsUnsignedLongLong(x); - if (unlikely(val == (unsigned PY_LONG_LONG)-1 && PyErr_Occurred())) { - return (size_t)-1; - } else if (unlikely(val != (unsigned PY_LONG_LONG)(size_t)val)) { - PyErr_SetString(PyExc_OverflowError, - "value too large to convert to size_t"); - return (size_t)-1; - } - return (size_t)val; -} - #endif /* Py_PYTHON_H */ diff --git a/contrib/python/moses/dictree.pyx b/contrib/python/moses/dictree.pyx index 48bb0b843c..7b66babd99 100644 --- a/contrib/python/moses/dictree.pyx +++ b/contrib/python/moses/dictree.pyx @@ -179,7 +179,7 @@ cdef class QueryResult(list): def __init__(self, source, targets = []): super(QueryResult, self).__init__(targets) self.source = source - + cdef class DictionaryTree(object): @@ -222,10 +222,10 @@ cdef class PhraseDictionaryTree(DictionaryTree): raise ValueError, "'%s' doesn't seem a valid binary table." % path self.path = path self.tableLimit = tableLimit - self.nscores = nscores + self.nscores = nscores #used to be passed to PhraseDictionaryTree, not used now self.wa = wa self.delimiters = delimiters - self.tree = new cdictree.PhraseDictionaryTree(nscores) + self.tree = new cdictree.PhraseDictionaryTree() self.tree.NeedAlignmentInfo(wa) self.tree.Read(path) @@ -248,7 +248,7 @@ cdef class PhraseDictionaryTree(DictionaryTree): and os.path.isfile(stem + ".binphr.srcvoc") \ and os.path.isfile(stem + ".binphr.tgtdata") \ and os.path.isfile(stem + ".binphr.tgtvoc") - + cdef TargetProduction getTargetProduction(self, cdictree.StringTgtCand& cand, wa = None, converter = None): """Converts a StringTgtCandidate (c++ object) and possibly a word-alignment info (string) to a TargetProduction (python object).""" cdef list words = [cand.tokens[i].c_str() for i in xrange(cand.tokens.size())] @@ -284,9 +284,9 @@ cdef class PhraseDictionaryTree(DictionaryTree): results.sort(cmp=cmp, key=key) if self.tableLimit > 0: return QueryResult(source, results[0:self.tableLimit]) - else: + else: return results - + cdef class OnDiskWrapper(DictionaryTree): cdef condiskpt.OnDiskWrapper *wrapper @@ -300,7 +300,7 @@ cdef class OnDiskWrapper(DictionaryTree): self.wrapper = new condiskpt.OnDiskWrapper() self.wrapper.BeginLoad(string(path)) self.finder = new condiskpt.OnDiskQuery(self.wrapper[0]) - + @classmethod def canLoad(cls, stem, bint wa = False): return os.path.isfile(stem + "/Misc.dat") \ @@ -345,7 +345,7 @@ cdef class OnDiskWrapper(DictionaryTree): if cmp: results.sort(cmp=cmp, key=key) return results - + def load(path, nscores, limit): """Finds out the correct implementation depending on the content of 'path' and returns the appropriate dictionary tree.""" if PhraseDictionaryTree.canLoad(path, False): diff --git a/contrib/python/setup.py b/contrib/python/setup.py index 16f1439453..4f62c71b01 100644 --- a/contrib/python/setup.py +++ b/contrib/python/setup.py @@ -1,5 +1,7 @@ +from __future__ import print_function from distutils.core import setup from distutils.extension import Extension + import sys import os @@ -21,19 +23,19 @@ if param[0] == '--moses-lib': libdir = param[1] if param[0] == '--cython': - print >> sys.stderr, 'I will be cythoning your pyx files...' + print('I will be cythoning your pyx files...', file=sys.stderr) try: from Cython.Distutils import build_ext suffix = '.pyx' cmdcls['build_ext'] = build_ext except ImportError: - print 'You do not seem to have Cython installed' + print('You do not seem to have Cython installed') if param[0] == '--max-factors': defines['MAX_NUM_FACTORS'] = param[1] if param[0] == '--max-kenlm-order': defines['KENLM_MAX_ORDER'] = param[1] -print >> sys.stderr, 'mosesdir=%s\nincludes=%s\nlibdir=%s\ncmph=%s' % (mosesdir, includes, libdir, with_cmph) +print('mosesdir=%s\nincludes=%s\nlibdir=%s\ncmph=%s' % (mosesdir, includes, libdir, with_cmph), file=sys.stderr) #basic=['z', 'stdc++', 'pthread', 'm', 'gcc_s', 'c', 'boost_system', 'boost_filesystem'] basic=[] diff --git a/contrib/relent-filter/sigtest-filter/WIN32_functions.cpp b/contrib/relent-filter/sigtest-filter/WIN32_functions.cpp index 60ddd340cd..989c727a20 100755 --- a/contrib/relent-filter/sigtest-filter/WIN32_functions.cpp +++ b/contrib/relent-filter/sigtest-filter/WIN32_functions.cpp @@ -1,231 +1,231 @@ -// XGetopt.cpp Version 1.2 -// -// Author: Hans Dietrich -// hdietrich2@hotmail.com -// -// Description: -// XGetopt.cpp implements getopt(), a function to parse command lines. -// -// History -// Version 1.2 - 2003 May 17 -// - Added Unicode support -// -// Version 1.1 - 2002 March 10 -// - Added example to XGetopt.cpp module header -// -// This software is released into the public domain. -// You are free to use it in any way you like. -// -// This software is provided "as is" with no expressed -// or implied warranty. I accept no liability for any -// damage or loss of business that this software may cause. -// -/////////////////////////////////////////////////////////////////////////////// - - -/////////////////////////////////////////////////////////////////////////////// -// if you are using precompiled headers then include this line: -/////////////////////////////////////////////////////////////////////////////// - - -/////////////////////////////////////////////////////////////////////////////// -// if you are not using precompiled headers then include these lines: -//#include -//#include -//#include -/////////////////////////////////////////////////////////////////////////////// - - -#include -#include -#include -#include "WIN32_functions.h" - - -/////////////////////////////////////////////////////////////////////////////// -// -// X G e t o p t . c p p -// -// -// NAME -// getopt -- parse command line options -// -// SYNOPSIS -// int getopt(int argc, char *argv[], char *optstring) -// -// extern char *optarg; -// extern int optind; -// -// DESCRIPTION -// The getopt() function parses the command line arguments. Its -// arguments argc and argv are the argument count and array as -// passed into the application on program invocation. In the case -// of Visual C++ programs, argc and argv are available via the -// variables __argc and __argv (double underscores), respectively. -// getopt returns the next option letter in argv that matches a -// letter in optstring. (Note: Unicode programs should use -// __targv instead of __argv. Also, all character and string -// literals should be enclosed in ( ) ). -// -// optstring is a string of recognized option letters; if a letter -// is followed by a colon, the option is expected to have an argument -// that may or may not be separated from it by white space. optarg -// is set to point to the start of the option argument on return from -// getopt. -// -// Option letters may be combined, e.g., "-ab" is equivalent to -// "-a -b". Option letters are case sensitive. -// -// getopt places in the external variable optind the argv index -// of the next argument to be processed. optind is initialized -// to 0 before the first call to getopt. -// -// When all options have been processed (i.e., up to the first -// non-option argument), getopt returns EOF, optarg will point -// to the argument, and optind will be set to the argv index of -// the argument. If there are no non-option arguments, optarg -// will be set to NULL. -// -// The special option "--" may be used to delimit the end of the -// options; EOF will be returned, and "--" (and everything after it) -// will be skipped. -// -// RETURN VALUE -// For option letters contained in the string optstring, getopt -// will return the option letter. getopt returns a question mark (?) -// when it encounters an option letter not included in optstring. -// EOF is returned when processing is finished. -// -// BUGS -// 1) Long options are not supported. -// 2) The GNU double-colon extension is not supported. -// 3) The environment variable POSIXLY_CORRECT is not supported. -// 4) The + syntax is not supported. -// 5) The automatic permutation of arguments is not supported. -// 6) This implementation of getopt() returns EOF if an error is -// encountered, instead of -1 as the latest standard requires. -// -// EXAMPLE -// BOOL CMyApp::ProcessCommandLine(int argc, char *argv[]) -// { -// int c; -// -// while ((c = getopt(argc, argv, ("aBn:"))) != EOF) -// { -// switch (c) -// { -// case ('a'): -// TRACE(("option a\n")); -// // -// // set some flag here -// // -// break; -// -// case ('B'): -// TRACE( ("option B\n")); -// // -// // set some other flag here -// // -// break; -// -// case ('n'): -// TRACE(("option n: value=%d\n"), atoi(optarg)); -// // -// // do something with value here -// // -// break; -// -// case ('?'): -// TRACE(("ERROR: illegal option %s\n"), argv[optind-1]); -// return FALSE; -// break; -// -// default: -// TRACE(("WARNING: no handler for option %c\n"), c); -// return FALSE; -// break; -// } -// } -// // -// // check for non-option args here -// // -// return TRUE; -// } -// -/////////////////////////////////////////////////////////////////////////////// - -char *optarg; // global argument pointer -int optind = 0; // global argv index - -int getopt(int argc, char *argv[], char *optstring) -{ - static char *next = NULL; - if (optind == 0) - next = NULL; - - optarg = NULL; - - if (next == NULL || *next =='\0') { - if (optind == 0) - optind++; - - if (optind >= argc || argv[optind][0] != ('-') || argv[optind][1] == ('\0')) { - optarg = NULL; - if (optind < argc) - optarg = argv[optind]; - return EOF; - } - - if (strcmp(argv[optind], "--") == 0) { - optind++; - optarg = NULL; - if (optind < argc) - optarg = argv[optind]; - return EOF; - } - - next = argv[optind]; - next++; // skip past - - optind++; - } - - char c = *next++; - char *cp = strchr(optstring, c); - - if (cp == NULL || c == (':')) - return ('?'); - - cp++; - if (*cp == (':')) { - if (*next != ('\0')) { - optarg = next; - next = NULL; - } else if (optind < argc) { - optarg = argv[optind]; - optind++; - } else { - return ('?'); - } - } - - return c; -} - -// for an overview, see -// W. Press, S. Teukolsky and W. Vetterling. (1992) Numerical Recipes in C. Chapter 6.1. -double lgamma(int x) -{ - // size_t xx=(size_t)x; xx--; size_t sum=1; while (xx) { sum *= xx--; } return log((double)(sum)); - if (x <= 2) { - return 0.0; - } - static double coefs[6] = {76.18009172947146, -86.50532032941677, 24.01409824083091, -1.231739572450155, 0.1208650973866179e-2, -0.5395239384953e-5}; - double tmp=(double)x+5.5; - tmp -= (((double)x)+0.5)*log(tmp); - double y=(double)x; - double sum = 1.000000000190015; - for (size_t j=0; j<6; ++j) { - sum += coefs[j]/++y; - } - return -tmp+log(2.5066282746310005*sum/(double)x); -} \ No newline at end of file +// XGetopt.cpp Version 1.2 +// +// Author: Hans Dietrich +// hdietrich2@hotmail.com +// +// Description: +// XGetopt.cpp implements getopt(), a function to parse command lines. +// +// History +// Version 1.2 - 2003 May 17 +// - Added Unicode support +// +// Version 1.1 - 2002 March 10 +// - Added example to XGetopt.cpp module header +// +// This software is released into the public domain. +// You are free to use it in any way you like. +// +// This software is provided "as is" with no expressed +// or implied warranty. I accept no liability for any +// damage or loss of business that this software may cause. +// +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// if you are using precompiled headers then include this line: +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// if you are not using precompiled headers then include these lines: +//#include +//#include +//#include +/////////////////////////////////////////////////////////////////////////////// + + +#include +#include +#include +#include "WIN32_functions.h" + + +/////////////////////////////////////////////////////////////////////////////// +// +// X G e t o p t . c p p +// +// +// NAME +// getopt -- parse command line options +// +// SYNOPSIS +// int getopt(int argc, char *argv[], char *optstring) +// +// extern char *optarg; +// extern int optind; +// +// DESCRIPTION +// The getopt() function parses the command line arguments. Its +// arguments argc and argv are the argument count and array as +// passed into the application on program invocation. In the case +// of Visual C++ programs, argc and argv are available via the +// variables __argc and __argv (double underscores), respectively. +// getopt returns the next option letter in argv that matches a +// letter in optstring. (Note: Unicode programs should use +// __targv instead of __argv. Also, all character and string +// literals should be enclosed in ( ) ). +// +// optstring is a string of recognized option letters; if a letter +// is followed by a colon, the option is expected to have an argument +// that may or may not be separated from it by white space. optarg +// is set to point to the start of the option argument on return from +// getopt. +// +// Option letters may be combined, e.g., "-ab" is equivalent to +// "-a -b". Option letters are case sensitive. +// +// getopt places in the external variable optind the argv index +// of the next argument to be processed. optind is initialized +// to 0 before the first call to getopt. +// +// When all options have been processed (i.e., up to the first +// non-option argument), getopt returns EOF, optarg will point +// to the argument, and optind will be set to the argv index of +// the argument. If there are no non-option arguments, optarg +// will be set to NULL. +// +// The special option "--" may be used to delimit the end of the +// options; EOF will be returned, and "--" (and everything after it) +// will be skipped. +// +// RETURN VALUE +// For option letters contained in the string optstring, getopt +// will return the option letter. getopt returns a question mark (?) +// when it encounters an option letter not included in optstring. +// EOF is returned when processing is finished. +// +// BUGS +// 1) Long options are not supported. +// 2) The GNU double-colon extension is not supported. +// 3) The environment variable POSIXLY_CORRECT is not supported. +// 4) The + syntax is not supported. +// 5) The automatic permutation of arguments is not supported. +// 6) This implementation of getopt() returns EOF if an error is +// encountered, instead of -1 as the latest standard requires. +// +// EXAMPLE +// BOOL CMyApp::ProcessCommandLine(int argc, char *argv[]) +// { +// int c; +// +// while ((c = getopt(argc, argv, ("aBn:"))) != EOF) +// { +// switch (c) +// { +// case ('a'): +// TRACE(("option a\n")); +// // +// // set some flag here +// // +// break; +// +// case ('B'): +// TRACE( ("option B\n")); +// // +// // set some other flag here +// // +// break; +// +// case ('n'): +// TRACE(("option n: value=%d\n"), atoi(optarg)); +// // +// // do something with value here +// // +// break; +// +// case ('?'): +// TRACE(("ERROR: illegal option %s\n"), argv[optind-1]); +// return FALSE; +// break; +// +// default: +// TRACE(("WARNING: no handler for option %c\n"), c); +// return FALSE; +// break; +// } +// } +// // +// // check for non-option args here +// // +// return TRUE; +// } +// +/////////////////////////////////////////////////////////////////////////////// + +char *optarg; // global argument pointer +int optind = 0; // global argv index + +int getopt(int argc, char *argv[], char *optstring) +{ + static char *next = NULL; + if (optind == 0) + next = NULL; + + optarg = NULL; + + if (next == NULL || *next =='\0') { + if (optind == 0) + optind++; + + if (optind >= argc || argv[optind][0] != ('-') || argv[optind][1] == ('\0')) { + optarg = NULL; + if (optind < argc) + optarg = argv[optind]; + return EOF; + } + + if (strcmp(argv[optind], "--") == 0) { + optind++; + optarg = NULL; + if (optind < argc) + optarg = argv[optind]; + return EOF; + } + + next = argv[optind]; + next++; // skip past - + optind++; + } + + char c = *next++; + char *cp = strchr(optstring, c); + + if (cp == NULL || c == (':')) + return ('?'); + + cp++; + if (*cp == (':')) { + if (*next != ('\0')) { + optarg = next; + next = NULL; + } else if (optind < argc) { + optarg = argv[optind]; + optind++; + } else { + return ('?'); + } + } + + return c; +} + +// for an overview, see +// W. Press, S. Teukolsky and W. Vetterling. (1992) Numerical Recipes in C. Chapter 6.1. +double lgamma(int x) +{ + // size_t xx=(size_t)x; xx--; size_t sum=1; while (xx) { sum *= xx--; } return log((double)(sum)); + if (x <= 2) { + return 0.0; + } + static double coefs[6] = {76.18009172947146, -86.50532032941677, 24.01409824083091, -1.231739572450155, 0.1208650973866179e-2, -0.5395239384953e-5}; + double tmp=(double)x+5.5; + tmp -= (((double)x)+0.5)*log(tmp); + double y=(double)x; + double sum = 1.000000000190015; + for (size_t j=0; j<6; ++j) { + sum += coefs[j]/++y; + } + return -tmp+log(2.5066282746310005*sum/(double)x); +} diff --git a/contrib/relent-filter/sigtest-filter/WIN32_functions.h b/contrib/relent-filter/sigtest-filter/WIN32_functions.h index 6a719392eb..ad644018bd 100755 --- a/contrib/relent-filter/sigtest-filter/WIN32_functions.h +++ b/contrib/relent-filter/sigtest-filter/WIN32_functions.h @@ -1,24 +1,24 @@ -// XGetopt.h Version 1.2 -// -// Author: Hans Dietrich -// hdietrich2@hotmail.com -// -// This software is released into the public domain. -// You are free to use it in any way you like. -// -// This software is provided "as is" with no expressed -// or implied warranty. I accept no liability for any -// damage or loss of business that this software may cause. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef XGETOPT_H -#define XGETOPT_H - -extern int optind, opterr; -extern char *optarg; - -int getopt(int argc, char *argv[], char *optstring); -double lgamma(int x); - -#endif //XGETOPT_H +// XGetopt.h Version 1.2 +// +// Author: Hans Dietrich +// hdietrich2@hotmail.com +// +// This software is released into the public domain. +// You are free to use it in any way you like. +// +// This software is provided "as is" with no expressed +// or implied warranty. I accept no liability for any +// damage or loss of business that this software may cause. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef XGETOPT_H +#define XGETOPT_H + +extern int optind, opterr; +extern char *optarg; + +int getopt(int argc, char *argv[], char *optstring); +double lgamma(int x); + +#endif //XGETOPT_H diff --git a/contrib/relent-filter/sigtest-filter/filter-pt.cpp b/contrib/relent-filter/sigtest-filter/filter-pt.cpp index 4a51953ea3..e2408900dc 100755 --- a/contrib/relent-filter/sigtest-filter/filter-pt.cpp +++ b/contrib/relent-filter/sigtest-filter/filter-pt.cpp @@ -1,5 +1,5 @@ -#include +#include #include #include #include diff --git a/contrib/relent-filter/src/IOWrapper.cpp b/contrib/relent-filter/src/IOWrapper.cpp index 053735c966..7ad7697ceb 100755 --- a/contrib/relent-filter/src/IOWrapper.cpp +++ b/contrib/relent-filter/src/IOWrapper.cpp @@ -234,13 +234,13 @@ void OutputAlignment(ostream &out, const AlignmentInfo &ai, size_t sourceOffset, { typedef std::vector< const std::pair* > AlignVec; AlignVec alignments = ai.GetSortedAlignments(); - + AlignVec::const_iterator it; for (it = alignments.begin(); it != alignments.end(); ++it) { const std::pair &alignment = **it; out << alignment.first + sourceOffset << "-" << alignment.second + targetOffset << " "; } - + } void OutputAlignment(ostream &out, const vector &edges) @@ -251,7 +251,7 @@ void OutputAlignment(ostream &out, const vector &edges) const Hypothesis &edge = *edges[currEdge]; const TargetPhrase &tp = edge.GetCurrTargetPhrase(); size_t sourceOffset = edge.GetCurrSourceWordsRange().GetStartPos(); - + OutputAlignment(out, tp.GetAlignmentInfo(), sourceOffset, targetOffset); targetOffset += tp.GetSize(); @@ -263,7 +263,7 @@ void OutputAlignment(OutputCollector* collector, size_t lineNo , const vectorWrite(lineNo,out.str()); } @@ -477,7 +477,7 @@ void OutputNBest(std::ostream& out, const Moses::TrellisPathList &nBestList, con const int sourceOffset = sourceRange.GetStartPos(); const int targetOffset = targetRange.GetStartPos(); const AlignmentInfo &ai = edge.GetCurrTargetPhrase().GetAlignmentInfo(); - + OutputAlignment(out, ai, sourceOffset, targetOffset); } diff --git a/contrib/relent-filter/src/LatticeMBRGrid.cpp b/contrib/relent-filter/src/LatticeMBRGrid.cpp index 71c3878395..9f12864562 100755 --- a/contrib/relent-filter/src/LatticeMBRGrid.cpp +++ b/contrib/relent-filter/src/LatticeMBRGrid.cpp @@ -49,8 +49,10 @@ POSSIBILITY OF SUCH DAMAGE. #include "IOWrapper.h" #include "LatticeMBR.h" #include "Manager.h" +#include "Timer.h" #include "StaticData.h" +#include "util/exception.hh" using namespace std; using namespace Moses; @@ -68,7 +70,7 @@ class Grid /** Add a parameter with key, command line argument, and default value */ void addParam(gridkey key, const string& arg, float defaultValue) { m_args[arg] = key; - CHECK(m_grid.find(key) == m_grid.end()); + UTIL_THROW_IF2(m_grid.find(key) != m_grid.end(), "Duplicate parameter " << arg); m_grid[key].push_back(defaultValue); } @@ -151,6 +153,7 @@ int main(int argc, char* argv[]) params->Explain(); exit(1); } + ResetUserTime(); if (!StaticData::LoadDataStatic(params, argv[0])) { exit(1); } diff --git a/contrib/relent-filter/src/Main.cpp b/contrib/relent-filter/src/Main.cpp index 1f86e2cc72..070050d923 100755 --- a/contrib/relent-filter/src/Main.cpp +++ b/contrib/relent-filter/src/Main.cpp @@ -36,12 +36,14 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA #include "IOWrapper.h" #include "StaticData.h" #include "Util.h" +#include "Timer.h" #include "ThreadPool.h" #include "TranslationAnalysis.h" #include "OutputCollector.h" #include "RelativeEntropyCalc.h" #include "LexicalReordering.h" #include "LexicalReorderingState.h" +#include "util/random.hh" #ifdef HAVE_PROTOBUF #include "hypergraph.pb.h" @@ -167,18 +169,18 @@ static void ShowWeights() int main(int argc, char** argv) { try { - + // echo command line, if verbose IFVERBOSE(1) { TRACE_ERR("command: "); for(int i=0; iExplain(); exit(1); } - - + + // initialize all "global" variables, which are stored in StaticData // note: this also loads models such as the language model, etc. + ResetUserTime(); if (!StaticData::LoadDataStatic(params, argv[0])) { exit(1); } - + // setting "-show-weights" -> just dump out weights and exit if (params->isParamSpecified("show-weights")) { ShowWeights(); exit(0); } - + // shorthand for accessing information in StaticData const StaticData& staticData = StaticData::Instance(); - - + + //initialise random numbers - srand(time(NULL)); - + rand_init(); + // set up read/writing class IOWrapper* ioWrapper = GetIOWrapper(staticData); if (!ioWrapper) { cerr << "Error; Failed to create IO object" << endl; exit(1); } - + // check on weights vector weights = staticData.GetAllWeights(); IFVERBOSE(2) { @@ -232,7 +235,7 @@ int main(int argc, char** argv) // setting lexicalized reordering setup PhraseBasedReorderingState::m_useFirstBackwardScore = false; - + auto_ptr outputCollector; outputCollector.reset(new OutputCollector()); @@ -240,7 +243,7 @@ int main(int argc, char** argv) #ifdef WITH_THREADS ThreadPool pool(staticData.ThreadCount()); #endif - + // main loop over set of input sentences InputType* source = NULL; size_t lineCount = 0; @@ -258,11 +261,11 @@ int main(int argc, char** argv) task->Run(); delete task; #endif - + source = NULL; //make sure it doesn't get deleted ++lineCount; } - + // we are done, finishing up #ifdef WITH_THREADS pool.Stop(true); //flush remaining jobs diff --git a/contrib/relent-filter/src/RelativeEntropyCalc.cpp b/contrib/relent-filter/src/RelativeEntropyCalc.cpp index 212eedf87c..9ba334fca1 100755 --- a/contrib/relent-filter/src/RelativeEntropyCalc.cpp +++ b/contrib/relent-filter/src/RelativeEntropyCalc.cpp @@ -70,7 +70,7 @@ namespace MosesCmd if (neg_log_div > 100){ return 100; } - return neg_log_div; + return neg_log_div; } void RelativeEntropyCalc::ConcatOutputPhraseRecursive(Phrase& phrase, const Hypothesis *hypo){ diff --git a/contrib/relent-filter/src/TranslationAnalysis.cpp b/contrib/relent-filter/src/TranslationAnalysis.cpp index 89da483010..eb5f362936 100755 --- a/contrib/relent-filter/src/TranslationAnalysis.cpp +++ b/contrib/relent-filter/src/TranslationAnalysis.cpp @@ -57,7 +57,7 @@ void PrintTranslationAnalysis(const TranslationSystem* system, std::ostream &os, } } } - + bool epsilon = false; if (target == "") { target=""; diff --git a/contrib/relent-filter/src/mbr.cpp b/contrib/relent-filter/src/mbr.cpp index 7462d3fc67..7d3893f693 100755 --- a/contrib/relent-filter/src/mbr.cpp +++ b/contrib/relent-filter/src/mbr.cpp @@ -4,10 +4,10 @@ #include #include #include -#include -#include +#include +#include #include -#include +#include #include "TrellisPathList.h" #include "TrellisPath.h" #include "StaticData.h" diff --git a/contrib/rephraser/Jamfile b/contrib/rephraser/Jamfile new file mode 100644 index 0000000000..4d868ddf4a --- /dev/null +++ b/contrib/rephraser/Jamfile @@ -0,0 +1 @@ +exe paraphrase : paraphrase.cpp ../../moses//moses ../..//boost_program_options ; diff --git a/contrib/rephraser/paraphrase.cpp b/contrib/rephraser/paraphrase.cpp new file mode 100644 index 0000000000..0556d6ccd2 --- /dev/null +++ b/contrib/rephraser/paraphrase.cpp @@ -0,0 +1,148 @@ +// $Id$ +// vim:tabstop=2 + +/*********************************************************************** +Moses - factored phrase-based language decoder +Copyright (C) 2014- University of Edinburgh + +This library is free software; you can redistribute it and/or +modify it under the terms of the GNU Lesser General Public +License as published by the Free Software Foundation; either +version 2.1 of the License, or (at your option) any later version. + +This library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Lesser General Public License for more details. + +You should have received a copy of the GNU Lesser General Public +License along with this library; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +***********************************************************************/ + + +/** + * Compute paraphrases from the phrase table +**/ +#include +#include +#include + +#include + +#include "util/double-conversion/double-conversion.h" +#include "util/exception.hh" +#include "util/file_piece.hh" +#include "util/string_piece.hh" +#include "util/tokenize_piece.hh" + +//using namespace Moses; +using namespace std; + +namespace po = boost::program_options; + +typedef multimap Probs; + +static float threshold = 1e-04; +static size_t maxE = 10000; //histogram pruning + +static void add(const string& e, const vector scores, + Probs& p_e_given_f, Probs& p_f_given_e) { + if (scores[0] > threshold) { + p_f_given_e.insert(pair(scores[0],e)); + } + while(p_f_given_e.size() > maxE) p_f_given_e.erase(p_f_given_e.begin()); + if (scores[2] > threshold) { + p_e_given_f.insert(pair(scores[2],e)); + } + while(p_e_given_f.size() > maxE) p_e_given_f.erase(p_e_given_f.begin()); +} + +static void finalise(Probs& p_e_given_f, Probs& p_f_given_e) { + //cerr << "Sizes: p(e|f): " << p_e_given_f.size() << " p(f|e): " << p_f_given_e.size() << endl; + for (Probs::const_iterator e1_iter = p_f_given_e.begin() ; + e1_iter != p_f_given_e.end(); ++e1_iter) { + for (Probs::const_iterator e2_iter = p_e_given_f.begin() ; + e2_iter != p_e_given_f.end(); ++e2_iter) { + + if (e1_iter->second == e2_iter->second) continue; + cout << e1_iter->second << " ||| " << e2_iter->second << " ||| " << + e1_iter->first * e2_iter->first << " ||| " << endl; + } + } + p_e_given_f.clear(); + p_f_given_e.clear(); +} + +int main(int argc, char** argv) { + + string input_file; + + po::options_description desc("Allowed options"); + desc.add_options() + ("help,h", "Print help message and exit") + ("threshold,t", po::value(&threshold), "Threshold for p(e|f) and p(f|e)") + ("max-target,m", po::value(&maxE), "Maximum number of target phrases") + ("input-file", po::value(&input_file)->required(), "Input phrase table") + ; + + po::positional_options_description pos; + pos.add("input-file",1); + + po::variables_map vm; + po::store(po::command_line_parser(argc,argv).options(desc).positional(pos).run(), vm); + + + if (vm.count("help")) { + cerr << "Usage: " << string(argv[0]) + " [options] input-file" << endl; + cerr << desc << endl; + return 0; + } + + po::notify(vm); + + + cerr << "Reading from " << input_file << endl; + util::FilePiece in(input_file.c_str(), &std::cerr); + vector scoreVector; + StringPiece line; + double_conversion::StringToDoubleConverter converter(double_conversion::StringToDoubleConverter::NO_FLAGS, NAN, NAN, "inf", "nan"); + + + string previousSourcePhrase; + Probs p_f_given_e_table; + Probs p_e_given_f_table; + + size_t count = 0; + while(true) { + try { + line = in.ReadLine(); + } catch (const util::EndOfFileException &e) { + break; + } + ++count; + + util::TokenIter pipes(line, " ||| "); + StringPiece sourcePhrase(*pipes); + StringPiece targetPhrase(*++pipes); + StringPiece scoreString(*++pipes); + scoreVector.clear(); + for (util::TokenIter s(scoreString, " \t"); s; ++s) { + int processed; + float score = converter.StringToFloat(s->data(), s->length(), &processed); + UTIL_THROW_IF2(isnan(score), "Bad score " << *s << " on line " << count); + scoreVector.push_back(score); + } + + if (sourcePhrase.size() && sourcePhrase != previousSourcePhrase) { + finalise(p_e_given_f_table, p_f_given_e_table); + } + add(targetPhrase.as_string(),scoreVector, p_e_given_f_table, p_f_given_e_table); + previousSourcePhrase = sourcePhrase.as_string(); + } + finalise(p_e_given_f_table, p_f_given_e_table); + + + + return 0; +} diff --git a/contrib/rpm/README b/contrib/rpm/README index 8ba7ef4da7..8dd803ff3a 100644 --- a/contrib/rpm/README +++ b/contrib/rpm/README @@ -12,12 +12,13 @@ Building the RPM SPEC file The first phase is to construct the RPM SPEC file in $HOME/rpmbuild. The build_source.sh script builds all the artefacts needed to build. This script needs the following information: - The Git repository from which an installer will be built, - - The branch in the Git repository to build, and + - The branch in the Git repository to build, + - The location of Boost on the build machine, and - The version of the installed Moses distribution. -For example, to build the RELEASE-1.0 branch in the mosesdecode repository (git://github.com/moses-smt/mosesdecoder.git): +For example, to build the RELEASE-1.0 branch in the mosesdecoder repository (git://github.com/moses-smt/mosesdecoder.git): -$ build_source.sh -r git://github.com/moses-smt/mosesdecoder.git -b RELASE-1.0 -v 1.0 +$ build_source.sh -r git://github.com/moses-smt/mosesdecoder.git -b RELASE-1.0 -v 1.0 -t /usr This builds the source tarballs in the $HOME/rpmbuild/SOURCES directory and the moses.spec file in $HOME/rpmbuild/SPECS. diff --git a/contrib/rpm/build_source.sh b/contrib/rpm/build_source.sh index d0fac6a332..e1d83f2879 100755 --- a/contrib/rpm/build_source.sh +++ b/contrib/rpm/build_source.sh @@ -1,11 +1,15 @@ #!/bin/bash BRANCH="master" +BOOST="/usr" declare -i NO_RPM_BUILD=0 +declare -i RELEASE=1 declare -r RPM_VERSION_TAG="___RPM_VERSION__" +declare -r RPM_RELEASE_TAG="___RPM_RELEASE__" +declare -r BOOST_TAG="___BOOST_LOCATION__" function usage() { - echo "`basename $0` -r [Moses Git repo] -b [Moses Git branch: default ${BRANCH}] -v [RPM version]" + echo "`basename $0` -r [Moses Git repo] -b [Moses Git branch: default ${BRANCH}] -v [RPM version] -l [RPM release: default ${RELEASE}] -t [Boost install: default ${BOOST}]" exit 1 } @@ -13,12 +17,14 @@ if [ $# -lt 4 ]; then usage fi -while getopts r:b:v:nh OPTION +while getopts r:b:t:v:l:nh OPTION do case "$OPTION" in r) REPO="${OPTARG}";; b) BRANCH="${OPTARG}";; + t) BOOST="${OPTARG}";; v) VERSION="${OPTARG}";; + l) RELEASE="${OPTARG}";; n) NO_RPM_BUILD=1;; [h\?]) usage;; esac @@ -53,7 +59,8 @@ if [ ${NO_RPM_BUILD} -eq 0 ]; then if [ ! -d ${HOME}/rpmbuild/SPECS ]; then mkdir -p ${HOME}/rpmbuild/SPECS fi - eval sed s/${RPM_VERSION_TAG}/${VERSION}/ ./rpmbuild/SPECS/moses.spec > ${HOME}/rpmbuild/SPECS/moses.spec + ESC_BOOST=`echo ${BOOST} | gawk '{gsub(/\//, "\\\\/"); print}'` + eval sed -e \"s/${RPM_VERSION_TAG}/${VERSION}/\" -e \"s/${RPM_RELEASE_TAG}/${RELEASE}/\" -e \"s/${BOOST_TAG}/${ESC_BOOST}/\" ./rpmbuild/SPECS/moses.spec > ${HOME}/rpmbuild/SPECS/moses.spec if [ ! -d ${HOME}/rpmbuild/SOURCES ]; then mkdir -p ${HOME}/rpmbuild/SOURCES fi diff --git a/contrib/rpm/rpmbuild/SPECS/moses.spec b/contrib/rpm/rpmbuild/SPECS/moses.spec index 0f4a6c6ec3..fc4c2f9716 100644 --- a/contrib/rpm/rpmbuild/SPECS/moses.spec +++ b/contrib/rpm/rpmbuild/SPECS/moses.spec @@ -1,21 +1,26 @@ -Name: moses +%define name moses +%define version ___RPM_VERSION__ +%define release ___RPM_RELEASE__ + +Name: %{name} Summary: Moses is a statistical machine translation system that allows you to automatically train translation models for any language pair. -Version: ___RPM_VERSION__ -Release: 1 -URL: http://www.statmt.org/moses/ +Version: %{version} +Release: %{release} +URL: http://www.statmt.org/%{name}-%{version}/ Source0: %{name}-%{version}.tar.gz License: LGPL Group: Development/Tools Vendor: Capita Translation and Interpreting Packager: Ian Johnson -Requires: boost >= 1.48, python >= 2.6, perl >= 5 -BuildRoot: /home/ian/rpmbuild/builds/%{name}-%{version}-%{release} +Requires: python >= 2.6, perl >= 5 +Prefix: /opt +BuildRoot: %{_builddir}/%{name}-%{version}-%{release} %description Moses is a statistical machine translation system that allows you to automatically train translation models for any language pair. All you need is a collection of translated texts (parallel corpus). An efficient search algorithm finds quickly the highest probability translation among the exponential number of choices. %prep %setup -q -mkdir -p $RPM_BUILD_ROOT/opt/moses/giza++-v1.0.7 +mkdir -p $RPM_BUILD_ROOT/opt/%{name}-%{version}/giza++-v1.0.7 wget -O $RPM_BUILD_DIR/irstlm-5.70.04.tgz http://moses-suite.googlecode.com/files/irstlm-5.70.04.tgz wget -O $RPM_BUILD_DIR/giza-pp-v1.0.7.tgz http://moses-suite.googlecode.com/files/giza-pp-v1.0.7.tar.gz @@ -27,39 +32,51 @@ tar -zxf giza-pp-v1.0.7.tgz cd irstlm-5.70.04 bash regenerate-makefiles.sh --force -./configure --prefix $RPM_BUILD_ROOT/opt/moses/irstlm-5.70.04 +./configure --prefix $RPM_BUILD_ROOT/opt/%{name}-%{version}/irstlm-5.70.04 make make install cd ../giza-pp make -cp $RPM_BUILD_DIR/giza-pp/GIZA++-v2/GIZA++ $RPM_BUILD_DIR/giza-pp/GIZA++-v2/snt2cooc.out $RPM_BUILD_DIR/giza-pp/mkcls-v2/mkcls $RPM_BUILD_ROOT/opt/moses/giza++-v1.0.7 +cp $RPM_BUILD_DIR/giza-pp/GIZA++-v2/GIZA++ $RPM_BUILD_DIR/giza-pp/GIZA++-v2/snt2cooc.out $RPM_BUILD_DIR/giza-pp/mkcls-v2/mkcls $RPM_BUILD_ROOT/opt/%{name}-%{version}/giza++-v1.0.7 %build -./bjam --with-irstlm=$RPM_BUILD_ROOT/opt/moses/irstlm-5.70.04 --with-giza=$RPM_BUILD_ROOT/opt/moses/giza++-v1.0.7 -j2 +./bjam --with-boost=___BOOST_LOCATION__ --with-irstlm=$RPM_BUILD_ROOT/opt/%{name}-%{version}/irstlm-5.70.04 --with-giza=$RPM_BUILD_ROOT/opt/%{name}-%{version}/giza++-v1.0.7 -j2 %install -mkdir -p $RPM_BUILD_ROOT/opt/moses/scripts -cp -R bin $RPM_BUILD_ROOT/opt/moses -cp -R scripts/analysis $RPM_BUILD_ROOT/opt/moses/scripts -cp -R scripts/ems $RPM_BUILD_ROOT/opt/moses/scripts -cp -R scripts/generic $RPM_BUILD_ROOT/opt/moses/scripts -cp -R scripts/other $RPM_BUILD_ROOT/opt/moses/scripts -cp -R scripts/recaser $RPM_BUILD_ROOT/opt/moses/scripts -cp -R scripts/regression-testing $RPM_BUILD_ROOT/opt/moses/scripts -cp -R scripts/share $RPM_BUILD_ROOT/opt/moses/scripts -cp -R scripts/tokenizer $RPM_BUILD_ROOT/opt/moses/scripts -cp -R scripts/training $RPM_BUILD_ROOT/opt/moses/scripts +mkdir -p $RPM_BUILD_ROOT/opt/%{name}-%{version}/scripts +cp -R bin $RPM_BUILD_ROOT/opt/%{name}-%{version} +cp -R scripts/OSM $RPM_BUILD_ROOT/opt/%{name}-%{version}/scripts +cp -R scripts/Transliteration $RPM_BUILD_ROOT/opt/%{name}-%{version}/scripts +cp -R scripts/analysis $RPM_BUILD_ROOT/opt/%{name}-%{version}/scripts +cp -R scripts/ems $RPM_BUILD_ROOT/opt/%{name}-%{version}/scripts +cp -R scripts/generic $RPM_BUILD_ROOT/opt/%{name}-%{version}/scripts +cp -R scripts/other $RPM_BUILD_ROOT/opt/%{name}-%{version}/scripts +cp -R scripts/recaser $RPM_BUILD_ROOT/opt/%{name}-%{version}/scripts +cp -R scripts/share $RPM_BUILD_ROOT/opt/%{name}-%{version}/scripts +cp -R scripts/tokenizer $RPM_BUILD_ROOT/opt/%{name}-%{version}/scripts +cp -R scripts/training $RPM_BUILD_ROOT/opt/%{name}-%{version}/scripts %clean %files %defattr(-,root,root) -/opt/moses/bin/* -/opt/moses/scripts/analysis/* -/opt/moses/scripts/ems/* -/opt/moses/scripts/generic/* -/opt/moses/scripts/other/* -/opt/moses/scripts/recaser/* -/opt/moses/scripts/regression-testing/* -/opt/moses/scripts/share/* -/opt/moses/scripts/tokenizer/* -/opt/moses/scripts/training/* -/opt/moses/irstlm-5.70.04/* -/opt/moses/giza++-v1.0.7/* +/opt/%{name}-%{version}/bin/* +/opt/%{name}-%{version}/scripts/OSM/* +/opt/%{name}-%{version}/scripts/Transliteration/* +/opt/%{name}-%{version}/scripts/analysis/* +/opt/%{name}-%{version}/scripts/ems/* +/opt/%{name}-%{version}/scripts/generic/* +/opt/%{name}-%{version}/scripts/other/* +/opt/%{name}-%{version}/scripts/recaser/* +/opt/%{name}-%{version}/scripts/share/* +/opt/%{name}-%{version}/scripts/tokenizer/* +/opt/%{name}-%{version}/scripts/training/* +/opt/%{name}-%{version}/irstlm-5.70.04/* +/opt/%{name}-%{version}/giza++-v1.0.7/* +%pre +if [ "$1" = "1" ]; then +elif [ "$1" = "2" ]; then + rm $RPM_INSTALL_PREFIX/%{name} 2>/dev/null +fi +%post +ln -s $RPM_INSTALL_PREFIX/%{name}-%{version} $RPM_INSTALL_PREFIX/%{name} +%postun +rm -Rf $RPM_INSTALL_PREFIX/%{name}-%{version} 2>/dev/null +rm $RPM_INSTALL_PREFIX/%{name} 2>/dev/null diff --git a/contrib/rt/Empty.c b/contrib/rt/Empty.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/contrib/rt/README b/contrib/rt/README new file mode 100644 index 0000000000..d7a4cfebc0 --- /dev/null +++ b/contrib/rt/README @@ -0,0 +1,9 @@ +FOR OSX ONLY +------------ + +This creates an empty library file + librt.a +It should be used when you are compile with Eclipse on OSX. + +The Eclipse projects are set up to link to librt but OSX doesn't have it so this just creates a dummy library. + diff --git a/contrib/rt/compile.sh b/contrib/rt/compile.sh new file mode 100755 index 0000000000..6266d58d67 --- /dev/null +++ b/contrib/rt/compile.sh @@ -0,0 +1,2 @@ +gcc -c Empty.c -o Empty.o +ar rcs librt.a Empty.o \ No newline at end of file diff --git a/contrib/server/Jamfile b/contrib/server/Jamfile index 445c07ae88..8a8c6406c5 100644 --- a/contrib/server/Jamfile +++ b/contrib/server/Jamfile @@ -1,10 +1,21 @@ -#If you get compilation errors here, make sure you have xmlrpc-c installed properly, including the abyss server option. +# If you get compilation errors here, make sure you have xmlrpc-c +# installed properly, including the abyss server option. import option ; import path ; - +if [ option.get "no-xmlrpc-c" : : "yes" ] +{ + echo "Not building mosesserver." ; +} +else +{ with-xmlrpc-c = [ option.get "with-xmlrpc-c" ] ; if $(with-xmlrpc-c) { + echo While building mosesserver ... ; + # echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ; + # echo "!!! You are linking the XMLRPC-C library; Must be v.1.32 (September 2012) or higher !!!" ; + # echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!" ; + build-moses-server = true ; xmlrpc-command = $(with-xmlrpc-c)/bin/xmlrpc-c-config ; if ! [ path.exists $(xmlrpc-command) ] { @@ -21,6 +32,7 @@ if $(with-xmlrpc-c) { } xmlrpc-command = "xmlrpc-c-config" ; } +} rule shell_or_die ( cmd ) { local ret = [ _shell $(cmd) : exit-status ] ; @@ -30,12 +42,21 @@ rule shell_or_die ( cmd ) { return $(ret[1]) ; } + if $(build-moses-server) = true { xmlrpc-linkflags = [ shell_or_die "$(xmlrpc-command) c++2 abyss-server --libs" ] ; xmlrpc-cxxflags = [ shell_or_die "$(xmlrpc-command) c++2 abyss-server --cflags" ] ; - exe mosesserver : mosesserver.cpp ../../moses//moses ../../OnDiskPt//OnDiskPt : $(xmlrpc-linkflags) $(xmlrpc-cxxflags) ; -} else { + exe mosesserver : + mosesserver.cpp + ../../moses//moses + ../../OnDiskPt//OnDiskPt + ../..//boost_filesystem + : $(xmlrpc-linkflags) $(xmlrpc-cxxflags) ; + +} +else +{ alias mosesserver ; } diff --git a/contrib/server/client-stdin.perl b/contrib/server/client-stdin.perl new file mode 100755 index 0000000000..7a0c136b37 --- /dev/null +++ b/contrib/server/client-stdin.perl @@ -0,0 +1,41 @@ +#!/usr/bin/env perl + +# +# Sample client for mosesserver, illustrating allignment info and +# report all factors +# +use strict; +use Encode; +use XMLRPC::Lite; +use utf8; + +binmode(STDIN, ":utf8"); + + +my $url = "http://localhost:8080/RPC2"; +my $proxy = XMLRPC::Lite->proxy($url); + +my $text; +while ($text = ) { +#for (my $i = 0; $i < scalar(@doc); ++$i) { +# my $text = $doc[$i]; + + # Work-around for XMLRPC::Lite bug + #my $encoded = SOAP::Data->type(string => Encode::encode("utf8",$text)); + my $encoded = SOAP::Data->type(string => $text); + + my %param = ("text" => $encoded, "align" => "true", "report-all-factors" => "true"); + my $result = $proxy->call("translate",\%param)->result; + print $result->{'text'} . "\n"; + if ($result->{'align'}) { + print "Phrase alignments: \n"; + my $aligns = $result->{'align'}; + foreach my $align (@$aligns) { + print $align->{'tgt-start'} . "," . $align->{'src-start'} . "," + . $align->{'src-end'} . "\n"; + } + } +} + + + diff --git a/contrib/server/client.perl b/contrib/server/client.perl index eca5e388f1..820cbb7833 100755 --- a/contrib/server/client.perl +++ b/contrib/server/client.perl @@ -4,27 +4,40 @@ # Sample client for mosesserver, illustrating allignment info and # report all factors # - +use strict; use Encode; use XMLRPC::Lite; use utf8; -$url = "http://localhost:8080/RPC2"; -$proxy = XMLRPC::Lite->proxy($url); +my $url = "http://localhost:8080/RPC2"; +my $proxy = XMLRPC::Lite->proxy($url); + +my @doc = ("monsieur le président , ce que nous devrons toutefois également faire à biarritz , c' est regarder un peu plus loin .", + "les élus que nous sommes avons au moins autant le devoir de l' encourager à progresser , en dépit de l' adversité , que de relayer les messages que nous recevons de l' opinion publique dans chacun de nos pays .", + "au regard des événements de ces derniers temps , la question du prix de l' essence me semble elle aussi particulièrement remarquable .", + "à l' heure actuelle , le conseil est en train d' examiner l' inclusion de tels mécanismes dans l' article 7 .", + "deuxièmement , dans la transparence pour les citoyens , qui connaissent à présent les droits dont ils disposent vis-à-vis de ceux qui appliquent et élaborent le droit européen , et pour ceux qui , justement , appliquent et élaborent ce droit européen ."); +#print STDERR scalar(@doc); -$text = "il a souhaité que la présidence trace à nice le chemin pour l' avenir ."; +for (my $i = 0; $i < scalar(@doc); ++$i) { + my $text = $doc[$i]; -# Work-around for XMLRPC::Lite bug -$encoded = SOAP::Data->type(string => Encode::encode("utf8",$text)); + # Work-around for XMLRPC::Lite bug + my $encoded = SOAP::Data->type(string => Encode::encode("utf8",$text)); + #$encoded = SOAP::Data->type(string => $text); -my %param = ("text" => $encoded, "align" => "true", "report-all-factors" => "true"); -$result = $proxy->call("translate",\%param)->result; -print $result->{'text'} . "\n"; -if ($result->{'align'}) { - print "Phrase alignments: \n"; - $aligns = $result->{'align'}; - foreach my $align (@$aligns) { + my %param = ("text" => $encoded, "align" => "true", "report-all-factors" => "true"); + my $result = $proxy->call("translate",\%param)->result; + print $result->{'text'} . "\n"; + if ($result->{'align'}) { + print "Phrase alignments: \n"; + my $aligns = $result->{'align'}; + foreach my $align (@$aligns) { print $align->{'tgt-start'} . "," . $align->{'src-start'} . "," . $align->{'src-end'} . "\n"; - } + } + } } + + + diff --git a/contrib/server/client.py b/contrib/server/client.py index 43e77555a6..3692df2573 100755 --- a/contrib/server/client.py +++ b/contrib/server/client.py @@ -13,7 +13,12 @@ params = {"text":text, "align":"true", "report-all-factors":"true"} result = proxy.translate(params) + print result['text'] + +if 'id' in result: + print "Segment ID:%s" % (result['id']) + if 'align' in result: print "Phrase alignments:" aligns = result['align'] diff --git a/contrib/server/client_multimodel.py b/contrib/server/client_multimodel.py old mode 100644 new mode 100755 index 25bf597894..bf4016cad6 --- a/contrib/server/client_multimodel.py +++ b/contrib/server/client_multimodel.py @@ -16,21 +16,31 @@ import xmlrpc.client as xmlrpclib -def translate(input_object, server, weights=None): +def translate(input_object, server, weights=None, model_name=None): + """translate each sentence in an input_object (list, file-like object or other object that iterates over sentences) + server is a xmlrpclib.ServerProxy + model_name is the name of the PhraseDictionaryMultiModel(Counts) feature function that the weights should be applied to. It is defined in the moses.ini + weights is a list of floats (one float per model, or one float per model per feature) + """ for line in input_object: params = {} params['text'] = line if weights: - params['weight-t-multimodel'] = weights + if not model_name: + sys.stderr.write("Error: if you define weights, you need to specify the feature to which the weights are to be applied (e.g. PhraseDictionaryMultiModel0)\n") + sys.exit(1) + params['model_name'] = model_name + params['lambda'] = weights print server.translate(params) -def optimize(phrase_pairs, server): +def optimize(phrase_pairs, server, model_name): params = {} params['phrase_pairs'] = phrase_pairs + params['model_name'] = model_name weights = server.optimize(params) sys.stderr.write('weight vector (set lambda in moses.ini to this value to set as default): ') sys.stderr.write(','.join(map(str,weights)) + '\n') @@ -64,7 +74,7 @@ def translate_single_line(args): params = {} params['text'] = line if weights: - params['weight-t-multimodel'] = weights + params['lambda'] = weights return server.translate(params)['text'] @@ -74,6 +84,6 @@ def translate_single_line(args): server = xmlrpclib.ServerProxy(url) phrase_pairs = read_phrase_pairs(gzip.open('/path/to/moses-regression-tests/models/multimodel/extract.sorted.gz')) - weights = optimize(phrase_pairs, server) + weights = optimize(phrase_pairs, server, 'PhraseDictionaryMultiModelCounts0') - translate(sys.stdin, server, weights) + translate(sys.stdin, server, weights, 'PhraseDictionaryMultiModelCounts0') \ No newline at end of file diff --git a/contrib/server/mosesserver.cpp b/contrib/server/mosesserver.cpp index f1be85054c..118a3a62ee 100644 --- a/contrib/server/mosesserver.cpp +++ b/contrib/server/mosesserver.cpp @@ -1,524 +1,19 @@ -#include "util/check.hh" -#include -#include -#include -#include +#include "moses/ExportInterface.h" +// The separate moses server executable has been phased out. - -#include "moses/ChartManager.h" -#include "moses/Hypothesis.h" -#include "moses/Manager.h" -#include "moses/StaticData.h" -#include "moses/TranslationModel/PhraseDictionaryDynSuffixArray.h" -#include "moses/TranslationModel/PhraseDictionaryMultiModelCounts.h" -#include "moses/TreeInput.h" -#include "moses/LM/ORLM.h" - -#ifdef WITH_THREADS -#include -#endif - -#include -#include -#include - -using namespace Moses; -using namespace std; - -typedef std::map params_t; - -class Updater: public xmlrpc_c::method -{ -public: - Updater() { - // signature and help strings are documentation -- the client - // can query this information with a system.methodSignature and - // system.methodHelp RPC. - this->_signature = "S:S"; - this->_help = "Updates stuff"; - } - void - execute(xmlrpc_c::paramList const& paramList, - xmlrpc_c::value * const retvalP) { - const params_t params = paramList.getStruct(0); - breakOutParams(params); - const PhraseDictionary* pdf = StaticData::Instance().GetPhraseDictionaries()[0]; - PhraseDictionaryDynSuffixArray* pdsa = (PhraseDictionaryDynSuffixArray*) pdf; - cerr << "Inserting into address " << pdsa << endl; - pdsa->insertSnt(source_, target_, alignment_); - if(add2ORLM_) { - //updateORLM(); - } - cerr << "Done inserting\n"; - //PhraseDictionary* pdsa = (PhraseDictionary*) pdf->GetDictionary(*dummy); - map retData; - //*retvalP = xmlrpc_c::value_struct(retData); - pdf = 0; - pdsa = 0; - *retvalP = xmlrpc_c::value_string("Phrase table updated"); - } - string source_, target_, alignment_; - bool bounded_, add2ORLM_; - /* - void updateORLM() { - // TODO(level101): this belongs in the language model, not in moseserver.cpp - vector vl; - map, int> ngSet; - LMList lms = StaticData::Instance().GetLMList(); // get LM - LMList::const_iterator lmIter = lms.begin(); - LanguageModel *lm = *lmIter; - LanguageModelORLM* orlm = static_cast(lm); - if(orlm == 0) { - cerr << "WARNING: Unable to add target sentence to ORLM\n"; - return; - } - // break out new ngrams from sentence - const int ngOrder(orlm->GetNGramOrder()); - const std::string sBOS = orlm->GetSentenceStart()->GetString().as_string(); - const std::string sEOS = orlm->GetSentenceEnd()->GetString().as_string(); - Utils::splitToStr(target_, vl, " "); - // insert BOS and EOS - vl.insert(vl.begin(), sBOS); - vl.insert(vl.end(), sEOS); - for(int j=0; j < vl.size(); ++j) { - int i = (j= i; --t) { - vector ngVec; - for(int s=t; s<=j; ++s) { - ngVec.push_back(vl[s]); - //cerr << vl[s] << " "; - } - ngSet[ngVec]++; - //cerr << endl; - } - } - // insert into LM in order from 1grams up (for LM well-formedness) - cerr << "Inserting " << ngSet.size() << " ngrams into ORLM...\n"; - for(int i=1; i <= ngOrder; ++i) { - iterate(ngSet, it) { - if(it->first.size() == i) - orlm->UpdateORLM(it->first, it->second); - } - } - } - */ - - void breakOutParams(const params_t& params) { - params_t::const_iterator si = params.find("source"); - if(si == params.end()) - throw xmlrpc_c::fault("Missing source sentence", xmlrpc_c::fault::CODE_PARSE); - source_ = xmlrpc_c::value_string(si->second); - cerr << "source = " << source_ << endl; - si = params.find("target"); - if(si == params.end()) - throw xmlrpc_c::fault("Missing target sentence", xmlrpc_c::fault::CODE_PARSE); - target_ = xmlrpc_c::value_string(si->second); - cerr << "target = " << target_ << endl; - si = params.find("alignment"); - if(si == params.end()) - throw xmlrpc_c::fault("Missing alignment", xmlrpc_c::fault::CODE_PARSE); - alignment_ = xmlrpc_c::value_string(si->second); - cerr << "alignment = " << alignment_ << endl; - si = params.find("bounded"); - bounded_ = (si != params.end()); - si = params.find("updateORLM"); - add2ORLM_ = (si != params.end()); - } -}; - -class Optimizer : public xmlrpc_c::method -{ -public: - Optimizer() { - // signature and help strings are documentation -- the client - // can query this information with a system.methodSignature and - // system.methodHelp RPC. - this->_signature = "S:S"; - this->_help = "Optimizes multi-model translation model"; - } - - void - execute(xmlrpc_c::paramList const& paramList, - xmlrpc_c::value * const retvalP) { -#ifdef WITH_DLIB - const StaticData &staticData = StaticData::Instance(); - const params_t params = paramList.getStruct(0); - PhraseDictionaryMultiModel* pdmm = (PhraseDictionaryMultiModel*) staticData.GetPhraseDictionaries()[0]; //TODO: only works if multimodel is first phrase table - - params_t::const_iterator si = params.find("phrase_pairs"); - if (si == params.end()) { - throw xmlrpc_c::fault( - "Missing list of phrase pairs", - xmlrpc_c::fault::CODE_PARSE); - } - - vector > phrase_pairs; - - xmlrpc_c::value_array phrase_pairs_array = xmlrpc_c::value_array(si->second); - vector phrasePairValueVector(phrase_pairs_array.vectorValueValue()); - for (size_t i=0;i < phrasePairValueVector.size();i++) { - xmlrpc_c::value_array phrasePairArray = xmlrpc_c::value_array(phrasePairValueVector[i]); - vector phrasePair(phrasePairArray.vectorValueValue()); - string L1 = xmlrpc_c::value_string(phrasePair[0]); - string L2 = xmlrpc_c::value_string(phrasePair[1]); - phrase_pairs.push_back(make_pair(L1,L2)); - } - - vector weight_vector; - weight_vector = pdmm->MinimizePerplexity(phrase_pairs); - - vector weight_vector_ret; - for (size_t i=0;i < weight_vector.size();i++) { - weight_vector_ret.push_back(xmlrpc_c::value_double(weight_vector[i])); - } - *retvalP = xmlrpc_c::value_array(weight_vector_ret); -#else - string errmsg = "Error: Perplexity minimization requires dlib (compilation option --with-dlib)"; - cerr << errmsg << endl; - *retvalP = xmlrpc_c::value_string(errmsg); -#endif - } -}; - - -class Translator : public xmlrpc_c::method +/** main function of the command line version of the decoder **/ +int main(int argc, char const** argv) { -public: - Translator() { - // signature and help strings are documentation -- the client - // can query this information with a system.methodSignature and - // system.methodHelp RPC. - this->_signature = "S:S"; - this->_help = "Does translation"; - } - - void - execute(xmlrpc_c::paramList const& paramList, - xmlrpc_c::value * const retvalP) { - - const params_t params = paramList.getStruct(0); - paramList.verifyEnd(1); - params_t::const_iterator si = params.find("text"); - if (si == params.end()) { - throw xmlrpc_c::fault( - "Missing source text", - xmlrpc_c::fault::CODE_PARSE); - } - const string source( - (xmlrpc_c::value_string(si->second))); - - cerr << "Input: " << source << endl; - si = params.find("align"); - bool addAlignInfo = (si != params.end()); - si = params.find("sg"); - bool addGraphInfo = (si != params.end()); - si = params.find("topt"); - bool addTopts = (si != params.end()); - si = params.find("report-all-factors"); - bool reportAllFactors = (si != params.end()); - si = params.find("nbest"); - int nbest_size = (si == params.end()) ? 0 : int(xmlrpc_c::value_int(si->second)); - si = params.find("nbest-distinct"); - bool nbest_distinct = (si != params.end()); - - vector multiModelWeights; - si = params.find("weight-t-multimodel"); - if (si != params.end()) { - xmlrpc_c::value_array multiModelArray = xmlrpc_c::value_array(si->second); - vector multiModelValueVector(multiModelArray.vectorValueValue()); - for (size_t i=0;i < multiModelValueVector.size();i++) { - multiModelWeights.push_back(xmlrpc_c::value_double(multiModelValueVector[i])); - } - } - - const StaticData &staticData = StaticData::Instance(); - - if (addGraphInfo) { - (const_cast(staticData)).SetOutputSearchGraph(true); - } - - if (multiModelWeights.size() > 0) { - PhraseDictionaryMultiModel* pdmm = (PhraseDictionaryMultiModel*) staticData.GetPhraseDictionaries()[0]; //TODO: only works if multimodel is first phrase table - pdmm->SetTemporaryMultiModelWeightsVector(multiModelWeights); - if (staticData.GetUseTransOptCache()) { - cerr << "Warning: -use-persistent-cache is set to true; sentence-specific weights may be ignored. Disable cache for true results.\n"; - } - } - - stringstream out, graphInfo, transCollOpts; - map retData; - - if (staticData.IsChart()) { - TreeInput tinput; - const vector &inputFactorOrder = - staticData.GetInputFactorOrder(); - stringstream in(source + "\n"); - tinput.Read(in,inputFactorOrder); - ChartManager manager(tinput); - manager.ProcessSentence(); - const ChartHypothesis *hypo = manager.GetBestHypothesis(); - outputChartHypo(out,hypo); - } else { - Sentence sentence; - const vector &inputFactorOrder = - staticData.GetInputFactorOrder(); - stringstream in(source + "\n"); - sentence.Read(in,inputFactorOrder); - size_t lineNumber = 0; // TODO: Include sentence request number here? - Manager manager(lineNumber, sentence, staticData.GetSearchAlgorithm()); - manager.ProcessSentence(); - const Hypothesis* hypo = manager.GetBestHypothesis(); - - vector alignInfo; - outputHypo(out,hypo,addAlignInfo,alignInfo,reportAllFactors); - if (addAlignInfo) { - retData.insert(pair("align", xmlrpc_c::value_array(alignInfo))); - } - - if(addGraphInfo) { - insertGraphInfo(manager,retData); - (const_cast(staticData)).SetOutputSearchGraph(false); - } - if (addTopts) { - insertTranslationOptions(manager,retData); - } - if (nbest_size>0) { - outputNBest(manager, retData, nbest_size, nbest_distinct, reportAllFactors); - } - } - pair - text("text", xmlrpc_c::value_string(out.str())); - retData.insert(text); - cerr << "Output: " << out.str() << endl; - *retvalP = xmlrpc_c::value_struct(retData); - } - - void outputHypo(ostream& out, const Hypothesis* hypo, bool addAlignmentInfo, vector& alignInfo, bool reportAllFactors = false) { - if (hypo->GetPrevHypo() != NULL) { - outputHypo(out,hypo->GetPrevHypo(),addAlignmentInfo, alignInfo, reportAllFactors); - Phrase p = hypo->GetCurrTargetPhrase(); - if(reportAllFactors) { - out << p << " "; - } else { - for (size_t pos = 0 ; pos < p.GetSize() ; pos++) { - const Factor *factor = p.GetFactor(pos, 0); - out << *factor << " "; - } - } - - if (addAlignmentInfo) { - /** - * Add the alignment info to the array. This is in target order and consists of - * (tgt-start, src-start, src-end) triples. - **/ - map phraseAlignInfo; - phraseAlignInfo["tgt-start"] = xmlrpc_c::value_int(hypo->GetCurrTargetWordsRange().GetStartPos()); - phraseAlignInfo["src-start"] = xmlrpc_c::value_int(hypo->GetCurrSourceWordsRange().GetStartPos()); - phraseAlignInfo["src-end"] = xmlrpc_c::value_int(hypo->GetCurrSourceWordsRange().GetEndPos()); - alignInfo.push_back(xmlrpc_c::value_struct(phraseAlignInfo)); - } - } - } - - void outputChartHypo(ostream& out, const ChartHypothesis* hypo) { - Phrase outPhrase(20); - hypo->CreateOutputPhrase(outPhrase); - - // delete 1st & last - assert(outPhrase.GetSize() >= 2); - outPhrase.RemoveWord(0); - outPhrase.RemoveWord(outPhrase.GetSize() - 1); - for (size_t pos = 0 ; pos < outPhrase.GetSize() ; pos++) { - const Factor *factor = outPhrase.GetFactor(pos, 0); - out << *factor << " "; - } - - } - - bool compareSearchGraphNode(const SearchGraphNode& a, const SearchGraphNode b) { - return a.hypo->GetId() < b.hypo->GetId(); - } - - void insertGraphInfo(Manager& manager, map& retData) { - vector searchGraphXml; - vector searchGraph; - manager.GetSearchGraph(searchGraph); - std::sort(searchGraph.begin(), searchGraph.end()); - for (vector::const_iterator i = searchGraph.begin(); i != searchGraph.end(); ++i) { - map searchGraphXmlNode; - searchGraphXmlNode["forward"] = xmlrpc_c::value_double(i->forward); - searchGraphXmlNode["fscore"] = xmlrpc_c::value_double(i->fscore); - const Hypothesis* hypo = i->hypo; - searchGraphXmlNode["hyp"] = xmlrpc_c::value_int(hypo->GetId()); - searchGraphXmlNode["stack"] = xmlrpc_c::value_int(hypo->GetWordsBitmap().GetNumWordsCovered()); - if (hypo->GetId() != 0) { - const Hypothesis *prevHypo = hypo->GetPrevHypo(); - searchGraphXmlNode["back"] = xmlrpc_c::value_int(prevHypo->GetId()); - searchGraphXmlNode["score"] = xmlrpc_c::value_double(hypo->GetScore()); - searchGraphXmlNode["transition"] = xmlrpc_c::value_double(hypo->GetScore() - prevHypo->GetScore()); - if (i->recombinationHypo) { - searchGraphXmlNode["recombined"] = xmlrpc_c::value_int(i->recombinationHypo->GetId()); - } - searchGraphXmlNode["cover-start"] = xmlrpc_c::value_int(hypo->GetCurrSourceWordsRange().GetStartPos()); - searchGraphXmlNode["cover-end"] = xmlrpc_c::value_int(hypo->GetCurrSourceWordsRange().GetEndPos()); - searchGraphXmlNode["out"] = - xmlrpc_c::value_string(hypo->GetCurrTargetPhrase().GetStringRep(StaticData::Instance().GetOutputFactorOrder())); - } - searchGraphXml.push_back(xmlrpc_c::value_struct(searchGraphXmlNode)); - } - retData.insert(pair("sg", xmlrpc_c::value_array(searchGraphXml))); - } - - void outputNBest(const Manager& manager, - map& retData, - const int n=100, - const bool distinct=false, - const bool reportAllFactors=false) - { - TrellisPathList nBestList; - manager.CalcNBest(n, nBestList, distinct); - - vector nBestXml; - TrellisPathList::const_iterator iter; - for (iter = nBestList.begin() ; iter != nBestList.end() ; ++iter) { - const TrellisPath &path = **iter; - const std::vector &edges = path.GetEdges(); - map nBestXMLItem; - - // output surface - ostringstream out; - for (int currEdge = (int)edges.size() - 1 ; currEdge >= 0 ; currEdge--) { - const Hypothesis &edge = *edges[currEdge]; - const Phrase& phrase = edge.GetCurrTargetPhrase(); - if(reportAllFactors) { - out << phrase << " "; - } else { - for (size_t pos = 0 ; pos < phrase.GetSize() ; pos++) { - const Factor *factor = phrase.GetFactor(pos, 0); - out << *factor << " "; - } - } - } - nBestXMLItem["hyp"] = xmlrpc_c::value_string(out.str()); - - // weighted score - nBestXMLItem["totalScore"] = xmlrpc_c::value_double(path.GetTotalScore()); - nBestXml.push_back(xmlrpc_c::value_struct(nBestXMLItem)); - } - retData.insert(pair("nbest", xmlrpc_c::value_array(nBestXml))); - } - - void insertTranslationOptions(Manager& manager, map& retData) { - const TranslationOptionCollection* toptsColl = manager.getSntTranslationOptions(); - vector toptsXml; - for (size_t startPos = 0 ; startPos < toptsColl->GetSize() ; ++startPos) { - size_t maxSize = toptsColl->GetSize() - startPos; - size_t maxSizePhrase = StaticData::Instance().GetMaxPhraseLength(); - maxSize = std::min(maxSize, maxSizePhrase); - - for (size_t endPos = startPos ; endPos < startPos + maxSize ; ++endPos) { - WordsRange range(startPos,endPos); - const TranslationOptionList& fullList = toptsColl->GetTranslationOptionList(range); - for (size_t i = 0; i < fullList.size(); i++) { - const TranslationOption* topt = fullList.Get(i); - map toptXml; - toptXml["phrase"] = xmlrpc_c::value_string(topt->GetTargetPhrase(). - GetStringRep(StaticData::Instance().GetOutputFactorOrder())); - toptXml["fscore"] = xmlrpc_c::value_double(topt->GetFutureScore()); - toptXml["start"] = xmlrpc_c::value_int(startPos); - toptXml["end"] = xmlrpc_c::value_int(endPos); - vector scoresXml; - const std::valarray &scores = topt->GetScoreBreakdown().getCoreFeatures(); - for (size_t j = 0; j < scores.size(); ++j) { - scoresXml.push_back(xmlrpc_c::value_double(scores[j])); - } - toptXml["scores"] = xmlrpc_c::value_array(scoresXml); - toptsXml.push_back(xmlrpc_c::value_struct(toptXml)); - } - } - } - retData.insert(pair("topt", xmlrpc_c::value_array(toptsXml))); - } - - - -}; - - -int main(int argc, char** argv) -{ - - //Extract port and log, send other args to moses - char** mosesargv = new char*[argc+2]; - int mosesargc = 0; - int port = 8080; - const char* logfile = "/dev/null"; - bool isSerial = false; - - for (int i = 0; i < argc; ++i) { - if (!strcmp(argv[i],"--server-port")) { - ++i; - if (i >= argc) { - cerr << "Error: Missing argument to --server-port" << endl; - exit(1); - } else { - port = atoi(argv[i]); - } - } else if (!strcmp(argv[i],"--server-log")) { - ++i; - if (i >= argc) { - cerr << "Error: Missing argument to --server-log" << endl; - exit(1); - } else { - logfile = argv[i]; - } - } else if (!strcmp(argv[i], "--serial")) { - cerr << "Running single-threaded server" << endl; - isSerial = true; - } else { - mosesargv[mosesargc] = new char[strlen(argv[i])+1]; - strcpy(mosesargv[mosesargc],argv[i]); - ++mosesargc; - } - } - - Parameter* params = new Parameter(); - if (!params->LoadParam(mosesargc,mosesargv)) { - params->Explain(); - exit(1); - } - if (!StaticData::LoadDataStatic(params, argv[0])) { - exit(1); - } - - //512 MB data limit (512KB is not enough for optimization) - xmlrpc_limit_set(XMLRPC_XML_SIZE_LIMIT_ID, 512*1024*1024); - - xmlrpc_c::registry myRegistry; - - xmlrpc_c::methodPtr const translator(new Translator); - xmlrpc_c::methodPtr const updater(new Updater); - xmlrpc_c::methodPtr const optimizer(new Optimizer); - - myRegistry.addMethod("translate", translator); - myRegistry.addMethod("updater", updater); - myRegistry.addMethod("optimize", optimizer); - - xmlrpc_c::serverAbyss myAbyssServer( - myRegistry, - port, // TCP port on which to listen - logfile - ); - - cerr << "Listening on port " << port << endl; - if (isSerial) { - while(1) { - myAbyssServer.runOnce(); - } - } else { - myAbyssServer.run(); - } - // xmlrpc_c::serverAbyss.run() never returns - CHECK(false); - return 0; + // Map double-dash long options back to single-dash long options + // as used in legacy moses. + for (int i = 1; i < argc; ++i) + { + if (argv[i][0] == '-' && argv[i][1] == '-') + ++argv[i]; + } + char const* argv2[argc+1]; + for (int i = 0; i < argc; ++i) + argv2[i] = argv[i]; + argv2[argc] = "--server"; + return decoder_main(argc+1, argv2); } diff --git a/contrib/sigtest-filter/Makefile b/contrib/sigtest-filter/Makefile index 71de9c45fa..55772929a2 100644 --- a/contrib/sigtest-filter/Makefile +++ b/contrib/sigtest-filter/Makefile @@ -7,4 +7,4 @@ all: filter-pt filter-pt: filter-pt.cpp ./check-install $(SALMDIR) - $(CXX) -O6 $(INC) $(OBJS) -o filter-pt filter-pt.cpp + $(CXX) -O6 $(INC) $(OBJS) -o filter-pt filter-pt.cpp -lboost_thread -lboost_system -lpthread -lrt diff --git a/contrib/sigtest-filter/README.txt b/contrib/sigtest-filter/README.txt index b21129b890..819fc56433 100644 --- a/contrib/sigtest-filter/README.txt +++ b/contrib/sigtest-filter/README.txt @@ -12,7 +12,12 @@ BUILD INSTRUCTIONS 1. Download and build SALM. -2. make SALMDIR=/path/to/SALM +2. If your boost path is in a non-standard directory: + export CPLUS_INCLUDE_PATH=/path/to/boost/include + export LIBRARY_PATH=/path/to/boost/lib64 + +3. make SALMDIR=/path/to/SALM + USAGE INSTRUCTIONS diff --git a/contrib/sigtest-filter/WIN32_functions.cpp b/contrib/sigtest-filter/WIN32_functions.cpp index 60ddd340cd..989c727a20 100644 --- a/contrib/sigtest-filter/WIN32_functions.cpp +++ b/contrib/sigtest-filter/WIN32_functions.cpp @@ -1,231 +1,231 @@ -// XGetopt.cpp Version 1.2 -// -// Author: Hans Dietrich -// hdietrich2@hotmail.com -// -// Description: -// XGetopt.cpp implements getopt(), a function to parse command lines. -// -// History -// Version 1.2 - 2003 May 17 -// - Added Unicode support -// -// Version 1.1 - 2002 March 10 -// - Added example to XGetopt.cpp module header -// -// This software is released into the public domain. -// You are free to use it in any way you like. -// -// This software is provided "as is" with no expressed -// or implied warranty. I accept no liability for any -// damage or loss of business that this software may cause. -// -/////////////////////////////////////////////////////////////////////////////// - - -/////////////////////////////////////////////////////////////////////////////// -// if you are using precompiled headers then include this line: -/////////////////////////////////////////////////////////////////////////////// - - -/////////////////////////////////////////////////////////////////////////////// -// if you are not using precompiled headers then include these lines: -//#include -//#include -//#include -/////////////////////////////////////////////////////////////////////////////// - - -#include -#include -#include -#include "WIN32_functions.h" - - -/////////////////////////////////////////////////////////////////////////////// -// -// X G e t o p t . c p p -// -// -// NAME -// getopt -- parse command line options -// -// SYNOPSIS -// int getopt(int argc, char *argv[], char *optstring) -// -// extern char *optarg; -// extern int optind; -// -// DESCRIPTION -// The getopt() function parses the command line arguments. Its -// arguments argc and argv are the argument count and array as -// passed into the application on program invocation. In the case -// of Visual C++ programs, argc and argv are available via the -// variables __argc and __argv (double underscores), respectively. -// getopt returns the next option letter in argv that matches a -// letter in optstring. (Note: Unicode programs should use -// __targv instead of __argv. Also, all character and string -// literals should be enclosed in ( ) ). -// -// optstring is a string of recognized option letters; if a letter -// is followed by a colon, the option is expected to have an argument -// that may or may not be separated from it by white space. optarg -// is set to point to the start of the option argument on return from -// getopt. -// -// Option letters may be combined, e.g., "-ab" is equivalent to -// "-a -b". Option letters are case sensitive. -// -// getopt places in the external variable optind the argv index -// of the next argument to be processed. optind is initialized -// to 0 before the first call to getopt. -// -// When all options have been processed (i.e., up to the first -// non-option argument), getopt returns EOF, optarg will point -// to the argument, and optind will be set to the argv index of -// the argument. If there are no non-option arguments, optarg -// will be set to NULL. -// -// The special option "--" may be used to delimit the end of the -// options; EOF will be returned, and "--" (and everything after it) -// will be skipped. -// -// RETURN VALUE -// For option letters contained in the string optstring, getopt -// will return the option letter. getopt returns a question mark (?) -// when it encounters an option letter not included in optstring. -// EOF is returned when processing is finished. -// -// BUGS -// 1) Long options are not supported. -// 2) The GNU double-colon extension is not supported. -// 3) The environment variable POSIXLY_CORRECT is not supported. -// 4) The + syntax is not supported. -// 5) The automatic permutation of arguments is not supported. -// 6) This implementation of getopt() returns EOF if an error is -// encountered, instead of -1 as the latest standard requires. -// -// EXAMPLE -// BOOL CMyApp::ProcessCommandLine(int argc, char *argv[]) -// { -// int c; -// -// while ((c = getopt(argc, argv, ("aBn:"))) != EOF) -// { -// switch (c) -// { -// case ('a'): -// TRACE(("option a\n")); -// // -// // set some flag here -// // -// break; -// -// case ('B'): -// TRACE( ("option B\n")); -// // -// // set some other flag here -// // -// break; -// -// case ('n'): -// TRACE(("option n: value=%d\n"), atoi(optarg)); -// // -// // do something with value here -// // -// break; -// -// case ('?'): -// TRACE(("ERROR: illegal option %s\n"), argv[optind-1]); -// return FALSE; -// break; -// -// default: -// TRACE(("WARNING: no handler for option %c\n"), c); -// return FALSE; -// break; -// } -// } -// // -// // check for non-option args here -// // -// return TRUE; -// } -// -/////////////////////////////////////////////////////////////////////////////// - -char *optarg; // global argument pointer -int optind = 0; // global argv index - -int getopt(int argc, char *argv[], char *optstring) -{ - static char *next = NULL; - if (optind == 0) - next = NULL; - - optarg = NULL; - - if (next == NULL || *next =='\0') { - if (optind == 0) - optind++; - - if (optind >= argc || argv[optind][0] != ('-') || argv[optind][1] == ('\0')) { - optarg = NULL; - if (optind < argc) - optarg = argv[optind]; - return EOF; - } - - if (strcmp(argv[optind], "--") == 0) { - optind++; - optarg = NULL; - if (optind < argc) - optarg = argv[optind]; - return EOF; - } - - next = argv[optind]; - next++; // skip past - - optind++; - } - - char c = *next++; - char *cp = strchr(optstring, c); - - if (cp == NULL || c == (':')) - return ('?'); - - cp++; - if (*cp == (':')) { - if (*next != ('\0')) { - optarg = next; - next = NULL; - } else if (optind < argc) { - optarg = argv[optind]; - optind++; - } else { - return ('?'); - } - } - - return c; -} - -// for an overview, see -// W. Press, S. Teukolsky and W. Vetterling. (1992) Numerical Recipes in C. Chapter 6.1. -double lgamma(int x) -{ - // size_t xx=(size_t)x; xx--; size_t sum=1; while (xx) { sum *= xx--; } return log((double)(sum)); - if (x <= 2) { - return 0.0; - } - static double coefs[6] = {76.18009172947146, -86.50532032941677, 24.01409824083091, -1.231739572450155, 0.1208650973866179e-2, -0.5395239384953e-5}; - double tmp=(double)x+5.5; - tmp -= (((double)x)+0.5)*log(tmp); - double y=(double)x; - double sum = 1.000000000190015; - for (size_t j=0; j<6; ++j) { - sum += coefs[j]/++y; - } - return -tmp+log(2.5066282746310005*sum/(double)x); -} \ No newline at end of file +// XGetopt.cpp Version 1.2 +// +// Author: Hans Dietrich +// hdietrich2@hotmail.com +// +// Description: +// XGetopt.cpp implements getopt(), a function to parse command lines. +// +// History +// Version 1.2 - 2003 May 17 +// - Added Unicode support +// +// Version 1.1 - 2002 March 10 +// - Added example to XGetopt.cpp module header +// +// This software is released into the public domain. +// You are free to use it in any way you like. +// +// This software is provided "as is" with no expressed +// or implied warranty. I accept no liability for any +// damage or loss of business that this software may cause. +// +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// if you are using precompiled headers then include this line: +/////////////////////////////////////////////////////////////////////////////// + + +/////////////////////////////////////////////////////////////////////////////// +// if you are not using precompiled headers then include these lines: +//#include +//#include +//#include +/////////////////////////////////////////////////////////////////////////////// + + +#include +#include +#include +#include "WIN32_functions.h" + + +/////////////////////////////////////////////////////////////////////////////// +// +// X G e t o p t . c p p +// +// +// NAME +// getopt -- parse command line options +// +// SYNOPSIS +// int getopt(int argc, char *argv[], char *optstring) +// +// extern char *optarg; +// extern int optind; +// +// DESCRIPTION +// The getopt() function parses the command line arguments. Its +// arguments argc and argv are the argument count and array as +// passed into the application on program invocation. In the case +// of Visual C++ programs, argc and argv are available via the +// variables __argc and __argv (double underscores), respectively. +// getopt returns the next option letter in argv that matches a +// letter in optstring. (Note: Unicode programs should use +// __targv instead of __argv. Also, all character and string +// literals should be enclosed in ( ) ). +// +// optstring is a string of recognized option letters; if a letter +// is followed by a colon, the option is expected to have an argument +// that may or may not be separated from it by white space. optarg +// is set to point to the start of the option argument on return from +// getopt. +// +// Option letters may be combined, e.g., "-ab" is equivalent to +// "-a -b". Option letters are case sensitive. +// +// getopt places in the external variable optind the argv index +// of the next argument to be processed. optind is initialized +// to 0 before the first call to getopt. +// +// When all options have been processed (i.e., up to the first +// non-option argument), getopt returns EOF, optarg will point +// to the argument, and optind will be set to the argv index of +// the argument. If there are no non-option arguments, optarg +// will be set to NULL. +// +// The special option "--" may be used to delimit the end of the +// options; EOF will be returned, and "--" (and everything after it) +// will be skipped. +// +// RETURN VALUE +// For option letters contained in the string optstring, getopt +// will return the option letter. getopt returns a question mark (?) +// when it encounters an option letter not included in optstring. +// EOF is returned when processing is finished. +// +// BUGS +// 1) Long options are not supported. +// 2) The GNU double-colon extension is not supported. +// 3) The environment variable POSIXLY_CORRECT is not supported. +// 4) The + syntax is not supported. +// 5) The automatic permutation of arguments is not supported. +// 6) This implementation of getopt() returns EOF if an error is +// encountered, instead of -1 as the latest standard requires. +// +// EXAMPLE +// BOOL CMyApp::ProcessCommandLine(int argc, char *argv[]) +// { +// int c; +// +// while ((c = getopt(argc, argv, ("aBn:"))) != EOF) +// { +// switch (c) +// { +// case ('a'): +// TRACE(("option a\n")); +// // +// // set some flag here +// // +// break; +// +// case ('B'): +// TRACE( ("option B\n")); +// // +// // set some other flag here +// // +// break; +// +// case ('n'): +// TRACE(("option n: value=%d\n"), atoi(optarg)); +// // +// // do something with value here +// // +// break; +// +// case ('?'): +// TRACE(("ERROR: illegal option %s\n"), argv[optind-1]); +// return FALSE; +// break; +// +// default: +// TRACE(("WARNING: no handler for option %c\n"), c); +// return FALSE; +// break; +// } +// } +// // +// // check for non-option args here +// // +// return TRUE; +// } +// +/////////////////////////////////////////////////////////////////////////////// + +char *optarg; // global argument pointer +int optind = 0; // global argv index + +int getopt(int argc, char *argv[], char *optstring) +{ + static char *next = NULL; + if (optind == 0) + next = NULL; + + optarg = NULL; + + if (next == NULL || *next =='\0') { + if (optind == 0) + optind++; + + if (optind >= argc || argv[optind][0] != ('-') || argv[optind][1] == ('\0')) { + optarg = NULL; + if (optind < argc) + optarg = argv[optind]; + return EOF; + } + + if (strcmp(argv[optind], "--") == 0) { + optind++; + optarg = NULL; + if (optind < argc) + optarg = argv[optind]; + return EOF; + } + + next = argv[optind]; + next++; // skip past - + optind++; + } + + char c = *next++; + char *cp = strchr(optstring, c); + + if (cp == NULL || c == (':')) + return ('?'); + + cp++; + if (*cp == (':')) { + if (*next != ('\0')) { + optarg = next; + next = NULL; + } else if (optind < argc) { + optarg = argv[optind]; + optind++; + } else { + return ('?'); + } + } + + return c; +} + +// for an overview, see +// W. Press, S. Teukolsky and W. Vetterling. (1992) Numerical Recipes in C. Chapter 6.1. +double lgamma(int x) +{ + // size_t xx=(size_t)x; xx--; size_t sum=1; while (xx) { sum *= xx--; } return log((double)(sum)); + if (x <= 2) { + return 0.0; + } + static double coefs[6] = {76.18009172947146, -86.50532032941677, 24.01409824083091, -1.231739572450155, 0.1208650973866179e-2, -0.5395239384953e-5}; + double tmp=(double)x+5.5; + tmp -= (((double)x)+0.5)*log(tmp); + double y=(double)x; + double sum = 1.000000000190015; + for (size_t j=0; j<6; ++j) { + sum += coefs[j]/++y; + } + return -tmp+log(2.5066282746310005*sum/(double)x); +} diff --git a/contrib/sigtest-filter/WIN32_functions.h b/contrib/sigtest-filter/WIN32_functions.h index 6a719392eb..ad644018bd 100644 --- a/contrib/sigtest-filter/WIN32_functions.h +++ b/contrib/sigtest-filter/WIN32_functions.h @@ -1,24 +1,24 @@ -// XGetopt.h Version 1.2 -// -// Author: Hans Dietrich -// hdietrich2@hotmail.com -// -// This software is released into the public domain. -// You are free to use it in any way you like. -// -// This software is provided "as is" with no expressed -// or implied warranty. I accept no liability for any -// damage or loss of business that this software may cause. -// -/////////////////////////////////////////////////////////////////////////////// - -#ifndef XGETOPT_H -#define XGETOPT_H - -extern int optind, opterr; -extern char *optarg; - -int getopt(int argc, char *argv[], char *optstring); -double lgamma(int x); - -#endif //XGETOPT_H +// XGetopt.h Version 1.2 +// +// Author: Hans Dietrich +// hdietrich2@hotmail.com +// +// This software is released into the public domain. +// You are free to use it in any way you like. +// +// This software is provided "as is" with no expressed +// or implied warranty. I accept no liability for any +// damage or loss of business that this software may cause. +// +/////////////////////////////////////////////////////////////////////////////// + +#ifndef XGETOPT_H +#define XGETOPT_H + +extern int optind, opterr; +extern char *optarg; + +int getopt(int argc, char *argv[], char *optstring); +double lgamma(int x); + +#endif //XGETOPT_H diff --git a/contrib/sigtest-filter/filter-pt.cpp b/contrib/sigtest-filter/filter-pt.cpp index 6ab1a56575..50418d502e 100644 --- a/contrib/sigtest-filter/filter-pt.cpp +++ b/contrib/sigtest-filter/filter-pt.cpp @@ -1,9 +1,11 @@ -#include +#include #include #include #include #include +#include +#include #include "_SuffixArraySearchApplicationBase.h" @@ -11,18 +13,16 @@ #include #include +#include +#include +#include + #ifdef WIN32 #include "WIN32_functions.h" #else #include #endif -typedef std::vector SentIdSet; -typedef std::pair ClockedSentIdSet; -typedef std::map PhraseSetMap; - -#undef min - // constants const size_t MINIMUM_SIZE_TO_KEEP = 10000; // increase this to improve memory usage, // reduce for speed @@ -39,12 +39,9 @@ double sig_filter_limit = 0; // keep phrase pairs with -log(sig) > si // higher = filter-more bool pef_filter_only = false; // only filter based on pef bool hierarchical = false; -int max_cache = 0; -// globals -PhraseSetMap esets; -PhraseSetMap fsets; double p_111 = 0.0; // alpha +size_t pt_lines = 0; size_t nremoved_sigfilter = 0; size_t nremoved_pfefilter = 0; @@ -52,6 +49,69 @@ C_SuffixArraySearchApplicationBase e_sa; C_SuffixArraySearchApplicationBase f_sa; int num_lines; +boost::mutex in_mutex; +boost::mutex out_mutex; +boost::mutex err_mutex; + +typedef boost::shared_ptr > SentIdSet; + +class Cache { + typedef std::pair ClockedSet; + typedef boost::unordered_map ClockedMap; + + public: + + SentIdSet get(const std::string& phrase) { + boost::shared_lock lock(m_mutex); + if(m_cont.count(phrase)) { + ClockedSet& set = m_cont[phrase]; + set.second = clock(); + return set.first; + } + return SentIdSet( new SentIdSet::element_type() ); + } + + void put(const std::string& phrase, const SentIdSet set) { + boost::unique_lock lock(m_mutex); + m_cont[phrase] = std::make_pair(set, clock()); + } + + static void set_max_cache(size_t max_cache) { + s_max_cache = max_cache; + } + + void prune() { + if(s_max_cache > 0) { + boost::upgrade_lock lock(m_mutex); + if(m_cont.size() > s_max_cache) { + std::vector clocks; + for(ClockedMap::iterator it = m_cont.begin(); it != m_cont.end(); it++) + clocks.push_back(it->second.second); + + std::sort(clocks.begin(), clocks.end()); + clock_t out = clocks[m_cont.size() - s_max_cache]; + + boost::upgrade_to_unique_lock uniq_lock(lock); + for(ClockedMap::iterator it = m_cont.begin(); it != m_cont.end(); it++) + if(it->second.second < out) + m_cont.erase(it); + } + } + } + + private: + ClockedMap m_cont; + boost::shared_mutex m_mutex; + static size_t s_max_cache; +}; + +size_t Cache::s_max_cache = 0; + +Cache f_cache; +Cache e_cache; + +#undef min + void usage() { std::cerr << "\nFilter phrase table using significance testing as described\n" @@ -59,12 +119,13 @@ void usage() << "by Discarding Most of the Phrasetable. EMNLP 2007.\n" << "\nUsage:\n" << "\n filter-pt -e english.suf-arr -f french.suf-arr\n" - << " [-c] [-p] [-l threshold] [-n num] < PHRASE-TABLE > FILTERED-PHRASE-TABLE\n\n" + << " [-c] [-p] [-l threshold] [-n num] [-t num] < PHRASE-TABLE > FILTERED-PHRASE-TABLE\n\n" << " [-l threshold] >0.0, a+e, or a-e: keep values that have a -log significance > this\n" << " [-n num ] 0, 1...: 0=no filtering, >0 sort by P(e|f) and keep the top num elements\n" << " [-c ] add the cooccurence counts to the phrase table\n" << " [-p ] add -log(significance) to the phrasetable\n" << " [-h ] filter hierarchical rule table\n" + << " [-t num ] use num threads\n" << " [-m num ] limit cache to num most recent phrases\n"; exit(1); } @@ -133,9 +194,6 @@ PTEntry::PTEntry(const std::string& str, int index) : *fp++=0; this->pfe = atof(f); - - // std::cerr << "L: " << f_phrase << " ::: " << e_phrase << " ::: " << scores << " ::: " << pfe << std::endl; - // std::cerr << "X: " << extra << "\n"; } struct PfeComparer { @@ -168,7 +226,8 @@ std::ostream& operator << (std::ostream& os, const PTEntry& pp) void print(int a, int b, int c, int d, float p) { std::cerr << a << "\t" << b << "\t P=" << p << "\n" - << c << "\t" << d << "\t xf=" << (double)(b)*(double)(c)/(double)(a+1)/(double)(d+1) << "\n\n"; + << c << "\t" << d << "\t xf=" + << (double)(b)*(double)(c)/(double)(a+1)/(double)(d+1) << "\n\n"; } // 2x2 (one-sided) Fisher's exact test @@ -184,13 +243,13 @@ double fisher_exact(int cfe, int ce, int cf) int d = (num_lines - ce - cf + cfe); int n = a + b + c + d; - double cp = exp(lgamma(1+a+c) + lgamma(1+b+d) + lgamma(1+a+b) + lgamma(1+c+d) - lgamma(1+n) - lgamma(1+a) - lgamma(1+b) - lgamma(1+c) - lgamma(1+d)); + double cp = exp(lgamma(1+a+c) + lgamma(1+b+d) + lgamma(1+a+b) + lgamma(1+c+d) + - lgamma(1+n) - lgamma(1+a) - lgamma(1+b) - lgamma(1+c) + - lgamma(1+d)); double total_p = 0.0; int tc = std::min(b,c); for (int i=0; i<=tc; i++) { total_p += cp; -// double lg = lgamma(1+a+c) + lgamma(1+b+d) + lgamma(1+a+b) + lgamma(1+c+d) - lgamma(1+n) - lgamma(1+a) - lgamma(1+b) - lgamma(1+c) - lgamma(1+d); double cp = exp(lg); -// print(a,b,c,d,cp); double coef = (double)(b)*(double)(c)/(double)(a+1)/(double)(d+1); cp *= coef; ++a; @@ -202,86 +261,73 @@ double fisher_exact(int cfe, int ce, int cf) } template -setType ordered_set_intersect(setType & set_1, setType & set_2) +void ordered_set_intersect(setType& out, const setType set_1, const setType set_2) { - setType set_out; - std::set_intersection(set_1.begin(), set_1.end(), set_2.begin(), set_2.end(), inserter(set_out,set_out.begin()) ); - return set_out; + std::set_intersection(set_1->begin(), set_1->end(), set_2->begin(), + set_2->end(), inserter(*out, out->begin()) ); } -SentIdSet lookup_phrase(const std::string & phrase, C_SuffixArraySearchApplicationBase & my_sa) +void lookup_phrase(SentIdSet& ids, const std::string& phrase, + C_SuffixArraySearchApplicationBase & my_sa, Cache& cache) { - SentIdSet occur_set; - vector locations; + ids = cache.get(phrase); + if(ids->empty()) { + vector locations; + locations = my_sa.locateExactPhraseInCorpus(phrase.c_str()); + if(locations.size()==0) { + cerr<<"No occurrences found!!\n"; + } + for (vector::iterator i=locations.begin(); + i != locations.end(); ++i) { + ids->push_back(i->sentIdInCorpus); + } - locations = my_sa.locateExactPhraseInCorpus(phrase.c_str()); - if(locations.size()==0) { - cerr<<"No occurrences found!!\n"; - } - for (vector::iterator i=locations.begin(); i != locations.end(); ++i) { - occur_set.push_back(i->sentIdInCorpus); + std::sort(ids->begin(), ids->end()); + SentIdSet::element_type::iterator it = + std::unique(ids->begin(), ids->end()); + ids->resize(it - ids->begin()); + + if(ids->size() >= MINIMUM_SIZE_TO_KEEP) + cache.put(phrase, ids); } - - std::sort(occur_set.begin(), occur_set.end()); - SentIdSet::iterator it = std::unique(occur_set.begin(), occur_set.end()); - occur_set.resize(it - occur_set.begin()); - - return occur_set; } - -// slight simplicifaction: we consider all sentences in which "a" and "b" occur to be instances of the rule "a [X][X] b". -SentIdSet lookup_multiple_phrases(vector & phrases, C_SuffixArraySearchApplicationBase & my_sa, const std::string & rule, PhraseSetMap & cache) +void lookup_multiple_phrases(SentIdSet& ids, vector & phrases, + C_SuffixArraySearchApplicationBase & my_sa, + const std::string & rule, Cache& cache) { if (phrases.size() == 1) { - return lookup_phrase(phrases.front(), my_sa); + lookup_phrase(ids, phrases.front(), my_sa, cache); } - else { - SentIdSet main_set; - ClockedSentIdSet & clocked_first_set = cache[phrases.front()]; - SentIdSet & first_set = clocked_first_set.first; - clocked_first_set.second = clock(); - + SentIdSet main_set( new SentIdSet::element_type() ); bool first = true; - if (first_set.empty()) { - first_set = lookup_phrase(phrases.front(), my_sa); - } - for (vector::iterator phrase=phrases.begin()+1; phrase != phrases.end(); ++phrase) { - ClockedSentIdSet & clocked_temp_set = cache[*phrase]; - SentIdSet & temp_set = clocked_temp_set.first; - clocked_temp_set.second = clock(); - - if (temp_set.empty()) { - temp_set = lookup_phrase(*phrase, my_sa); - } + SentIdSet first_set( new SentIdSet::element_type() ); + lookup_phrase(first_set, phrases.front(), my_sa, cache); + for (vector::iterator phrase=phrases.begin()+1; + phrase != phrases.end(); ++phrase) { + SentIdSet temp_set( new SentIdSet::element_type() ); + lookup_phrase(temp_set, *phrase, my_sa, cache); if (first) { - main_set = ordered_set_intersect(first_set,temp_set); + ordered_set_intersect(main_set, first_set, temp_set); first = false; } else { - main_set = ordered_set_intersect(main_set,temp_set); - } - if (temp_set.size() < MINIMUM_SIZE_TO_KEEP) { - cache.erase(*phrase); + SentIdSet new_set( new SentIdSet::element_type() ); + ordered_set_intersect(new_set, main_set, temp_set); + main_set->swap(*new_set); } } - - if (first_set.size() < MINIMUM_SIZE_TO_KEEP) { - cache.erase(phrases.front()); - } - - return main_set; + ids->swap(*main_set); } } -SentIdSet find_occurrences(const std::string& rule, C_SuffixArraySearchApplicationBase & my_sa, PhraseSetMap & cache) +void find_occurrences(SentIdSet& ids, const std::string& rule, + C_SuffixArraySearchApplicationBase& my_sa, Cache& cache) { - SentIdSet sa_set; - // we search for hierarchical rules by stripping away NT and looking for terminals sequences // if a rule contains multiple sequences of terminals, we intersect their occurrences. if (hierarchical) { @@ -305,76 +351,142 @@ SentIdSet find_occurrences(const std::string& rule, C_SuffixArraySearchApplicati phrases.push_back(rule.substr(pos,NTStartPos-pos)); } - sa_set = lookup_multiple_phrases(phrases, my_sa, rule, cache); + lookup_multiple_phrases(ids, phrases, my_sa, rule, cache); } else { - sa_set = lookup_phrase(rule, my_sa); + lookup_phrase(ids, rule, my_sa, cache); } - return sa_set; } // input: unordered list of translation options for a single source phrase -void compute_cooc_stats_and_filter(std::vector& options) +void compute_cooc_stats_and_filter(std::vector& options, + Cache& f_cache, Cache& e_cache) { - if (pfe_filter_limit>0 && options.size() > pfe_filter_limit) { + if (pfe_filter_limit > 0 && options.size() > pfe_filter_limit) { nremoved_pfefilter += (options.size() - pfe_filter_limit); - std::nth_element(options.begin(), options.begin()+pfe_filter_limit, options.end(), PfeComparer()); - for (std::vector::iterator i=options.begin()+pfe_filter_limit; i != options.end(); ++i) + std::nth_element(options.begin(), options.begin() + pfe_filter_limit, + options.end(), PfeComparer()); + for (std::vector::iterator i = options.begin() + pfe_filter_limit; + i != options.end(); ++i) delete *i; - options.erase(options.begin()+pfe_filter_limit,options.end()); + options.erase(options.begin() + pfe_filter_limit,options.end()); } - if (pef_filter_only) return; -// std::cerr << "f phrase: " << options.front()->f_phrase << "\n"; - SentIdSet fset; - fset = find_occurrences(options.front()->f_phrase, f_sa, fsets); - size_t cf = fset.size(); - for (std::vector::iterator i=options.begin(); i != options.end(); ++i) { + + if (pef_filter_only) + return; + + if (options.empty()) + return; + + SentIdSet fset( new SentIdSet::element_type() ); + find_occurrences(fset, options.front()->f_phrase, f_sa, f_cache); + size_t cf = fset->size(); + + for (std::vector::iterator i = options.begin(); + i != options.end(); ++i) { const std::string& e_phrase = (*i)->e_phrase; - size_t cef=0; - ClockedSentIdSet& clocked_eset = esets[e_phrase]; - SentIdSet & eset = clocked_eset.first; - clocked_eset.second = clock(); - if (eset.empty()) { - eset = find_occurrences(e_phrase, e_sa, esets); - //std::cerr << "Looking up e-phrase: " << e_phrase << "\n"; - } - size_t ce=eset.size(); - if (ce < cf) { - for (SentIdSet::iterator i=eset.begin(); i != eset.end(); ++i) { - if (std::binary_search(fset.begin(), fset.end(), *i)) cef++; - } - } else { - for (SentIdSet::iterator i=fset.begin(); i != fset.end(); ++i) { - if (std::binary_search(eset.begin(), eset.end(), *i)) cef++; - } - } + SentIdSet eset( new SentIdSet::element_type() ); + find_occurrences(eset, e_phrase, e_sa, e_cache); + size_t ce = eset->size(); + + SentIdSet efset( new SentIdSet::element_type() ); + ordered_set_intersect(efset, fset, eset); + size_t cef = efset->size(); + double nlp = -log(fisher_exact(cef, cf, ce)); (*i)->set_cooc_stats(cef, cf, ce, nlp); - if (ce < MINIMUM_SIZE_TO_KEEP) { - esets.erase(e_phrase); - } - } + std::vector::iterator new_end = - std::remove_if(options.begin(), options.end(), NlogSigThresholder(sig_filter_limit)); + std::remove_if(options.begin(), options.end(), + NlogSigThresholder(sig_filter_limit)); nremoved_sigfilter += (options.end() - new_end); options.erase(new_end,options.end()); } -void prune_cache(PhraseSetMap & psm) { - if(max_cache && psm.size() > max_cache) { - std::vector clocks; - for(PhraseSetMap::iterator it = psm.begin(); it != psm.end(); it++) - clocks.push_back(it->second.second); - - std::sort(clocks.begin(), clocks.end()); - clock_t out = clocks[psm.size()-max_cache]; - - for(PhraseSetMap::iterator it = psm.begin(); it != psm.end(); it++) - if(it->second.second < out) - psm.erase(it); +void filter(std::istream* in, std::ostream* out, int pfe_index) { + + std::vector lines; + std::string prev = ""; + std::vector options; + while(true) { + { + boost::mutex::scoped_lock lock(in_mutex); + if(in->eof()) + break; + + lines.clear(); + std::string line; + while(getline(*in, line) && lines.size() < 500000) + lines.push_back(line); + } + + std::stringstream out_temp; + for(std::vector::iterator it = lines.begin(); it != lines.end(); it++) { + size_t tmp_lines = ++pt_lines; + if(tmp_lines % 10000 == 0) { + boost::mutex::scoped_lock lock(err_mutex); + std::cerr << "."; + + if(tmp_lines % 500000 == 0) + std::cerr << "[n:" << tmp_lines << "]\n"; + + if(tmp_lines % 10000000 == 0) { + float pfefper = (100.0*(float)nremoved_pfefilter)/(float)pt_lines; + float sigfper = (100.0*(float)nremoved_sigfilter)/(float)pt_lines; + std::cerr << "------------------------------------------------------\n" + << " unfiltered phrases pairs: " << pt_lines << "\n" + << "\n" + << " P(f|e) filter [first]: " << nremoved_pfefilter << " (" << pfefper << "%)\n" + << " significance filter: " << nremoved_sigfilter << " (" << sigfper << "%)\n" + << " TOTAL FILTERED: " << (nremoved_pfefilter + nremoved_sigfilter) << " (" << (sigfper + pfefper) << "%)\n" + << "\n" + << " FILTERED phrase pairs: " << (pt_lines - nremoved_pfefilter - nremoved_sigfilter) << " (" << (100.0-sigfper - pfefper) << "%)\n" + << "------------------------------------------------------\n"; + } + } + + if(pt_lines % 10000 == 0) { + f_cache.prune(); + e_cache.prune(); + } + + if(it->length() > 0) { + PTEntry* pp = new PTEntry(it->c_str(), pfe_index); + if (prev != pp->f_phrase) { + prev = pp->f_phrase; + + if (!options.empty()) { // always true after first line + compute_cooc_stats_and_filter(options, f_cache, e_cache); + } + + for (std::vector::iterator i = options.begin(); + i != options.end(); ++i) { + out_temp << **i << '\n'; + delete *i; + } + + options.clear(); + options.push_back(pp); + + } else { + options.push_back(pp); + } + } + } + boost::mutex::scoped_lock lock(out_mutex); + *out << out_temp.str() << std::flush; } + compute_cooc_stats_and_filter(options, f_cache, e_cache); + + boost::mutex::scoped_lock lock(out_mutex); + for (std::vector::iterator i = options.begin(); + i != options.end(); ++i) { + *out << **i << '\n'; + delete *i; + } + *out << std::flush; } int main(int argc, char * argv[]) @@ -383,7 +495,9 @@ int main(int argc, char * argv[]) const char* efile=0; const char* ffile=0; int pfe_index = 2; - while ((c = getopt(argc, argv, "cpf:e:i:n:l:m:h")) != -1) { + int threads = 1; + size_t max_cache = 0; + while ((c = getopt(argc, argv, "cpf:e:i:n:t:l:m:h")) != -1) { switch (c) { case 'e': efile = optarg; @@ -398,6 +512,14 @@ int main(int argc, char * argv[]) pfe_filter_limit = atoi(optarg); std::cerr << "P(f|e) filter limit: " << pfe_filter_limit << std::endl; break; + case 't': + threads = atoi(optarg); + std::cerr << "Using threads: " << threads << std::endl; + break; + case 'm': + max_cache = atoi(optarg); + std::cerr << "Using max phrases in caches: " << max_cache << std::endl; + break; case 'c': print_cooc_counts = true; break; @@ -407,9 +529,6 @@ int main(int argc, char * argv[]) case 'h': hierarchical = true; break; - case 'm': - max_cache = atoi(optarg); - break; case 'l': std::cerr << "-l = " << optarg << "\n"; if (strcmp(optarg,"a+e") == 0) { @@ -429,6 +548,7 @@ int main(int argc, char * argv[]) usage(); } } + if (sig_filter_limit == 0.0) pef_filter_only = true; //----------------------------------------------------------------------------- if (optind != argc || ((!efile || !ffile) && !pef_filter_only)) { @@ -460,52 +580,17 @@ int main(int argc, char * argv[]) std::cerr << "Filtering using P(e|f) only. n=" << pfe_filter_limit << std::endl; } - char tmpString[10000]; - std::string prev = ""; - std::vector options; - size_t pt_lines = 0; - while(!cin.eof()) { - cin.getline(tmpString,10000,'\n'); - if(++pt_lines%10000==0) { - std::cerr << "."; - - prune_cache(esets); - prune_cache(fsets); - - if(pt_lines%500000==0) - std::cerr << "[n:"<0) { - PTEntry* pp = new PTEntry(tmpString, pfe_index); - if (prev != pp->f_phrase) { - prev = pp->f_phrase; + boost::thread_group threadGroup; + for(int i = 0; i < threads; i++) + threadGroup.add_thread(new boost::thread(filter, &std::cin, &std::cout, pfe_index)); + threadGroup.join_all(); - if (!options.empty()) { // always true after first line - compute_cooc_stats_and_filter(options); - } - for (std::vector::iterator i=options.begin(); i != options.end(); ++i) { - std::cout << **i << std::endl; - delete *i; - } - options.clear(); - options.push_back(pp); - - } else { - options.push_back(pp); - } - // for(int i=0;i& rv ) { return str<*> operator>> ( StringInput ps, Numbered& rv ) { return pair*>(ps,&rv); } friend StringInput operator>> ( pair*> delimbuff, const char* psPostDelim ) { - return ( (SD3[0]=='\0') ? delimbuff.first>>SD1>>delimbuff.second->i>>SD2>>delimbuff.second->setT()>>psPostDelim + return ( (SD3[0]=='\0') ? delimbuff.first>>SD1>>delimbuff.second->i>>SD2>>delimbuff.second->setT()>>psPostDelim : delimbuff.first>>SD1>>delimbuff.second->i>>SD2>>delimbuff.second->setT()>>SD3>>psPostDelim ); } }; @@ -106,7 +106,7 @@ template pair ArchetypeSet::getDistanceOfNearest ( const V& v ) const { //const Scored > > sipvDummy ( DBL_MAX ); //MinHeap > > > hsiv ( MapType::size()+1, sipvDummy ); - MinHeap > > >& hsiv = + MinHeap > > >& hsiv = const_cast > > >&> ( hsivCalc ); hsiv.clear(); @@ -120,7 +120,7 @@ pair ArchetypeSet::getDistanceOfNearest ( const typename V::ElementType d = v.getMarginalDistance ( hsiv.get(iNext).first, hsiv.get(iNext).second.getRef() ); hsiv.set(iNext).setScore() = d; //hsiv.set(iNext).setScore() = v.getMarginalDistance ( hsiv.getMin().first, iUpper->second.second ); - ////int j = + ////int j = hsiv.fixDecr(iNext); ////cerr<<" adding ln"<<&hsiv.get(j).second.getRef()<<" marg-dist="< ArchetypeSet::getDistanceOfNearest ( const typename V::ElementType d = v.getMarginalDistance ( ++hsiv.setMin().first, hsiv.getMin().second.getRef() ); hsiv.setMin().setScore() += d; ////cerr<<" matching ln"<<&hsiv.getMin().second.getRef()<<" i="< ArchetypeSet::getDistanceOfNearest ( const hsiv.set(iNext).second = SafePtr ( iUpper->second ); typename V::ElementType d = v.getMarginalDistance ( hsiv.get(iNext).first, hsiv.get(iNext).second.getRef() ); hsiv.set(iNext).setScore() = d; - ////int j = + ////int j = hsiv.fixDecr(iNext); ////cerr<<" adding ln"<<&hsiv.get(j).second.getRef()<<" marg-dist="< ArchetypeSet::getDistanceOfNearest ( const hsiv.set(iNext).second = SafePtr ( iLower->second ); typename V::ElementType d = v.getMarginalDistance ( hsiv.get(iNext).first, hsiv.get(iNext).second.getRef() ); hsiv.set(iNext).setScore() = d; - ////int j = + ////int j = hsiv.fixDecr(iNext); ////cerr<<" adding ln"<<&hsiv.get(j).second.getRef()<<" marg-dist="< #include -using namespace std; +using namespace std; //////////////////////////////////////////////////////////////////////////////// diff --git a/contrib/synlm/hhmm/rvtl/include/nl-beam.h b/contrib/synlm/hhmm/rvtl/include/nl-beam.h index 398babe21e..817e962062 100644 --- a/contrib/synlm/hhmm/rvtl/include/nl-beam.h +++ b/contrib/synlm/hhmm/rvtl/include/nl-beam.h @@ -101,8 +101,8 @@ class Beam { void write(FILE *pf){ /* for (typename BeamMap::const_iterator i = mkid.begin(); i != mkid.end(); i++){ i->first.write(pf); - fprintf(pf, " %d ", i->second.first); -// i->second.second.write(pf); + fprintf(pf, " %d ", i->second.first); +// i->second.second.write(pf); fprintf(pf, "\n"); } */ diff --git a/contrib/synlm/hhmm/rvtl/include/nl-cpt.h b/contrib/synlm/hhmm/rvtl/include/nl-cpt.h index 67a1a10210..dbfb947e31 100644 --- a/contrib/synlm/hhmm/rvtl/include/nl-cpt.h +++ b/contrib/synlm/hhmm/rvtl/include/nl-cpt.h @@ -24,7 +24,7 @@ #ifndef _NL_CPT__ #define _NL_CPT__ -//#include +//#include //#include //#include //#include @@ -394,7 +394,7 @@ class SimpleMap : public map { private: typedef map OrigMap; static const Y yDummy; - + public: // Constructor / destructor methods... SimpleMap ( ) : OrigMap() { } @@ -899,7 +899,7 @@ class GenericHidVarCPTModel : public SimpleHash& getDistrib ( const K& k ) const { return HKYP::get(k); } - + P& setProb ( const Y& y, const K& k ) { pair& yp = HKYP::set(k).add(); yp.first = y; diff --git a/contrib/synlm/hhmm/rvtl/include/nl-crf.h b/contrib/synlm/hhmm/rvtl/include/nl-crf.h index 44744ad030..a9b233b235 100644 --- a/contrib/synlm/hhmm/rvtl/include/nl-crf.h +++ b/contrib/synlm/hhmm/rvtl/include/nl-crf.h @@ -36,7 +36,7 @@ // //////////////////////////////////////////////////////////////////////////////// -template +template class CRF3DModeledRV : public Y { private: @@ -90,7 +90,7 @@ template SafeArray5D,int,int,int,int,float> //////////////////////////////////////////////////////////////////////////////// -template +template Prob CRF3DModeledRV::getProb( const X1& x1, const X2& x2 ) const { SafeArray2D aaCnds ( cardOff, cardSh ) ; @@ -131,7 +131,7 @@ Prob CRF3DModeledRV::getProb( const X1& x1, const X2& x2 ) const { for ( int configRghtValSite=0; configRghtValSite<(1<::getProb( const X1& x1, const X2& x2 ) const { //////////////////////////////////////////////////////////////////////////////// -template +template bool CRF3DModeledRV::readModelFields ( char* aps[], int numFields ) { if ( 7==numFields ) setPotential ( X1(string(aps[1])), // globals @@ -172,7 +172,7 @@ bool CRF3DModeledRV::readModelFields ( char* aps[], int numFields ) { //////////////////////////////////////////////////////////////////////////////// -template +template void CRF3DModeledRV::writeObservCliqueConfigs ( FILE* pf, int frame, const char* psMdl, const X1& x1, const X2& x2, bool bObsVal ) const { fprintf ( pf, "%04d> %s ", frame, psMdl ); @@ -199,7 +199,7 @@ void CRF3DModeledRV::writeObservCliqueConfigs ( FILE* pf, int frame, co // //////////////////////////////////////////////////////////////////////////////// -template +template class CRF4DModeledRV : public Y { private: @@ -247,13 +247,13 @@ template int CRF4DModeledRV::c template int CRF4DModeledRV::cardCnd = 0; template int CRF4DModeledRV::bitsVal = 0; template int CRF4DModeledRV::bitsValSite = 0; -template SafeArray5D,int,int,int,int,float> +template SafeArray5D,int,int,int,int,float> CRF4DModeledRV::aaaaaPotentials; /* template SafeArray3D CRF4DModeledRV::aaaCnds; */ //////////////////////////////////////////////////////////////////////////////// -template +template Prob CRF4DModeledRV::getProb( const X1& x1, const X2& x2, const X3& x3 ) const { SafeArray2D aaCnds ( cardOff, cardSh ) ; @@ -294,7 +294,7 @@ Prob CRF4DModeledRV::getProb( const X1& x1, const X2& x2, const X3& for ( int configRghtValSite=0; configRghtValSite<(1<::getProb( const X1& x1, const X2& x2, const X3& //////////////////////////////////////////////////////////////////////////////// -template +template bool CRF4DModeledRV::readModelFields ( char* aps[], int numFields ) { if ( 7==numFields ) setPotential ( X1(string(aps[1])), // globals @@ -335,9 +335,9 @@ bool CRF4DModeledRV::readModelFields ( char* aps[], int numFields ) //////////////////////////////////////////////////////////////////////////////// -template +template void CRF4DModeledRV::writeObservCliqueConfigs ( FILE* pf, int frame, const char* psMdl, - const X1& x1, const X2& x2, + const X1& x1, const X2& x2, const X3& x3, bool bObsVal ) const { fprintf ( pf, "%04d> %s ", frame, psMdl ); // For each shape (feature slope)... diff --git a/contrib/synlm/hhmm/rvtl/include/nl-denot.h b/contrib/synlm/hhmm/rvtl/include/nl-denot.h index 0b50663a17..be92168b86 100644 --- a/contrib/synlm/hhmm/rvtl/include/nl-denot.h +++ b/contrib/synlm/hhmm/rvtl/include/nl-denot.h @@ -80,7 +80,7 @@ void VecE::read ( char* ps, const ReaderContext& rc ) { */ char* psT; int i=0; for ( char* psU=strtok_r(ps,",",&psT); - psU && i::set(i) = psU; } @@ -166,7 +166,7 @@ void VecV::read ( char* ps, VecVReaderContext& rc ) { // Chop into individual coinds strings... char* psT; int i=0; for ( char* psU=strtok_r(ps,",",&psT); - psU && i { static const int NUM_ENTS; // Constructor / destructor methods... JointVecV ( ) { } - JointVecV ( const V1& a1, const V2& a2 ) { + JointVecV ( const V1& a1, const V2& a2 ) { ////fprintf(stderr,"iJoin "); a1.V1::write(stderr); fprintf(stderr," "); a2.V2::write(stderr); fprintf(stderr,"\n"); for (int i=0; i, public Tree >* ptr = this; - while ( !ptr->isTerm() ) { + while ( !ptr->isTerm() ) { double sumsqr=0.0; for(A a;a >::getWt(); @@ -112,7 +112,7 @@ class ContDTree2DModel : public Generic2DModel, public Tree +template bool ContDTree2DModel::readFields ( char* aps[], int numFields ) { if ( /*aps[0]==sId &&*/ (3==numFields || 4==numFields) ) { //fprintf(stderr,"%s,%d\n",aps[3],numFields); @@ -171,7 +171,7 @@ class ContDTree3DModel : public Generic3DModel { }; //////////////////// -template +template bool ContDTree3DModel::readFields ( char* aps[], int numFields ) { if ( /*aps[0]==sId &&*/ (4==numFields || 5==numFields) ) { //fprintf(stderr,"%s,%d\n",aps[3],numFields); @@ -212,7 +212,7 @@ bool ContDTree3DModel::readFields ( char* aps[], int numFields ) { //////////////////////////////////////////////////////////////////////////////// template -class TrainableContDTree2DModel : public ContDTree2DModel { +class TrainableContDTree2DModel : public ContDTree2DModel { private: List > lxy; public: @@ -225,7 +225,7 @@ class TrainableContDTree2DModel : public ContDTree2DModel { void train ( List >&, const double ) ; void train ( const double d ) { train(lxy,d); } ////// Input / output methods... - bool readData ( char* vs[], int numFields ) { + bool readData ( char* vs[], int numFields ) { if ( 3==numFields ) lxy.add() = Joint2DRV ( X(vs[1]), Y(vs[2]) ); else return false; return true; @@ -312,7 +312,7 @@ void TrainableContDTree2DModel::train ( List >& lxy, cons // if ( double(rand())/double(RAND_MAX) < prRarest/modelY.getProb(pxy->getSub2()) ) { dCtr++; - double gamma = dTot/(dTot+dCtr); // 1.0/(double(epoch)+dCtr/dTot); // 1.0/double(epoch); // 1.0/(double(epoch)+dCtr/(dTot*prRarest*2.0)); // + double gamma = dTot/(dTot+dCtr); // 1.0/(double(epoch)+dCtr/dTot); // 1.0/double(epoch); // 1.0/(double(epoch)+dCtr/(dTot*prRarest*2.0)); // // Weight deltas for next epoch... Wt wDelta = 0.0; @@ -333,7 +333,7 @@ void TrainableContDTree2DModel::train ( List >& lxy, cons P prY = 1.0 / ( 1.0 + exp(-wtdavg) ); // Calc deltas for each feature/attribute/dimension... - double dEachWt = 1.0/dTot; // 1.0/dTot * modelY.getProb ( Y(1-pxy->getSub2().toInt()) ); // 1.0/(dTot*prRarest*2.0); // + double dEachWt = 1.0/dTot; // 1.0/dTot * modelY.getProb ( Y(1-pxy->getSub2().toInt()) ); // 1.0/(dTot*prRarest*2.0); // wDelta += dEachWt * -1 * ( prY - P(double(pxy->getSub2().toInt())) ); for ( A a; agetSub1().get(a.toInt()) * ( prY - P(double(pxy->getSub2().toInt())) ); @@ -439,7 +439,7 @@ void TrainableContDTree2DModel::train ( List >& lxy, cons //////////////////////////////////////////////////////////////////////////////// template -class TrainableContDTree3DModel : public ContDTree3DModel { +class TrainableContDTree3DModel : public ContDTree3DModel { private: @@ -455,7 +455,7 @@ class TrainableContDTree3DModel : public ContDTree3DModel { TrainableContDTree2DModel& setTree(const X1& x1) { return static_cast&>(ContDTree3DModel::setTree(x1)); } ////// Add training data to per-subphone lists... - bool readData ( char* vs[], int numFields ) { + bool readData ( char* vs[], int numFields ) { if ( 4==numFields ) { mqlxy[X1(vs[1])].add() = Joint2DRV ( X2(vs[2]), Y(vs[3]) ); ////mqlxy[X1(vs[1])].getLast()->write(stderr); fprintf(stderr,"\n"); diff --git a/contrib/synlm/hhmm/rvtl/include/nl-dtree.h b/contrib/synlm/hhmm/rvtl/include/nl-dtree.h index 2396f395cb..93a0e4d42a 100644 --- a/contrib/synlm/hhmm/rvtl/include/nl-dtree.h +++ b/contrib/synlm/hhmm/rvtl/include/nl-dtree.h @@ -129,8 +129,8 @@ class DTree2DModel : public Tree < typename X::ElementType, DecisNode > { friend StringInput operator>> ( pair*> si_m, const char* psD ) { if (StringInput(NULL)==si_m.first) return si_m.first; Y y; String xs; StringInput si,si2; si=si_m.first; DTree2DModel* pm=si_m.second; - while((si2=si>>" ")!=NULL)si=si2; - si=si>>xs>>" "; + while((si2=si>>" ")!=NULL)si=si2; + si=si>>xs>>" "; while((si2=si>>" ")!=NULL)si=si2; // Find appropriate node, creating nodes as necessary... for(int i=1; i > { if ( si!=NULL && si[0]==':' ) { si=si>>": "; - while((si2=si>>" ")!=NULL)si=si2; + while((si2=si>>" ")!=NULL)si=si2; si=si>>y>>" "; - while((si2=si>>" ")!=NULL)si=si2; + while((si2=si>>" ")!=NULL)si=si2; si=si>>"= "; - while((si2=si>>" ")!=NULL)si=si2; + while((si2=si>>" ")!=NULL)si=si2; // Specify attribute number (at nonterminal) or probability in distribution (at terminal)... return (si!=NULL) ? si>>pm->setProb(y)>>psD : si; } else if ( si!=NULL && si[0]=='=' ) { si=si>>"= "; //cerr<<" in after equals "<<((si==NULL) ? "yes" : "no") << endl; - while((si2=si>>" ")!=NULL)si=si2; + while((si2=si>>" ")!=NULL)si=si2; //m.setA() = atoi(si.c_str()); int aVar = 0; - si=si>>aVar>>psD; - pm->setA()=aVar; + si=si>>aVar>>psD; + pm->setA()=aVar; ////cerr<<" at end "<<((si==NULL) ? "yes" : "no") << endl; ////cerr<<" m.getA() is "<< m.getA().toInt() << endl; return si; @@ -169,15 +169,15 @@ class DTree2DModel : public Tree < typename X::ElementType, DecisNode > { si=si_m.first; sRt = si.c_str(); if (sRt.find(':')!=string::npos) { - while((si2=si>>" [")!=NULL)si=si2; - si=si>>xs>>"] "; - while((si2=si>>" ")!=NULL)si=si2; + while((si2=si>>" [")!=NULL)si=si2; + si=si>>xs>>"] "; + while((si2=si>>" ")!=NULL)si=si2; si=si>>": "; - while((si2=si>>" ")!=NULL)si=si2; + while((si2=si>>" ")!=NULL)si=si2; si=si>>y>>" "; - while((si2=si>>" ")!=NULL)si=si2; + while((si2=si>>" ")!=NULL)si=si2; si=si>>"= "; - + // For DTree, must find the node labeled by X //Tree >* ptr = m; //assert(ptr); @@ -189,15 +189,15 @@ class DTree2DModel : public Tree < typename X::ElementType, DecisNode > { // Specify attribute number (at nonterminal) or probability in distribution (at terminal)... return (si!=NULL) ? si>>m.setProb(y)>>psD : si; } else { - while((si2=si>>" [")!=NULL)si=si2; + while((si2=si>>" [")!=NULL)si=si2; si=si>>xs>>"] "; //cerr<<" in bracket "<<((si==NULL) ? "yes" : "no") << endl; - while((si2=si>>" ")!=NULL)si=si2; + while((si2=si>>" ")!=NULL)si=si2; si=si>>"= "; //cerr<<" in after equals "<<((si==NULL) ? "yes" : "no") << endl; //m.setA() = atoi(si.c_str()); int aVar = 0; - si=si>>aVar>>psD; - m.setA()=aVar; + si=si>>aVar>>psD; + m.setA()=aVar; //cerr<<" at end "<<((si==NULL) ? "yes" : "no") << endl; //cerr<<" m.getA() is "<< m.getA().toInt() << endl; return si; @@ -209,7 +209,7 @@ class DTree2DModel : public Tree < typename X::ElementType, DecisNode > { }; //////////////////// -template +template bool DTree2DModel::readFields ( Array& aps ) { if ( /*aps[0]==sId &&*/ (3==aps.size() || 4==aps.size()) ) { //fprintf(stderr,"%s,%d\n",aps[3],numFields); @@ -269,7 +269,7 @@ class DTree3DModel { }; //////////////////// -template +template bool DTree3DModel::readFields ( char* aps[], int numFields ) { if ( /*aps[0]==sId &&*/ (4==numFields || 5==numFields) ) { //fprintf(stderr,"%s,%d\n",aps[3],numFields); @@ -307,7 +307,7 @@ bool DTree3DModel::readFields ( char* aps[], int numFields ) { //////////////////////////////////////////////////////////////////////////////// template -class TrainableDTree2DModel : public DTree2DModel { +class TrainableDTree2DModel : public DTree2DModel { private: // Type members... typedef typename X::ElementType B; @@ -485,7 +485,7 @@ void TrainableDTree2DModel::train ( List >& lxy, const De //////////////////////////////////////////////////////////////////////////////// template -class TrainableDTree3DModel : public DTree3DModel { +class TrainableDTree3DModel : public DTree3DModel { private: diff --git a/contrib/synlm/hhmm/rvtl/include/nl-fixedmatrix.h b/contrib/synlm/hhmm/rvtl/include/nl-fixedmatrix.h index dbb9d9d9d4..5e8b4d6d03 100644 --- a/contrib/synlm/hhmm/rvtl/include/nl-fixedmatrix.h +++ b/contrib/synlm/hhmm/rvtl/include/nl-fixedmatrix.h @@ -34,7 +34,7 @@ class Matrix : public SafeArray2D,Id,T> { Matrix ( ) : SafeArray2D,Id,T>( ) { }//{ xSize=0; ySize=0; } Matrix (int x, int y) : SafeArray2D,Id,T>(x,y) { }//{ xSize=x; ySize=y; } Matrix (int x, int y, const T& t) : SafeArray2D,Id,T>(x,y,t) { }//{ xSize=x; ySize=y; } - Matrix (const Matrix& a) : SafeArray2D,Id,T>(a.xSize(),a.ySize()) { //xSize=a.xSize; ySize=a.ySize; + Matrix (const Matrix& a) : SafeArray2D,Id,T>(a.xSize(),a.ySize()) { //xSize=a.xSize; ySize=a.ySize; for(int i=0;iset(i,j)=a.get(i,j); } // Specification methods... //Matrix& operator= ( const Matrix& sat ) @@ -195,34 +195,34 @@ class Matrix : public SafeArray2D,Id,T> { } return false; } - bool operator== ( const Matrix& a ) const { + bool operator== ( const Matrix& a ) const { if (xSize()!=a.xSize() || ySize()!=a.ySize()) return false; - for (int i=0;iget(Id(i),Id(j))!=a.get(Id(i),Id(j))) return false; return true; } // Input/output methods... - friend ostream& operator<< ( ostream& os, const Matrix& a ) { + friend ostream& operator<< ( ostream& os, const Matrix& a ) { os<<"\n "; for (int i=0;i(i),Id(j)); - } + } os<<(i==a.xSize()-1?"\n":"\n "); } - return os; + return os; } - friend String& operator<< ( String& str, const Matrix& a ) { + friend String& operator<< ( String& str, const Matrix& a ) { str<<"\n "; for (int i=0;i(i),Id(j)); - } + } str<<";"; } - return str; + return str; } string getString( ) const; @@ -234,7 +234,7 @@ string Matrix::getString() const { for (int j=0;jget(Id(i),Id(j)); - } + } str += ";"; } return str; diff --git a/contrib/synlm/hhmm/rvtl/include/nl-gauss.h b/contrib/synlm/hhmm/rvtl/include/nl-gauss.h index a2213086f9..f5cc45159d 100644 --- a/contrib/synlm/hhmm/rvtl/include/nl-gauss.h +++ b/contrib/synlm/hhmm/rvtl/include/nl-gauss.h @@ -43,7 +43,7 @@ static const PDFVal VARIANCE_THRESHOLD = 0.01; //0.0001; //0 // //////////////////////////////////////////////////////////////////////////////// -template +template class DiagGauss1DModel : public Generic1DModel { private: // Member variables... @@ -53,7 +53,7 @@ class DiagGauss1DModel : public Generic1DModel { SimpleHash,PDFVal> aMeans; SimpleHash,PDFVal> aVariances; PDFVal prInvRootNormVariances; - PDFVal prProduct; + PDFVal prProduct; SimpleHash,PDFVal> algprNegHalfInvVariances; public: // Constructor / destructor methods... @@ -78,7 +78,7 @@ class DiagGauss1DModel : public Generic1DModel { }; //////////////////////////////////////// -template +template inline void DiagGauss1DModel::precomputeVarianceTerms ( ) { // Inverse square root of norm of variances... setInvRootNormVar() = 1.0; @@ -92,7 +92,7 @@ inline void DiagGauss1DModel::precomputeVarianceTerms ( ) { } //////////////////////////////////////// -template +template inline PDFVal DiagGauss1DModel::getProb ( const Y& y ) const { // fprintf(stderr,"--------------------\n"); // y.write(stderr); @@ -109,7 +109,7 @@ inline PDFVal DiagGauss1DModel::getProb ( const Y& y ) const { } //////////////////////////////////////// -template +template bool DiagGauss1DModel::readFields ( char* as[], int numFields ) { if ( 0==strcmp(as[1],"m") && numFields>2 ) { char* psT; @@ -126,12 +126,12 @@ bool DiagGauss1DModel::readFields ( char* as[], int numFields ) { } //////////////////////////////////////// -template +template void DiagGauss1DModel::writeFields ( FILE* pf, const string& sPref ) const { fprintf(pf,"%s m = ",sPref.c_str()); for(int i=0; i::writeFields ( FILE* pf, const string& sPref ) const { //////////////////////////////////////////////////////////////////////////////// /* -template +template class DiagGauss2DModel : public Generic2DModel { private: // Member variables... @@ -177,7 +177,7 @@ class DiagGauss2DModel : public Generic2DModel { //////////////////////////////////////////////////////////////////////////////// -template +template class DiagGauss3DModel : public Generic3DModel { private: // Member variables... @@ -220,7 +220,7 @@ class DiagGauss3DModel : public Generic3DModel { // //////////////////////////////////////////////////////////////////////////////// -template +template class TrainableDiagGauss1DModel : public DiagGauss1DModel { public: TrainableDiagGauss1DModel ( ) : DiagGauss1DModel() { } diff --git a/contrib/synlm/hhmm/rvtl/include/nl-hash.h b/contrib/synlm/hhmm/rvtl/include/nl-hash.h index 809284db9e..b4d228b9c8 100644 --- a/contrib/synlm/hhmm/rvtl/include/nl-hash.h +++ b/contrib/synlm/hhmm/rvtl/include/nl-hash.h @@ -54,7 +54,7 @@ class SimpleHash : public hash_map,SimpleHashEqual > /*pu // tr1::unordered_map,SimpleHashEqual > mxy; static const Y yDummy; //static Y yNonconstDummy; - + public: // typedef typename OrigHash::const_iterator const_iterator; // typedef typename OrigHash::iterator iterator; diff --git a/contrib/synlm/hhmm/rvtl/include/nl-hmm.h b/contrib/synlm/hhmm/rvtl/include/nl-hmm.h index 2f6cd01041..c4414c4b7b 100644 --- a/contrib/synlm/hhmm/rvtl/include/nl-hmm.h +++ b/contrib/synlm/hhmm/rvtl/include/nl-hmm.h @@ -209,7 +209,7 @@ template void HMM::debugPrint() const{ for (int frame=0, numFrames=aatnTrellis.getxSize(); frame 0) { @@ -306,7 +306,7 @@ void HMM::updateRanked ( const typename MX::RandVarType& x, bool b1 ) // Add best transition (top of queue)... //mx.getProb(o,my.setTrellDat(ashpiQueue.getTop().first,ashpiQueue.getTop().second)); if ( ashpiQueue.getSize() > 0 ) { - S s; my.setTrellDat(s,ashpiQueue.getTop().second); + S s; my.setTrellDat(s,ashpiQueue.getTop().second); bFull |= btn.tryAdd ( s, IB(ashpiQueue.getTop().first,my.setBackDat(ashpiQueue.getTop().second)), ashpiQueue.getTop().third ); ////cerr<::updateSerial ( const typename MX::RandVarType& x ) { // Incorporate into trellis... btn.tryAdd ( s, IB(i,my.setBackDat(y)), lgprFull ); //if(OUTPUT_VERYNOISY) - // fprintf ( stderr," (S_t-1:[e^%0.6f] * Y:e^%0.6f * X:e^%0.6f = S_t:[e^%0.6f])\n", + // fprintf ( stderr," (S_t-1:[e^%0.6f] * Y:e^%0.6f * X:e^%0.6f = S_t:[e^%0.6f])\n", // float(aatnTrellis.get(frameLast-1,i).getLogProb().toInt())/100.0, // float(lgprY.toInt())/100.0, // float(lgprX.toInt())/100.0, @@ -389,7 +389,7 @@ void HMM::updateSerial ( const typename MX::RandVarType& x ) { } // for(int i=0;i "); btn.get(i)->first.write(stderr); fprintf(stderr,"\n"); +// fprintf(stderr,"> "); btn.get(i)->first.write(stderr); fprintf(stderr,"\n"); // } btn.sort(atnSorted); @@ -429,8 +429,8 @@ void HMM::each ( const typename MX::RandVarType& x, Beam& tnsbPrev = aatnTrellis.get(frameLast-1,i); // If prob still not below beam minimum... if ( tnsbPrev.getLogProb() > btn.getMin().getScore() ) { - //if (OUTPUT_VERYNOISY) { fprintf(stderr,"FROM: "); tnsbPrev.getId().write(stderr); fprintf(stderr,"\n"); } - + //if (OUTPUT_VERYNOISY) { fprintf(stderr,"FROM: "); tnsbPrev.getId().write(stderr); fprintf(stderr,"\n"); } + // For each possible transition... const S& sPrev = tnsbPrev.getId(); typename MY::IterVal y; @@ -447,7 +447,7 @@ void HMM::each ( const typename MX::RandVarType& x, Beam "<::each ( const typename MX::RandVarType& x, Beam HMM::getMLS(const S& sLast) const { //// sprintf(tmp,"HYPOTH %04d> ", fr-1); //// string tString(tmp); //// tString += - string tString = + string tString = //// aatnTrellis.get(fr,iBest).getId().getString() + " " + aatnTrellis.get(fr,iBest).getBackData().getString() //// + "\n" @@ -737,7 +737,7 @@ template void HMM::writeCurr ( ostream& os, int f=-1 ) const { if ( -1==f ) f=frameLast; if ( 0<=f && f<=frameLast ) - for ( int i=0; i::writeCurrSum ( FILE* pf, int f=-1 ) const { if ( 0<=f && f<=frameLast ) { LogProb sum = 0.0; LogProb logtop = 0.0; - for ( int i=0; i::gatherElementsInBeam( SafeArray1D,pair > result->init(BEAM_WIDTH); if ( -1==f ) f=frameLast; if ( 0<=f && f<=frameLast ) { - for ( int i=0; iset(i).first = aatnTrellis.get(f,i).getId(); result->set(i).second = aatnTrellis.get(f,i).getLogProb(); } @@ -836,7 +836,7 @@ void HMM::writeCurrEntropy ( FILE* pf, int f=-1 ) const { if ( 0<=f && f<=frameLast ) { LogProb logh = 0.0; LogProb logtop = 0.0; - for ( int i=0; i::writeCurrDepths ( FILE* pf, int f=-1 ) const { Array depths = Array(); Array logprobs = Array(); double avgdepth = 0.0; - for ( int i=0; i::getBeamUsed ( int f=-1 ) const { if ( -1==f ) f=frameLast; int ctr=0; if ( 0<=f && f<=frameLast ) - for ( int i=0; i::updateRanked ( const typename MO::RandVarType& o ) { // Add best transition (top of queue)... //mo.getProb(o,mh.setTrellDat(axhpiQueue.getTop().first,axhpiQueue.getTop().second)); if ( axhpiQueue.getSize() > 0 ) { - X x; mh.setTrellDat(x,axhpiQueue.getTop().second); + X x; mh.setTrellDat(x,axhpiQueue.getTop().second); bFull |= btn.tryAdd ( x, IB(axhpiQueue.getTop().first,mh.setBackDat(axhpiQueue.getTop().second)), axhpiQueue.getTop().third ); //cerr<::updateSerial ( const typename MO::RandVarType& o ) { // Incorporate into trellis... btn.tryAdd ( x, IB(i,mh.setBackDat(h)), lgprFull ); //if(OUTPUT_VERYNOISY) - // fprintf ( stderr," (X_t-1:[e^%0.6f] * H:e^%0.6f * O:e^%0.6f = X_t:[e^%0.6f])\n", + // fprintf ( stderr," (X_t-1:[e^%0.6f] * H:e^%0.6f * O:e^%0.6f = X_t:[e^%0.6f])\n", // float(aatnTrellis.get(frameLast-1,i).getLogProb().toInt())/100.0, // float(lgprH.toInt())/100.0, // float(lgprO.toInt())/100.0, @@ -351,7 +351,7 @@ void HMM::updateSerial ( const typename MO::RandVarType& o ) { } // for(int i=0;i "); btn.get(i)->first.write(stderr); fprintf(stderr,"\n"); +// fprintf(stderr,"> "); btn.get(i)->first.write(stderr); fprintf(stderr,"\n"); // } btn.sort(atnSorted); @@ -390,8 +390,8 @@ void HMM::each ( const typename MO::RandVarType& o, Beam& tnxbPrev = aatnTrellis.get(frameLast-1,i); // If prob still not below beam minimum... if ( tnxbPrev.getLogProb() > btn.getMin().getScore() ) { - //if (OUTPUT_VERYNOISY) { fprintf(stderr,"FROM: "); tnxbPrev.getId().write(stderr); fprintf(stderr,"\n"); } - + //if (OUTPUT_VERYNOISY) { fprintf(stderr,"FROM: "); tnxbPrev.getId().write(stderr); fprintf(stderr,"\n"); } + // For each possible transition... const X& xPrev = tnxbPrev.getId(); typename MH::IterVal h; @@ -408,7 +408,7 @@ void HMM::each ( const typename MO::RandVarType& o, Beam "<::each ( const typename MO::RandVarType& o, Beam HMM::getMLS(const X& xLast) const { //// sprintf(tmp,"HYPOTH %04d> ", fr-1); //// string tString(tmp); //// tString += - string tString = + string tString = //// aatnTrellis.get(fr,iBest).getId().getString() + " " + aatnTrellis.get(fr,iBest).getBackData().getString() //// + "\n" @@ -697,7 +697,7 @@ template void HMM::writeCurr ( FILE* pf, int f=-1 ) const { if ( -1==f ) f=frameLast; if ( 0<=f && f<=frameLast ) - for ( int i=0; i::writeCurrSum ( FILE* pf, int f=-1 ) const { if ( 0<=f && f<=frameLast ) { LogProb sum = 0.0; LogProb logtop = 0.0; - for ( int i=0; i::writeCurrEntropy ( FILE* pf, int f=-1 ) const { if ( 0<=f && f<=frameLast ) { LogProb logh = 0.0; LogProb logtop = 0.0; - for ( int i=0; i::writeCurrDepths ( FILE* pf, int f=-1 ) const { Array depths = Array(); Array logprobs = Array(); double avgdepth = 0.0; - for ( int i=0; i::getBeamUsed ( int f=-1 ) const { if ( -1==f ) f=frameLast; int ctr=0; if ( 0<=f && f<=frameLast ) - for ( int i=0; i& HMMLoop::update ( const typename MX::RandVarTyp //modX.getProb(o,modY.setTrellDat(ashpiQueue.getTop().first,ashpiQueue.getTop().second)); if ( ashpiQueue.getSize() > 0 ) { S s ( ashpiQueue.getTop().second ); - ////S s; modY.setTrellDat(s,ashpiQueue.getTop().second); + ////S s; modY.setTrellDat(s,ashpiQueue.getTop().second); bFull |= btn.tryAdd ( s, IB(ashpiQueue.getTop().first,B(ashpiQueue.getTop().second)), ashpiQueue.getTop().third ); ////cerr< operator- ( ElementType d ) const { Vector vO; for(uint i=0;i operator* ( ElementType d, const Vector& v ) { Vector vO; for(uint i=0;i operator/ ( ElementType d, const Vector& v ) { Vector vO; for(uint i=0;i operator+ ( ElementType d, const Vector& v ) { Vector vO; for(uint i=0;i operator- ( ElementType d, const Vector& v ) { Vector vO; for(uint i=0;i operator+ ( ElementType d, const Vector& v ) { Vector vO; for(uint i=0;i operator- ( ElementType d, const Vector& v ) { Vector vO; for(uint i=0;i& operator*= ( ElementType d ) { for(uint i=0;i& operator/= ( ElementType d ) { for(uint i=0;i& operator+= ( ElementType d ) { for(uint i=0;i +#include #define Listed(x) ListedObject diff --git a/contrib/synlm/hhmm/rvtl/include/nl-mixture.h b/contrib/synlm/hhmm/rvtl/include/nl-mixture.h index 2da5aacb20..3a88bea814 100644 --- a/contrib/synlm/hhmm/rvtl/include/nl-mixture.h +++ b/contrib/synlm/hhmm/rvtl/include/nl-mixture.h @@ -97,7 +97,7 @@ class Mixture3DModel : public Generic2DModel { // //////////////////////////////////////////////////////////////////////////////// -template
    DateTimeTestnameRevisionBranchTimePrevtimePrevrevChange (%)Time (Basebranch)Change (%, Basebranch)Time (Days -2)Change (%, Days -2)Time (Days -3)Change (%, Days -3)Time (Days -4)Change (%, Days -4)Time (Days -5)Change (%, Days -5)Time (Days -6)Change (%, Days -6)Time (Days -7)Change (%, Days -7)Time (Days -14)Change (%, Days -14)Time (Years -1)Change (%, Years -1)
    ' + str(resline.previous) + '' + str(resline.percentage) + '' + str(resline.percentage) + '' + str(resline.percentage) + '
    ' + logLine2.date + '' + logLine2.time + '' +\ + res1.testname + '' + res1.revision[:10] + '' + res1.branch + '' +\ + str(res1.current) + '' + str(res1.previous) + '' + res1.prevrev[:10] + '' + str(res1.percentage) + '' + str(res1.percentage) + '' + str(res1.percentage) + '' + str(res2.previous) + '' + str(res2.percentage) + '' + str(res2.percentage) + '' + str(res2.percentage) + 'N/AN/A