LIMA
Libre Multilingual Analyzer — C++ API
Loading...
Searching...
No Matches
birnn_seq2seq.h
Go to the documentation of this file.
1// Copyright 2002-2021 CEA LIST
2// SPDX-FileCopyrightText: 2022 CEA LIST <gael.de-chalendar@cea.fr>
3//
4// SPDX-License-Identifier: MIT
5
6#ifndef DEEPLIMA_SRC_INFERENCE_RNN_SEQ2SEQ_H
7#define DEEPLIMA_SRC_INFERENCE_RNN_SEQ2SEQ_H
8
9#include <vector>
10#include <chrono>
11#include <cstdlib>
12
16// #include "deeplima/lemmatization/impl/lemmatization_wrapper.h"
17
18namespace deeplima
19{
20
23{
25 std::shared_ptr< StdMatrix<uint8_t> > m_output; // external - classifier id, internal - time position
26
27public:
28
29 std::shared_ptr< StdMatrix<uint8_t> > get_output()
30 {
31 return m_output;
32 }
33
35 {
36 }
37
38 void init(uint32_t /*max_feat*/,
39 uint32_t /*overlap*/,
40 uint32_t /*num_slots*/,
41 uint32_t /*slot_len*/,
42 uint32_t /*num_threads*/)
43 {
44 std::cerr << "RnnSeq2Seq::init NOT IMPLEMENTED" << std::endl;
45 }
46
47 void load(const std::string& fn)
48 {
49 try
50 {
51 Model::load(fn);
52 }
53 catch (const std::runtime_error& e)
54 {
55 throw;
56 }
57 }
58
59 virtual ~RnnSeq2Seq()
60 {
61 // std::cerr << "-> ~RnnSeq2Seq" << std::endl;
62 // std::cerr << "<- ~RnnSeq2Seq" << std::endl;
63 }
64};
65
66} // namespace deeplima
67
68#endif
void load(const std::string &fn)
void init(uint32_t, uint32_t, uint32_t, uint32_t, uint32_t)
std::shared_ptr< StdMatrix< uint8_t > > get_output()