[irstlm] 69/126: improved info
Giulio Paci
giuliopaci-guest at moszumanska.debian.org
Tue May 17 07:46:46 UTC 2016
This is an automated email from the git hooks/post-receive script.
giuliopaci-guest pushed a commit to annotated tag adaptiveLM.v0.1
in repository irstlm.
commit 96b69f6374e52b335c94bfadb798ba066d945be9
Author: Nicola Bertoldi <bertoldi at fbk.eu>
Date: Thu Sep 10 10:58:27 2015 +0200
improved info
---
src/context-dependent-evaluation.cpp | 38 ++++++++++++++++++++----------------
1 file changed, 21 insertions(+), 17 deletions(-)
diff --git a/src/context-dependent-evaluation.cpp b/src/context-dependent-evaluation.cpp
index c9d6fda..5519344 100644
--- a/src/context-dependent-evaluation.cpp
+++ b/src/context-dependent-evaluation.cpp
@@ -603,11 +603,15 @@ int main(int argc, char **argv)
//collect total occurrences of current word in the following intervals
// [firs position], [<=1%], [<=2%], [<=5%], [<=10%]
- int Rank_histo[5];
+ int Rank_histogram[5];
int Rank_limit[5];
int max_rank = lmt->getDict()->size();
- memset(Rank_histo,0,5);
+ Rank_histogram[0] = 0;
+ Rank_histogram[1] = 0;
+ Rank_histogram[2] = 0;
+ Rank_histogram[3] = 0;
+ Rank_histogram[4] = 0;
Rank_limit[0] = 1;
Rank_limit[1] = 0.01 * max_rank;
Rank_limit[2] = 0.02 * max_rank;
@@ -795,20 +799,20 @@ int main(int argc, char **argv)
sent_tot_rank += current_rank;
tot_rank += current_rank;
if (current_rank <= Rank_limit[0]){
- ++Rank_histo[0];
+ ++Rank_histogram[0];
VERBOSE(1,"HERE 0 current_rank:" << current_rank << " Rank_limit[0]:" << Rank_limit[0] << std::endl);
}
if (current_rank <= Rank_limit[1]){
- ++Rank_histo[1];
+ ++Rank_histogram[1];
VERBOSE(1,"HERE 1 current_rank:" << current_rank << " Rank_limit[1]:" << Rank_limit[1] << std::endl);
}else if (current_rank <= Rank_limit[2]){
- ++Rank_histo[1]; ++Rank_histo[2];
+ ++Rank_histogram[1]; ++Rank_histo[2];
VERBOSE(1,"HERE 2 current_rank:" << current_rank << " Rank_limit[2]:" << Rank_limit[2] << std::endl);
}else if (current_rank <= Rank_limit[3]){
- ++Rank_histo[1]; ++Rank_histo[2]; ++Rank_histo[3];
+ ++Rank_histogram[1]; ++Rank_histo[2]; ++Rank_histo[3];
VERBOSE(1,"HERE 3 current_rank:" << current_rank << " Rank_limit[3]:" << Rank_limit[3] << std::endl);
}else if (current_rank <= Rank_limit[4]){
- ++Rank_histo[1]; ++Rank_histo[2]; ++Rank_histo[3]; ++Rank_histo[4];
+ ++Rank_histogram[1]; ++Rank_histo[2]; ++Rank_histo[3]; ++Rank_histo[4];
VERBOSE(1,"HERE 4 current_rank:" << current_rank << " Rank_limit[4]:" << Rank_limit[4] << std::endl);
}
}
@@ -839,16 +843,16 @@ int main(int argc, char **argv)
<< " avgRank=" << avgRank
<< " Noov=" << Noov
<< " OOVrate=" << (float)Noov/Nw * 100.0 << "%";
- std::cout << " Rank_[bst]=" << Rank_histo[0];
- std::cout << " Rank_[ 1%]=" << Rank_histo[1];
- std::cout << " Rank_[ 2%]=" << Rank_histo[2];
- std::cout << " Rank_[ 5%]=" << Rank_histo[3];
- std::cout << " Rank_[10%]=" << Rank_histo[4];
- std::cout << " Rank_[bst]=" << (float)Rank_histo[0]/Nw * 100.0 << "%";
- std::cout << " Rank_[ 1%]=" << (float)Rank_histo[1]/Nw * 100.0 << "%";
- std::cout << " Rank_[ 2%]=" << (float)Rank_histo[2]/Nw * 100.0 << "%";
- std::cout << " Rank_[ 5%]=" << (float)Rank_histo[3]/Nw * 100.0 << "%";
- std::cout << " Rank_[10%]=" << (float)Rank_histo[4]/Nw * 100.0 << "%";
+ std::cout << " Rank_[bst]=" << Rank_histogram[0];
+ std::cout << " Rank_[ 1%]=" << Rank_histogram[1];
+ std::cout << " Rank_[ 2%]=" << Rank_histogram[2];
+ std::cout << " Rank_[ 5%]=" << Rank_histogram[3];
+ std::cout << " Rank_[10%]=" << Rank_histogram[4];
+ std::cout << " Rank_[bst]=" << (float)Rank_histogram[0]/Nw * 100.0 << "%";
+ std::cout << " Rank_[ 1%]=" << (float)Rank_histogram[1]/Nw * 100.0 << "%";
+ std::cout << " Rank_[ 2%]=" << (float)Rank_histogram[2]/Nw * 100.0 << "%";
+ std::cout << " Rank_[ 5%]=" << (float)Rank_histogram[3]/Nw * 100.0 << "%";
+ std::cout << " Rank_[10%]=" << (float)Rank_histogram[4]/Nw * 100.0 << "%";
std::cout << std::endl;
std::cout.flush();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/irstlm.git
More information about the debian-science-commits
mailing list