Welcome to mirror list, hosted at ThFree Co, Russian Federation.

XmlOption.h « src « moses - github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: e211a63986293f4f213f50b14070af5c2849bfbf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once

#include <vector>
#include <string>

/** This struct is used for storing XML force translation data for a given range in the sentence
 */
struct XmlOption {

	size_t startPos, endPos;
	std::vector<std::string> targetPhrases;
	std::vector<float> targetScores;

	XmlOption(int s, int e, std::string targetPhrase, float targetScore): startPos(s), endPos(e) {
		targetPhrases.push_back(targetPhrase);
		targetScores.push_back(targetScore);
	}

};

std::vector<XmlOption> ProcessAndStripXMLTags(std::string& line);