feat(autotag) language related tags

This commit is contained in:
SansGuidon 2025-01-20 10:16:24 +00:00
parent 24eb94373d
commit 7e1ef76677

View File

@ -33,7 +33,7 @@ function auto_tag_plugin_init(ConfigManager $conf)
'cloudron' => 'cloudron,hosting', 'cloudron' => 'cloudron,hosting',
'(comic),-comic-,comics,bandes dessinées' => 'comics,reading-and-literature,culture,humor', '(comic),-comic-,comics,bandes dessinées' => 'comics,reading-and-literature,culture,humor',
'comparison,comparer, vs ,versus,comparatif,comparaison' => 'comparison', 'comparison,comparer, vs ,versus,comparatif,comparaison' => 'comparison',
'communicate,communication,messaging,messenger,gmail,communiquer,écriture inclusive' => 'communication', 'communicate,communication,messaging,messenger,gmail,communiquer,écriture inclusive,la langue,académie française,language' => 'communication',
'complex,impossible to solve,complicated,very difficult,complexe,compliqué' => 'complexity,its-complicated', 'complex,impossible to solve,complicated,very difficult,complexe,compliqué' => 'complexity,its-complicated',
'computers,personal computer' => 'pc', 'computers,personal computer' => 'pc',
'configure,configuration,paramétrer,paramétrage' => 'configuration', 'configure,configuration,paramétrer,paramétrage' => 'configuration',
@ -238,7 +238,7 @@ function apply_auto_tags(array $data, ConfigManager $conf): array
$tagScores = calculate_tags($keywordsToTags, $searchContents); $tagScores = calculate_tags($keywordsToTags, $searchContents);
// Append tag stats to the description // Append tag stats to the description
//$data = append_tag_stats($data, $tagScores); // $data = append_tag_stats($data, $tagScores); // UNCOMMENT WHEN DEBUGGING AUTOMATED TAGS
// Filter and limit tags // Filter and limit tags
$tagsToAdd = filter_and_limit_tags($tagScores); $tagsToAdd = filter_and_limit_tags($tagScores);