/usr/include/apertium-3.4/apertium/tmx_translate.h is in apertium-dev 3.4.2~r68466-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | /*************************************************************************
* *
* (C) Copyright 2004. Media Research Centre at the *
* Sociology and Communications Department of the *
* Budapest University of Technology and Economics. *
* *
* Developed by Daniel Varga. *
* *
* From hunalign; for license see ../AUTHORS and ../COPYING.hunalign *
* *
*************************************************************************/
#ifndef __TMXALIGNER_ALIGNMENT_TRANSLATE_H
#define __TMXALIGNER_ALIGNMENT_TRANSLATE_H
#include <apertium/tmx_words.h>
#include <apertium/tmx_dictionary.h>
namespace TMXAligner
{
typedef std::map< std::string, Phrase > DumbDictionary;
// This will become a class, with dictionary initialization, and a translate method.
// It will have various implementations.
void buildDumbDictionary( const DictionaryItems& dictionary, DumbDictionary& dumbDictionary );
void buildDumbDictionaryUsingFrequencies(
const DictionaryItems& dictionary,
FrequencyMap& enFreq,
DumbDictionary& dumbDictionary );
void buildDumbDictionary( TMXAligner::DumbDictionary& dumbDictionary,
const std::string& dictionaryFilename,
const TMXAligner::SentenceList& enSentenceList = TMXAligner::SentenceList()
);
void trivialTranslateWord(
const DumbDictionary& dumbDictionary,
const Word& originalWord,
Phrase& words
);
void trivialTranslate(
const DumbDictionary& dumbDictionary,
const Sentence& sentence,
Sentence& translatedSentence
);
void trivialTranslateSentenceList(
const DumbDictionary& dumbDictionary,
const SentenceList& sentenceList,
SentenceList& translatedSentenceList
);
void naiveTranslate(
const DictionaryItems& dictionary,
const SentenceList& sentenceList,
SentenceList& translatedSentenceList
);
typedef std::multimap< std::string, Phrase > DumbMultiDictionary;
void buildDumbMultiDictionary( const DictionaryItems& dictionary, DumbMultiDictionary& dumbMultiDictionary, bool reverse );
void sortNormalizeSentences( TMXAligner::SentenceList& sentenceList );
// This function preprocesses the sentences so that sentenceListsToAlignMatrixIdentity can be applied to them.
// It does a rough translation and an alphabetic sort of words.
void normalizeTextsForIdentity( const DictionaryItems& dictionary,
const SentenceList& huSentenceListPretty, const SentenceList& enSentenceListPretty,
SentenceList& huSentenceListGarbled, SentenceList& enSentenceListGarbled );
} // namespace TMXAligner
#endif // #define __TMXALIGNER_ALIGNMENT_TRANSLATE_H
|