commit | f4a649a12ddf7207f14dca9db1c49aad0b498cdc | [log] [tgz] |
---|---|---|
author | Marc Kupietz <kupietz@ids-mannheim.de> | Fri Feb 26 09:18:01 2021 +0100 |
committer | Marc Kupietz <kupietz@ids-mannheim.de> | Fri Feb 26 09:18:01 2021 +0100 |
tree | 75c0054484ca948bda339c39a21738f87a851d27 | |
parent | 3203e4c1c6442ab210b985033d1a30b75baae85c [diff] |
CollocatorDB: Introduce FREQUENCY_THRESHOLD for PMI
diff --git a/collocatordb.cc b/collocatordb.cc index 4a37563..5dcbfc0 100644 --- a/collocatordb.cc +++ b/collocatordb.cc
@@ -120,7 +120,10 @@ c1 = f2, e = r1 * c1 / total, o = f12; - return log2(o/e); + if(f12 < FREQUENCY_THRESHOLD) + return -1.0; + else + return log2(o/e); } // Bouma, Gerlof (2009): <a href="https://svn.spraakdata.gu.se/repos/gerlof/pub/www/Docs/npmi-pfd.pdf">