зеркало из https://github.com/microsoft/mwt-ds.git
fix feature serialization
This commit is contained in:
Родитель
ccc82d72de
Коммит
dbb9b809a9
|
@ -187,7 +187,7 @@ namespace Microsoft.DecisionService.Crawl
|
|||
if (!string.IsNullOrEmpty(keywords))
|
||||
{
|
||||
response.Keywords = keywords.Split(',').Select(k => WebUtility.HtmlDecode(k.Trim())).ToList();
|
||||
response.Features = JsonConvert.SerializeObject(
|
||||
response.Features =
|
||||
new HtmlFeatures
|
||||
{
|
||||
Keywords = new HtmlKeywordFeatures
|
||||
|
@ -195,7 +195,7 @@ namespace Microsoft.DecisionService.Crawl
|
|||
// make sure individual keywords are represented as individual VW features
|
||||
Keywords = string.Join(" ", response.Keywords.Select(k => k.Replace(' ', '_')))
|
||||
}
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
// build article
|
||||
|
|
|
@ -54,6 +54,6 @@ namespace Microsoft.DecisionService.Crawl.Data
|
|||
public string Video { get; set; }
|
||||
|
||||
[JsonProperty("features", NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string Features { get; set; }
|
||||
public object Features { get; set; }
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче