Skip to content

Commit

Permalink
Merging upstream/master into ctc branch
Browse files Browse the repository at this point in the history
  • Loading branch information
danpovey committed Oct 3, 2015
2 parents 530f7ff + 66ef6fb commit 0ef38f9
Show file tree
Hide file tree
Showing 60 changed files with 127 additions and 88 deletions.
25 changes: 22 additions & 3 deletions misc/maintenance/fix_apache_headers.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,43 @@
# authors appears in the apache headers in the source, and that source files
# have their Apache headers. Including this mainly for documentation, as I
# doubt the issue will occur much in future.
#
# Also makes sure that where the filename appears in a comment at the top of the
# file, e.g. as in
# // somedir/some-file.cc
# the filename is accurate.

# run this from the top level of the repo, as
# misc/maintenance/fix_apache_headers.sh

set -e
cd src
rm -rf tmp
for x in */*.{h,cc,dox}; do
for x in */*.{h,cc,dox}; do
if [ $x != "util/basic-filebuf.h" ]; then
if ! grep 'COPYING for clarification' $x >/dev/null; then
echo Fixing $x;
if ! grep "Apache License" $x >/dev/null; then
echo "$0: warning: file $x may not have an Apache license header"
else
cp $x tmp; cat tmp | perl -ape ' if (m/Licensed under the Apache License/) {
print "// See ../../COPYING for clarification regarding multiple authors\n";
cp $x tmp; cat tmp | perl -ape ' if (m/Licensed under the Apache License/) {
print "// See ../../COPYING for clarification regarding multiple authors\n";
print "//\n";} ' > $x;
fi
fi
fi
done

