diff options
author | Marcel Klehr <mklehr@gmx.net> | 2023-07-14 15:59:50 +0200 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2023-07-14 16:00:31 +0200 |
commit | ffe27ce14ca74b509c8721c9fba7c759498fa471 (patch) | |
tree | bfed281ed9d76d6087ca946331ee27d8345c3acd /lib/public/TextProcessing/TopicsTaskType.php | |
parent | bd45c436ebc710da2309dca232173d8133e9e06a (diff) | |
download | nextcloud-server-ffe27ce14ca74b509c8721c9fba7c759498fa471.tar.gz nextcloud-server-ffe27ce14ca74b509c8721c9fba7c759498fa471.zip |
Massive refactoring: Turn LanguageModel OCP API into TextProcessing API
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'lib/public/TextProcessing/TopicsTaskType.php')
-rw-r--r-- | lib/public/TextProcessing/TopicsTaskType.php | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/lib/public/TextProcessing/TopicsTaskType.php b/lib/public/TextProcessing/TopicsTaskType.php new file mode 100644 index 00000000000..8b41b3ee61a --- /dev/null +++ b/lib/public/TextProcessing/TopicsTaskType.php @@ -0,0 +1,60 @@ +<?php + +declare(strict_types=1); + +/** + * @copyright Copyright (c) 2023 Marcel Klehr <mklehr@gmx.net> + * + * @author Marcel Klehr <mklehr@gmx.net> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +namespace OCP\TextProcessing; + +use OCP\IL10N; + +/** + * This is the text processing task type for topics extraction + * @since 27.1.0 + */ +class TopicsTaskType implements ITaskType { + /** + * Constructor for TopicsTaskType + * + * @param IL10N $l + * @since 27.1.0 + */ + public function __construct( + private IL10N $l, + ) { + } + + + /** + * @inheritDoc + */ + public function getName(): string { + return $this->l->t('Extract topics'); + } + + /** + * @inheritDoc + */ + public function getDescription(): string { + return $this->l->t('Extracts topics from a text and outputs them separated by commas.'); + } +} |