Add unmodified emojis as lemma annotation
Change-Id: Ibea3dc4d74571fe13dd969894694a59a5bfcf918
diff --git a/test/test.js b/test/test.js
index ee1d498..b935c19 100644
--- a/test/test.js
+++ b/test/test.js
@@ -6,9 +6,9 @@
// Modify the command based on your script's location and options
const command = 'node src/index.js -s < test/data/ndy.conllu';
const stdout = execSync(command).toString();
- expect(stdout).toContain('😂\t_\t_\tEMOIMG');
+ expect(stdout).toContain('😂\t😂\tEMOIMG\tEMOIMG');
var emoimg_count = (stdout.match(/EMOIMG/g) || []).length;
- expect(emoimg_count).toBe(191);
+ expect(emoimg_count).toBe(382);
var ascimg_count = (stdout.match(/EMOASC/g) || []).length;
expect(ascimg_count).toBe(30);
var url_count = (stdout.match(/\tURL\t/g) || []).length;
@@ -27,9 +27,9 @@
test('Test full mode', (done) => {
const command = 'node src/index.js < test/data/ndy.conllu';
const stdout = execSync(command).toString();
- expect(stdout).toContain('😂\t_\t_\tEMOIMG');
+ expect(stdout).toContain('😂\t😂\tEMOIMG\tEMOIMG');
var emoimg_count = (stdout.match(/EMOIMG/g) || []).length;
- expect(emoimg_count).toBe(191);
+ expect(emoimg_count).toBe(382);
var ascimg_count = (stdout.match(/EMOASC/g) || []).length;
expect(ascimg_count).toBe(30);
var url_count = (stdout.match(/\tURL\t/g) || []).length;
@@ -54,13 +54,13 @@
const { execSync } = require('child_process');
const stdout = execSync('node src/index.js', { input: testInput }).toString();
- // Check that compound emojis are tagged as EMOIMG in XPOS column only
- expect(stdout).toContain('✊🏿\t_\t_\tEMOIMG');
- expect(stdout).toContain('👨👨👦\t_\t_\tEMOIMG');
+ // Check that compound emojis are tagged as EMOIMG and lemma has base emoji
+ expect(stdout).toContain('✊🏿\t✊\tEMOIMG\tEMOIMG');
+ expect(stdout).toContain('👨👨👦\t👨\tEMOIMG\tEMOIMG');
// Count EMOIMG occurrences (should be 1 per emoji - only in XPOS column)
var emoimg_count = (stdout.match(/EMOIMG/g) || []).length;
- expect(emoimg_count).toBe(2); // 2 emojis × 1 column = 2
+ expect(emoimg_count).toBe(4); // 2 emojis × 2 columns = 4
done();
});