for x in */*.{h,cc,dox}; do
if [ $x != "util/basic-filebuf.h" ]; then
echo "// $x" | cat - <(tail -n +2 $x) >tmp
if ! diff tmp $x; then
if head -n 1 $x | grep -E '// [-a-z0-9_]+/[-a-z0-9_.]+$'; then
echo "Fixing $x automatically"
cp tmp $x
else
echo "**Please fix $x manually"
fi
fi
fi
done
2 changes: 1 addition & 1 deletion src/bin/am-info.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// gmmbin/am-info.cc
// bin/am-info.cc

// Copyright 2012-2013 Johns Hopkins University (Author: Daniel Povey)

Expand Down
2 changes: 1 addition & 1 deletion src/bin/sum-lda-accs.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// bin/sum-lda.cc
// bin/sum-lda-accs.cc

// Copyright 2014 LINSE/UFSC; Augusto Henrique Hentz

Expand Down
2 changes: 1 addition & 1 deletion src/bin/sum-mllt-accs.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// bin/sum-mllt.cc
// bin/sum-mllt-accs.cc

// Copyright 2014 LINSE/UFSC; Augusto Henrique Hentz

Expand Down
2 changes: 1 addition & 1 deletion src/bin/transform-vec.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// featbin/transform-vec.cc
// bin/transform-vec.cc

// Copyright 2009-2012 Microsoft Corporation
// 2012-2014 Johns Hopkins University (author: Daniel Povey)
Expand Down
2 changes: 1 addition & 1 deletion src/cudamatrix/cu-math-test.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cudamatrix/cuda-math-test.cc
// cudamatrix/cu-math-test.cc

// Copyright 2013 Johns Hopkins University (Author: David Snyder)

Expand Down
2 changes: 1 addition & 1 deletion src/cudamatrix/cu-matrix-test.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cudamatrix/cuda-matrix-test.cc
// cudamatrix/cu-matrix-test.cc

// Copyright 2010 Karel Vesely
// 2013 Lucas Ondel
Expand Down
2 changes: 1 addition & 1 deletion src/cudamatrix/cu-packed-matrix-test.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cudamatrix/cu-sp-matrix-test.cc
// cudamatrix/cu-packed-matrix-test.cc
//
// Copyright 2013 Ehsan Variani
// Lucas Ondel
Expand Down
2 changes: 1 addition & 1 deletion src/cudamatrix/cu-sp-matrix-speed-test.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cudamatrix/cu-matrix-speed-test.cc
// cudamatrix/cu-sp-matrix-speed-test.cc

// Copyright 2013 Johns Hopkins University (author: Daniel Povey)

Expand Down
2 changes: 1 addition & 1 deletion src/cudamatrix/cu-tp-matrix-test.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cudamatrix/cu-sp-matrix-test.cc
// cudamatrix/cu-tp-matrix-test.cc
//
// Copyright 2013 Ehsan Variani
// Lucas Ondel
Expand Down
2 changes: 1 addition & 1 deletion src/cudamatrix/cu-vector-test.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// cudamatrix/cuda-vector-test.cc
// cudamatrix/cu-vector-test.cc

// Copyright 2013 Lucas Ondel
// 2013 Johns Hopkins University (author: Daniel Povey)
Expand Down
2 changes: 1 addition & 1 deletion src/fstext/epsilon-property-inl.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// fstext/fstext-utils-inl.h
// fstext/epsilon-property-inl.h

// Copyright 2014 Johns Hopkins University (Author: Daniel Povey)

Expand Down
2 changes: 1 addition & 1 deletion src/gmmbin/gmm-est-fmllr-global.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// gmmbin/gmm-est-fmllr.cc
// gmmbin/gmm-est-fmllr-global.cc

// Copyright 2009-2011 Microsoft Corporation; Saarland University
// 2013-2014 Johns Hopkins University (author: Daniel Povey)
Expand Down
2 changes: 1 addition & 1 deletion src/gmmbin/gmm-latgen-faster-regtree-fmllr.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// gmmbin/gmm-latgen-faster.cc
// gmmbin/gmm-latgen-faster-regtree-fmllr.cc

// Copyright 2009-2012 Microsoft Corporation
// 2012-2013 Johns Hopkins University (author: Daniel Povey)
Expand Down
2 changes: 1 addition & 1 deletion src/gst-plugin/gst-online-gmm-decode-faster.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// gst-plugin/gst-online-decode-faster.cc
// gst-plugin/gst-online-gmm-decode-faster.cc

// Copyright 2013 Tanel Alumae, Tallinn University of Technology
// Copyright 2012 Cisco Systems (author: Matthias Paulik)
Expand Down
2 changes: 1 addition & 1 deletion src/gst-plugin/gst-online-gmm-decode-faster.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// gst-plugin/gst-online-decode-faster.h
// gst-plugin/gst-online-gmm-decode-faster.h

// Copyright 2013 Tanel Alumae, Tallinn University of Technology

Expand Down
2 changes: 1 addition & 1 deletion src/kws/kaldi-kws.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// lat/kaldi-kws.h
// kws/kaldi-kws.h

// Copyright 2012 Johns Hopkins University (Author: Guoguo Chen)

Expand Down
2 changes: 1 addition & 1 deletion src/kws/kws-functions.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// lat/kws-functions.cc
// kws/kws-functions.cc

// Copyright 2012 Johns Hopkins University (Author: Guoguo Chen)

Expand Down
2 changes: 1 addition & 1 deletion src/kws/kws-functions.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// lat/kws-functions.h
// kws/kws-functions.h

// Copyright 2012 Johns Hopkins University (Author: Guoguo Chen)

Expand Down
2 changes: 1 addition & 1 deletion src/kwsbin/compute-atwv.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// bin/compute-atwv.cc
// kwsbin/compute-atwv.cc

// Copyright (c) 2015, Johns Hopkins University (Yenda Trmal<jtrmal@gmail.com>)

Expand Down
2 changes: 1 addition & 1 deletion src/lat/determinize-lattice-pruned.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// lat/determinize-lattice-pruned-inl.h
// lat/determinize-lattice-pruned.cc

// Copyright 2009-2012 Microsoft Corporation
// 2012-2013 Johns Hopkins University (Author: Daniel Povey)
Expand Down
2 changes: 1 addition & 1 deletion src/matrix/matrix-lib-speed-test.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// matrix/matrix-lib-test.cc
// matrix/matrix-lib-speed-test.cc

// Copyright 2009-2014 Microsoft Corporation; Mohit Agarwal; Lukas Burget;
// Ondrej Glembek; Saarland University (Author: Arnab Ghoshal);
Expand Down
2 changes: 1 addition & 1 deletion src/nnet/nnet-average-pooling-2d-component.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// nnet/nnet-average-pooling-component.h
// nnet/nnet-average-pooling-2d-component.h

// Copyright 2014 Brno University of Technology (author: Karel Vesely)
// Johns Hopkins University (author: Sri Harish Mallidi)
Expand Down
2 changes: 1 addition & 1 deletion src/nnet/nnet-convolutional-2d-component.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// nnet/nnet-convolutional-component.h
// nnet/nnet-convolutional-2d-component.h

// Copyright 2014-2015 Johns Hopkins University (author: Sri Harish Mallidi)
// Brno University of Technology (author: Karel Vesely),
Expand Down
2 changes: 1 addition & 1 deletion src/nnet/nnet-linear-transform.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// nnet/nnet-affine-transform.h
// nnet/nnet-linear-transform.h

// Copyright 2011-2014 Brno University of Technology (author: Karel Vesely)

Expand Down
2 changes: 1 addition & 1 deletion src/nnet/nnet-max-pooling-2d-component.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// nnet/nnet-average-pooling-component.h
// nnet/nnet-max-pooling-2d-component.h

// Copyright 2014 Brno University of Technology (author: Karel Vesely),
// Johns Hopkins University (author: Sri Harish Mallidi)
Expand Down
2 changes: 1 addition & 1 deletion src/nnet/nnet-sentence-averaging-component.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// nnet/nnet-affine-transform.h
// nnet/nnet-sentence-averaging-component.h

// Copyright 2013 Brno University of Technology (Author: Karel Vesely)

Expand Down
2 changes: 1 addition & 1 deletion src/nnet2/nnet-example-functions.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// nnet/nnet-example-functions.cc
// nnet2/nnet-example-functions.cc

// Copyright 2012-2013 Johns Hopkins University (author: Daniel Povey)

Expand Down
2 changes: 1 addition & 1 deletion src/nnet2/online-nnet2-decodable-test.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// online2/online-nnet2-decodable-test.cc
// nnet2/online-nnet2-decodable-test.cc

// Copyright 2014 Johns Hopkins University (author: Daniel Povey)

Expand Down
2 changes: 1 addition & 1 deletion src/nnet2bin/nnet-get-weighted-egs.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// nnet2bin/nnet-weighted-get-egs.cc
// nnet2bin/nnet-get-weighted-egs.cc

// Copyright 2013-2014 (Author: Vimal Manohar)

Expand Down
2 changes: 1 addition & 1 deletion src/nnet2bin/nnet-limit-degradation.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// nnet2bin/nnet-linit-degradation.cc
// nnet2bin/nnet-limit-degradation.cc

// Copyright 2012-2013 Johns Hopkins University (author: Daniel Povey)

Expand Down
2 changes: 1 addition & 1 deletion src/nnet2bin/nnet-train-ensemble.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// nnet2bin/nnet-train-simple.cc
// nnet2bin/nnet-train-ensemble.cc

// Copyright 2012 Johns Hopkins University (author: Daniel Povey)
// 2014 Xiaohui Zhang
Expand Down
2 changes: 1 addition & 1 deletion src/nnet2bin/nnet2-boost-silence.cc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// nnet2bin/nnet-boost-silence.cc
// nnet2bin/nnet2-boost-silence.cc

// Copyright 2012 Johns Hopkins University (author: Daniel Povey)

Expand Down
Loading

0 comments on commit 0ef38f9

Please sign in to comment.