Skip to content

Commit

Permalink
add redundant tags
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanVukovic99 committed Jun 11, 2024
1 parent 2e11e2a commit 2e6c177
Show file tree
Hide file tree
Showing 9 changed files with 1,098 additions and 525 deletions.
11 changes: 9 additions & 2 deletions 3-tidy-up.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const blacklistedTags = [
'includes-article',
'obsolete',
'archaic',
'used-in-the-form'
'used-in-the-form',
];

const identityTags = [
Expand All @@ -115,6 +115,11 @@ const identityTags = [
'infinitive',
]

const redundantTags = [
'multiword-construction',
'combined-form'
];

let lineCount = 0;
consoleOverwrite(`3-tidy-up.js started...`);

Expand All @@ -137,10 +142,12 @@ function handleLine(line) {
if (word && pos && senses) {
if (forms) {
forms.forEach((formData) => {
const { form, tags } = formData;
const { form } = formData;
let { tags } = formData;
if(!form) return;
if(!tags) return;
if(form === '-') return;
tags = tags.filter(tag => !redundantTags.includes(tag));
const isBlacklisted = tags.some(value => blacklistedTags.includes(value));
if (isBlacklisted) return;
const isIdentity = !tags.some(value => !identityTags.includes(value));
Expand Down
Loading

0 comments on commit 2e6c177

Please sign in to comment.