Skip to content

Commit

Permalink
[tokenizers] Fixes ZeroShotClassificationTranslator bug (#3581)
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanktliu authored Jan 15, 2025
1 parent 20af02a commit a4e61ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ public class ZeroShotClassificationServingTranslator
private Translator<ZeroShotClassificationInput, ZeroShotClassificationOutput> translator;

/**
* Constructs a {@code TokenClassificationServingTranslator} instance.
* Constructs a {@code ZeroShotClassificationServingTranslator} instance.
*
* @param translator a {@code Translator} processes token classification input
* @param translator a {@code Translator} processes zero-shot-classification input
*/
public ZeroShotClassificationServingTranslator(
Translator<ZeroShotClassificationInput, ZeroShotClassificationOutput> translator) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ private String applyTemplate(String template, String arg) {
return template + arg;
}
int len = template.length();
return template.substring(0, pos) + arg + template.substring(pos + 1, len);
return template.substring(0, pos) + arg + template.substring(pos + 2, len);
}

/**
Expand Down

0 comments on commit a4e61ea

Please sign in to comment.