Skip to content

Commit

Permalink
Optimize the smart subjects
Browse files Browse the repository at this point in the history
  • Loading branch information
Dlurak committed Jul 3, 2024
1 parent 5416c2e commit 5d52690
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/lib/utils/dlool/smartSubject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,17 @@ const exactPairs = [
'Sport',
'Spanisch',
'Kunst',
'Französisch'
'Französisch',

'Spanish',
'French',
'German'
];

const rules: SmartDetectRule[] = [
...exactPairs.map((subject) => ({ subject, pattern: genRegex(subject) })),
{
subject: 'Mathemathik',
subject: 'Mathematik',
pattern: /^math?e/
},
{
Expand All @@ -48,7 +52,11 @@ const rules: SmartDetectRule[] = [
pattern: /^bio/
},
{
subject: 'Biologie',
subject: 'Religion',
pattern: /^reli/
},
{
subject: 'Religion',
pattern: /^reli/
}
];
Expand Down

0 comments on commit 5d52690

Please sign in to comment.