LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
lima.h
Go to the documentation of this file.
1// Copyright 2019-2022 CEA LIST
2// SPDX-FileCopyrightText: 2019-2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6/****************************************************************************
7**
8** Copyright (C) 2018 The Qt Company Ltd.
9** Contact: https://www.qt.io/licensing/
10**
11** This file is part of the Qt for Python examples of the Qt Toolkit.
12**
13** $QT_BEGIN_LICENSE:BSD$
14** Commercial License Usage
15** Licensees holding valid commercial Qt licenses may use this file in
16** accordance with the commercial license agreement provided with the
17** Software or, alternatively, in accordance with the terms contained in
18** a written agreement between you and The Qt Company. For licensing terms
19** and conditions see https://www.qt.io/terms-conditions. For further
20** information use the contact form at https://www.qt.io/contact-us.
21**
22** BSD License Usage
23** Alternatively, you may use this file under the terms of the BSD license
24** as follows:
25**
26** "Redistribution and use in source and binary forms, with or without
27** modification, are permitted provided that the following conditions are
28** met:
29** * Redistributions of source code must retain the above copyright
30** notice, this list of conditions and the following disclaimer.
31** * Redistributions in binary form must reproduce the above copyright
32** notice, this list of conditions and the following disclaimer in
33** the documentation and/or other materials provided with the
34** distribution.
35** * Neither the name of The Qt Company Ltd nor the names of its
36** contributors may be used to endorse or promote products derived
37** from this software without specific prior written permission.
38**
39**
40** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
41** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
42** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
43** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
44** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
45** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
46** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
47** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
48** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
49** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
50** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
51**
52** $QT_END_LICENSE$
53**
54****************************************************************************/
55
56#ifndef LIMAANALYZER_H
57#define LIMAANALYZER_H
58
59
60#include <memory>
61#include <string>
62#include <vector>
63
66{
67 friend class LimaAnalyzerPrivate;
68public:
69 LimaAnalyzer(const std::string& langs,
70 const std::string& pipelines,
71 const std::string& modulePath,
72 const std::string& user_config_path="",
73 const std::string& user_resources_path="",
74 const std::string& meta="");
75
77 LimaAnalyzer(const LimaAnalyzer& a) ;
79
80 std::string analyzeText(const std::string& text,
81 const std::string& lang="",
82 const std::string& pipeline="",
83 const std::string& meta="");
84
85 bool addPipelineUnit(const std::string& pipeline,
86 const std::string& media,
87 const std::string& jsonGroupString);
88
89 bool error = false;
90 std::string errorMessage = "";
91
92private:
94};
95
96#endif // LIMAANALYZER_H
std::string errorMessage
Definition lima.h:90
LimaAnalyzer & operator=(const LimaAnalyzer &a)
Definition lima.cpp:429
~LimaAnalyzer()
Definition lima.cpp:404
std::string analyzeText(const std::string &text, const std::string &lang="", const std::string &pipeline="", const std::string &meta="")
Definition lima.cpp:556
bool addPipelineUnit(const std::string &pipeline, const std::string &media, const std::string &jsonGroupString)
Definition lima.cpp:490
bool error
Definition lima.h:89