Latest commit to Fred's git server
This commit is contained in:
1 parent
a3879a6d64
commit
86e4024d72
8 files changed
+366
-5
No files matched your search
@@ -0,0 +1,12 @@
|
||||
#include "tokenizer/opennmt_adapter.hpp"
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
TEST(OpenNMTAdapter, ModeSwitch) {
|
||||
OpenNMTAdapter tokenizer("config.json");
|
||||
|
||||
auto bpe_tokens = tokenizer.encode("hello", OpenNMTAdapter::Mode::BPE);
|
||||
auto sp_tokens = tokenizer.encode("hello", OpenNMTAdapter::Mode::SENTENCEPIECE);
|
||||
|
||||
EXPECT_NE(bpe_tokens, sp_tokens); // Different tokenization schemes
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user