From 193c7e2de594bd0b31726dae884010b60620be83 Mon Sep 17 00:00:00 2001 From: Yibing Liu Date: Mon, 26 Mar 2018 19:36:18 -0700 Subject: [PATCH] Format license and comments --- fluid/DeepASR/decoder/post_decode_faster.cc | 5 +++-- fluid/DeepASR/decoder/post_decode_faster.h | 7 ++++--- fluid/DeepASR/decoder/pybind.cc | 19 ++++++++++--------- fluid/DeepASR/decoder/setup.py | 2 +- 4 files changed, 18 insertions(+), 15 deletions(-) diff --git a/fluid/DeepASR/decoder/post_decode_faster.cc b/fluid/DeepASR/decoder/post_decode_faster.cc index 6b318000..d7f1d1ab 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 c0b54cdf..2e31a1c1 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 1b91f02b..56439d18 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 1818ecbf..a98c0b4c 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. -- GitLab