mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-27 22:14:57 +03:00
redo property API
This commit is contained in:
parent
7142eb5c1f
commit
e5184bc496
@ -38,17 +38,12 @@ void SpanLength::Evaluate(const InputType &input
|
||||
{
|
||||
assert(stackVec);
|
||||
|
||||
boost::shared_ptr<PhraseProperty> property;
|
||||
bool hasProperty = targetPhrase.GetProperty("SpanLength", property);
|
||||
|
||||
if (!hasProperty) {
|
||||
const PhraseProperty *property = targetPhrase.GetProperty("SpanLength");
|
||||
if (property == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
PhraseProperty *prop = property.get();
|
||||
SpanLengthPhraseProperty *slProp = static_cast<SpanLengthPhraseProperty*>(prop);
|
||||
assert(slProp);
|
||||
|
||||
const SpanLengthPhraseProperty *slProp = static_cast<const SpanLengthPhraseProperty*>(property);
|
||||
string str = slProp->GetValueString();
|
||||
|
||||
const Phrase *ruleSource = targetPhrase.GetRuleSource();
|
||||
|
Loading…
Reference in New Issue
Block a user