diff --git a/fluid/DeepASR/decoder/post_decode_faster.cc b/fluid/DeepASR/decoder/post_decode_faster.cc index 6b318000e380793c2042110f51ae2551d85ebd0b..d7f1d1ab34a18285d1d96b9ff6a67cff42d519b3 100644 --- a/fluid/DeepASR/decoder/post_decode_faster.cc +++ b/fluid/DeepASR/decoder/post_decode_faster.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -69,7 +69,8 @@ Decoder::~Decoder() { } std::string Decoder::decode( - std::string key, std::vector>& log_probs) { + std::string key, + const std::vector>& log_probs) { size_t num_frames = log_probs.size(); size_t dim_label = log_probs[0].size(); diff --git a/fluid/DeepASR/decoder/post_decode_faster.h b/fluid/DeepASR/decoder/post_decode_faster.h index c0b54cdf9fcb6603f34904b0fd7ee906bd20f12d..2e31a1c19e40bd879a1c76f1542b94eaa853be12 100644 --- a/fluid/DeepASR/decoder/post_decode_faster.h +++ b/fluid/DeepASR/decoder/post_decode_faster.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -37,8 +37,9 @@ public: std::vector decode(std::string posterior_rspecifier); // Accept the scores of one utterance and return the decoding result - std::string decode(std::string key, - std::vector> &log_probs); + std::string decode( + std::string key, + const std::vector> &log_probs); private: // For decoding one utterance diff --git a/fluid/DeepASR/decoder/pybind.cc b/fluid/DeepASR/decoder/pybind.cc index 1b91f02b89ffd259f7a24a005ec96bd780287e25..56439d180263b4d753eccd82826d1b39c9d2fa85 100644 --- a/fluid/DeepASR/decoder/pybind.cc +++ b/fluid/DeepASR/decoder/pybind.cc @@ -1,4 +1,4 @@ -/* Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. +/* Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -27,12 +27,13 @@ PYBIND11_MODULE(post_decode_faster, m) { .def("decode", (std::vector (Decoder::*)(std::string)) & Decoder::decode, - "Decode one input probability matrix " - "and return the transcription") - .def("decode", - (std::string (Decoder::*)( - std::string, std::vector>&)) & - Decoder::decode, - "Decode one input probability matrix " - "and return the transcription"); + "Decode for the probability matrices in specifier " + "and return the transcriptions.") + .def( + "decode", + (std::string (Decoder::*)( + std::string, const std::vector>&)) & + Decoder::decode, + "Decode one input probability matrix " + "and return the transcription."); } diff --git a/fluid/DeepASR/decoder/setup.py b/fluid/DeepASR/decoder/setup.py index 1818ecbf003000285e190ac21095e435e8bfb0ad..a98c0b4cc17717a6769b8322e4f5afe3de6ab2de 100644 --- a/fluid/DeepASR/decoder/setup.py +++ b/fluid/DeepASR/decoder/setup.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 PaddlePaddle Authors. All Rights Reserved. +# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License.