Commit 1d3599a3 authored by lintangsutawika's avatar lintangsutawika
Browse files

add sampler condition for if target is multiple, and target_delimiter is " "

parent 87e147e1
...@@ -48,7 +48,9 @@ class Sampler: ...@@ -48,7 +48,9 @@ class Sampler:
) )
+ self.target_delimiter + self.target_delimiter
+ ( + (
self.doc_to_target(doc) self.doc_to_target(doc)[0]
if type(self.doc_to_target(doc)) is list
else self.doc_to_target(doc)
if ( if (
self.config.doc_to_choice is None self.config.doc_to_choice is None
or type(self.doc_to_target(doc)) is str or type(self.doc_to_target(doc)) is str
......
...@@ -21,6 +21,7 @@ filter_list: ...@@ -21,6 +21,7 @@ filter_list:
filter: filter:
- function: remove_whitespace - function: remove_whitespace
- function: take_first - function: take_first
target_delimiter: " "
metric_list: metric_list:
- metric: exact_match - metric: exact_match
aggregation: mean aggregation: mean
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment