Skip to content

Commit 88ca3a8

Browse files
giuliopacijfiscus
authored andcommitted
Fix several long standing issues (#1)
* Added missing headers in sgml_reportgenerator.h. * Added missing headers in speakermatch.cpp. * Added missing headers in statistics.cpp. * Added missing headers in stm_inputparser.cpp. * Added missing headers in token.cpp. * Added missing headers in uemfilter.cpp. * Added missing headers in graph.cpp. * Added missing headers in segment.cpp. * Fixed namespace in recording.h. * Fixed namespace in recording.cpp. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed clean target in makefile. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed clean target in makefile. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed clean target in makefile.in. * Fixed typos in corresp.c. * Fixed typos in speechset.cpp. * Fixed typos in main.cpp. * Fixed typos in acomp.pl. * Fixed typos in asclite.pod. * Drop perl4 commented code from utf_filt.pl. * Enable support for CFLAGS, CPPFLAGS and LDFLAGS in makefile.in. * Enable support for CFLAGS, CPPFLAGS and LDFLAGS in makefile.in. * Enable support for CFLAGS, CPPFLAGS and LDFLAGS in makefile.in. * Improve reliability of makefile. * Improve reliability of makefile. * Improve reliability of makefile. * Add double-inclusion guards to stdcenvp.h. * Fix install target in makefile.in. * Added explicit castings in expenv.c. * Added explicit castings in grules2.c. * Added explicit castings in aprules2.c. * Use long instead of int in calloc2.c. * Use long instead of int in frstr1.c. * Use long instead of int in strdup2.c. * Use posix strncasecmp instead of strncpi in aprules2.c. * Use strcaseeq instead of streqi in str_eq.c. * Define str*case* functions in strmacs.h, if needed. * Do not reimplement strcmpi in strcmpi.c, if not needed. * Do not reimplement strcmpi in strncmpi.c, if not needed. * Do not include strncmpi.c and strcmpi.c in rfilter1.c, if not needed. * Improve reliability of makefile.in. * Fixed compilation warnings in sgml_reportgenerator.cpp. * Fixed compilation warnings in compressedlevenshteinmatrix.cpp. * Added CXXFLAGS support to makefile.in. * Improve reliability of makefile. * Improve reliability of makefile. * Improve reliability of makefile. * Fix spelling errors in outputs.htm. * Fix spelling errors in sc_stats.1. * Fix spelling errors in st_opt.htm. * Fix spelling errors in lvc_hyp.notag.ctm.filt.dtl. * Fix spelling errors in lvc_hyp2.notag.ctm.filt.dtl. * Fix spelling errors in lvc_hyp.notag.ctm.filt.dtl. * Fix spelling errors in lvc_hyp2.notag.ctm.filt.dtl. * Fix spelling errors in sastt-case1.sys.rttm.filt.dtl. * Fix spelling errors in lvc_hyp.ctm.filt.dtl. * Fix spelling errors in lvc_hyp2.ctm.filt.dtl. * Fix spelling errors in sastt-case2.sys.rttm.filt.dtl. * Fix spelling errors in test.arb2004.txt.ctm.filt.dtl. * Fix spelling errors in alex.c. * Fix spelling errors in net_dp.c. * Fix spelling errors in sc_stats.c. * Fix spelling errors in sentmcn.c. * Fix spelling errors in signtest.c. * Fix spelling errors in test1.dtl. * Fix spelling errors in test1.spk.4t0. * Fix spelling errors in test1.spk.4t1. * Fix spelling errors in test1.spk.4t2. * Fix spelling errors in test1a.dtl. * Fix spelling errors in test1e.dtl. * Fix spelling errors in test1e.spk.4t0. * Fix spelling errors in test1e.spk.4t1. * Fix spelling errors in test1e.spk.4t2. * Fix spelling errors in test9.dtl. * Fix spelling errors in test1a.stats.mapsswe. * Fix spelling errors in test1b.stats.mapsswe. * Fix image scale in sclite.htm. * Fix gnuplot output in det.c. * Fix gnuplot output in range.c. * Make utf_filt.pl help more similar to help of other commands. * Added Italian support to hubscr.pl. * Use printf instead of echo in csrfilt.sh. * Fix spelling errors in chfilt.pl. * Fix spelling errors in csrfilt.sh. * Fix spelling errors in def_art.pl. * Fix spelling errors in hamzaNorm.pl. * Fix spelling errors in path.c. * Fix spelling errors in sclite.c. * Fix spelling errors in scores.c. * Fix spelling errors in sctk.h. * Fix spelling errors in sentmcn.c. * Fix spelling errors in wilcoxon.c. * Fix spelling errors in tanweenFilt.pl.
1 parent 0d641ba commit 88ca3a8

File tree

100 files changed

+401
-333
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+401
-333
lines changed

doc/asclite.pod

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ Change the maximum number of overlaping speaker (default: 1).
111111

112112
=item B<-memory-compression <block_KB>>
113113

114-
Set the memory compression with compressed <block_KB> KB block (default: off / recommanded: 64).
114+
Set the memory compression with compressed <block_KB> KB block (default: off / recommended: 64).
115115

116116
=item B<-force-memory-compression>
117117

doc/outputs.htm

+10-10
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ <H1>
6161
Aligned words = (1432)
6262

6363
CONFUSION PAIRS Total (128)
64-
With >= 1 occurances (128)
64+
With >= 1 occurrences (128)
6565

6666
1: 3 -> a ==> the
6767
2: 2 -> cott ==> khan
@@ -197,7 +197,7 @@ <H1>
197197

198198

199199
INSERTIONS Total (22)
200-
With >= 1 occurances (22)
200+
With >= 1 occurrences (22)
201201

202202
1: 3 -> a
203203
2: 2 -> and
@@ -227,7 +227,7 @@ <H1>
227227

228228

229229
DELETIONS Total (10)
230-
With >= 1 occurances (10)
230+
With >= 1 occurrences (10)
231231

232232
1: 2 -> and
233233
2: 2 -> were
@@ -245,7 +245,7 @@ <H1>
245245

246246

247247
SUBSTITUTIONS Total (106)
248-
With >= 1 occurances (106)
248+
With >= 1 occurrences (106)
249249

250250
1: 6 -> cott
251251
2: 4 -> a
@@ -362,7 +362,7 @@ <H1>
362362

363363

364364
FALSELY RECOGNIZED Total (106)
365-
With >= 1 occurances (106)
365+
With >= 1 occurrences (106)
366366

367367
1: 10 -> the
368368
2: 7 -> and
@@ -813,7 +813,7 @@ <H1>
813813
Aligned words = ( 470)
814814

815815
CONFUSION PAIRS Total (64)
816-
With >= 1 occurances (64)
816+
With >= 1 occurrences (64)
817817

818818
1: 1 -> a ==> to
819819
2: 1 -> administered ==> minister
@@ -885,7 +885,7 @@ <H1>
885885

886886

887887
INSERTIONS Total (12)
888-
With >= 1 occurances (12)
888+
With >= 1 occurrences (12)
889889

890890
1: 1 -> a
891891
2: 1 -> and
@@ -905,7 +905,7 @@ <H1>
905905

906906

907907
DELETIONS Total (8)
908-
With >= 1 occurances (8)
908+
With >= 1 occurrences (8)
909909

910910
1: 2 -> and
911911
2: 1 -> at
@@ -921,7 +921,7 @@ <H1>
921921

922922

923923
SUBSTITUTIONS Total (56)
924-
With >= 1 occurances (56)
924+
With >= 1 occurrences (56)
925925

926926
1: 3 -> fund
927927
2: 3 -> to
@@ -988,7 +988,7 @@ <H1>
988988

989989

990990
FALSELY RECOGNIZED Total (56)
991-
With >= 1 occurances (56)
991+
With >= 1 occurrences (56)
992992

993993
1: 4 -> and
994994
2: 3 -> the

doc/sc_stats.1

+1-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ detailed analysis.
216216
-u
217217
.RS
218218
Rather than creating a comparison matrix for each test, unify
219-
statistical test results into a single comparision matrix
219+
statistical test results into a single comparison matrix
220220
.RE
221221

222222
.br

doc/sclite.htm

+2-2
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ <H1>
417417
defined as:
418418

419419
<p>
420-
<center><IMG SRC="equation.jpg"></Center>
420+
<center><IMG SRC="equation.jpg" width="800ex"></center>
421421
<p>
422422

423423
Sclite will automatically detect the presence of confidence measures
@@ -482,4 +482,4 @@ <h1> BUGS/COMMENTS </h1>
482482

483483
</BODY>
484484
</HTML>
485-
485+

doc/st_opt.htm

+2-2
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ <H1>
186186
<a name="option_u_name_0">-u</a>
187187
<UL>
188188
Rather than creating a comparison matrix for each test, unify
189-
statistical test results into a single comparision matrix
189+
statistical test results into a single comparison matrix
190190
</UL>
191191
<BR>
192192
<a name="option_u_name_0">-f</a> [ E | R | W ]
@@ -204,4 +204,4 @@ <H1>
204204
</ul>
205205

206206
</body>
207-
</html>
207+
</html>

makefile

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,16 @@ MAKE=make
1717

1818
all clean install config:
1919
(mkdir -p bin)
20-
(cd src; $(MAKE) $@)
20+
(cd src && if test -f makefile ; then $(MAKE) $@ ; fi)
2121

2222
.PHONY : doc
2323

2424
doc:
25-
(cd doc; $(MAKE) all)
25+
(cd doc && if test -f makefile ; then $(MAKE) all ; fi)
2626

2727
distclean:
2828
(rm -f bin/*)
29-
(cd src; $(MAKE) $@)
29+
(cd src && if test -f makefile ; then $(MAKE) $@ ; fi)
3030

3131
dist:
3232
@ echo "Make the distribution"
@@ -40,7 +40,7 @@ dist:
4040
@ find `cat .fname` -name "._*" -delete
4141
@ tar jcf `cat .distname` --exclude CVS --exclude .svn --exclude TODO `cat .fname`
4242
@ md5 `cat .distname` > `cat .distname`.md5
43-
@ (cd `cat .fname`; make config all check install doc)
43+
@ (cd `cat .fname` && make config all check install doc)
4444
@ rm -rf `cat .fname` .fname .distname
4545

4646
cvs-tag-current-distribution:
@@ -49,4 +49,4 @@ cvs-tag-current-distribution:
4949

5050
check:
5151
@ uname -a
52-
(cd src; $(MAKE) $@)
52+
(cd src && if test -f makefile ; then $(MAKE) $@ ; fi)

src/acomp/acomp.pl

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"s",
5252
"i:s",
5353
"f");
54-
die "\n$usage\nError: Failed to parse argements" if (! $ret);
54+
die "\n$Usage\nError: Failed to parse arguments" if (! $ret);
5555

5656

5757
if (defined($opt_l)) { $Lex = $opt_l; } else { die("$Usage\n\nError: Lexicon required via -l.\n"); }
@@ -64,8 +64,8 @@
6464
if ($opt_i !~ /^(txt|ctm|stm)$/);
6565
$InFmt = $opt_i;
6666
}
67-
#### The main functions arguements:
68-
if ($#ARGV > 1) { print "\n$Usage\nToo many arguements\n\n"; exit 1; }
67+
#### The main functions arguments:
68+
if ($#ARGV > 1) { print "\n$Usage\nToo many arguments\n\n"; exit 1; }
6969
if ($#ARGV == 0) { print "\n$Usage\nOutput Not Specified\n\n"; exit 1; }
7070
if ($#ARGV == -1) { print "\n$Usage\nInput and Output Not Specified\n\n";
7171
exit 1; }

src/acomp/makefile.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ install: all
2424
clean:
2525

2626
distclean: clean
27-
rm -r *~ makefile
27+
$(RM) -r *~ makefile

src/align2html/makefile.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ buildPackFile:
1919
buildPack.pl > packImageTarFile
2020

2121
clean:
22+
$(RM) align2html.pl
2223

2324
distclean: clean
24-
rm -r *~ makefile
25+
$(RM) -r *~ makefile

src/asclite/core/compressedlevenshteinmatrix.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ bool CompressedLevenshteinMatrix::DecompressBlock(const size_t& block_index)
230230

231231
bool decomp = false;
232232

233-
if(decomp = m_TabbIsCompressed[block_index])
233+
if((decomp = m_TabbIsCompressed[block_index]))
234234
{
235235
// Block is compressed, then decompress it;
236236
size_t comp_lengh = m_TabSizes[block_index] - m_lzmaPropertiesSize;
@@ -276,7 +276,7 @@ void CompressedLevenshteinMatrix::GarbageCollection()
276276

277277
do
278278
{
279-
if(found = ForcedGarbageCollection())
279+
if((found = ForcedGarbageCollection()))
280280
++count;
281281
}
282282
while(found && !isStopGarbageCollector());

src/asclite/core/graph.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@
1919
* Inplementation of the Levenshtein Distance Algorithm in Multi-Dimension
2020
*/
2121

22+
#include <iostream>
23+
#include <algorithm>
24+
#include <vector>
2225
#include "graph.h"
2326

2427
Logger* Graph::logger = Logger::getLogger();

src/asclite/core/main.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ void PrintHelp()
7878
cout << " -only-SG <segment_group_ID>" << endl;
7979
cout << " Only score the segment group specified (default: disable, scoring all Segment Groups)." << endl;
8080
cout << " -memory-compression <block_KB>" << endl;
81-
cout << " Set the memory compression with compressed <block_KB> KB block (default: off / recommanded: 256)." << endl;
81+
cout << " Set the memory compression with compressed <block_KB> KB block (default: off / recommended: 256)." << endl;
8282
cout << " -force-memory-compression" << endl;
8383
cout << " Force the memory compression." << endl;
8484
cout << " -memory-limit <max_GB>" << endl;
@@ -700,7 +700,7 @@ int main(int argc, char **argv)
700700
else
701701
{
702702
arg_ok = false;
703-
cerr << "[ ERROR ] Ouput dir missing!" << endl;
703+
cerr << "[ ERROR ] Output dir missing!" << endl;
704704
}
705705
}
706706
else

src/asclite/core/makefile.in

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ CC = @CXX@
99
INSTALL = @INSTALL@
1010

1111
CPPFLAGS = @CPPFLAGS@
12+
CXXFLAGS = @CXXFLAGS@
1213
DEFS = @DEFS@
1314
CFLAGS = @CFLAGS@
1415
LDFLAGS = @LDFLAGS@
@@ -53,7 +54,7 @@ PROGRAMS = asclite
5354
all: makefile $(PROGRAMS)
5455

5556

56-
COMPILE = $(CC) -c $(OFLAGS) $(DEFS) -I. $(CFLAGS)
57+
COMPILE = $(CC) -c $(OFLAGS) $(DEFS) -I. $(CFLAGS) $(CPPFLAGS) $(CXXFLAGS)
5758

5859
.cpp.o:
5960
$(COMPILE) $<

src/asclite/core/recording.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -154,14 +154,14 @@ Recording::~Recording()
154154

155155
segmentors.clear();
156156

157-
map<string, ::Filter*>::iterator fi, fe;
157+
map<string, typename Filter::Filter*>::iterator fi, fe;
158158

159159
fi = filters.begin();
160160
fe = filters.end();
161161

162162
while(fi != fe)
163163
{
164-
::Filter* ptr_elt = fi->second;
164+
typename Filter::Filter* ptr_elt = fi->second;
165165

166166
if(ptr_elt)
167167
delete ptr_elt;

src/asclite/core/recording.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ class Recording
119119
/**
120120
* contain all the available Filters
121121
*/
122-
map<string, ::Filter*> filters;
122+
map<string, typename Filter::Filter*> filters;
123123

124124
/**
125125
* Database for the optimization speaker alignment

src/asclite/core/segment.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#include "segment.h" // class's header file
2424
#include "speech.h"
2525
#include "speechset.h"
26+
#include <algorithm>
2627

2728
Logger* Segment::logger = Logger::getLogger();
2829

src/asclite/core/sgml_reportgenerator.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -474,10 +474,12 @@ void SGMLReportGenerator::GenerateTokenAlignment(TokenAlignment* tokenAlign, con
474474
output << hyp->GetParentSegment()->GetSpeakerId();
475475
output << ",";
476476
if(hyp)
477+
{
477478
if (aAlignmentResult == TokenAlignment::SPEAKERSUB)
478479
output << "true";
479480
else
480481
output << "false";
482+
}
481483
}
482484
}
483485

src/asclite/core/sgml_reportgenerator.h

+5
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,11 @@
2424
#include "speechset.h"
2525
#include "logger.h"
2626

27+
#include <algorithm>
28+
#include <functional>
29+
#include <array>
30+
#include <iostream>
31+
2732
struct AlignedSegmentSequenceComparator
2833
{
2934
inline bool operator() (AlignedSegment* first, AlignedSegment* second) const

src/asclite/core/speakermatch.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*/
2121

2222
#include "speakermatch.h" // class's header file
23+
#include <algorithm>
2324

2425
Logger* SpeakerMatch::logger = Logger::getLogger();
2526

src/asclite/core/speechset.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ void SpeechSet::SetOrigin(const string& status)
126126
}
127127
else
128128
{
129-
LOG_WARN(logger, "The status of the SpeechSet dont exist (must be 'ref' or 'hyp') and was: "+status);
129+
LOG_WARN(logger, "The status of the SpeechSet don't exist (must be 'ref' or 'hyp') and was: "+status);
130130
}
131131

132132
UpdatePropertiesIfNeeded(true);

src/asclite/core/statistics.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717

1818
#include "statistics.h"
19+
#include <algorithm>
1920

2021
Statistics::Statistics(const vector<int> & _vecValues)
2122
{

src/asclite/core/stm_inputparser.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
*/
2121

2222
#include "stm_inputparser.h" // class's header file
23+
#include <algorithm>
2324

2425
const string STMInputParser::IGNORE_TIME_SEGMENT_IN_SCORING = "ignore_time_segment_in_scoring";
2526
Logger* STMInputParser::logger = Logger::getLogger();

src/asclite/core/token.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222

2323
#include "token.h" // class's header file
2424
#include "segment.h"
25+
#include <algorithm>
2526

2627
Logger* Token::logger = Logger::getLogger();
2728

src/asclite/core/uemfilter.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
*/
1717

1818
#include "uemfilter.h"
19+
#include <algorithm>
1920

2021
Logger* UEMElement::m_pLogger = Logger::getLogger();
2122
Logger* UEMFilter::m_pLogger = Logger::getLogger();

0 commit comments

Comments
 (0)