whimsical-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject [whimsy] branch master updated: Tool to check how well stem method works
Date Tue, 26 May 2020 20:18:47 GMT
This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new d3246f1  Tool to check how well stem method works
d3246f1 is described below

commit d3246f107a35f4d989350f4c1ca64366c98ef423
Author: Sebb <sebb@apache.org>
AuthorDate: Tue May 26 21:18:33 2020 +0100

    Tool to check how well stem method works
---
 tools/stem_check.rb | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/tools/stem_check.rb b/tools/stem_check.rb
new file mode 100755
index 0000000..4dde548
--- /dev/null
+++ b/tools/stem_check.rb
@@ -0,0 +1,26 @@
+#!/usr/bin/env ruby
+
+# @(#) DRAFT: scan iclas.txt and check if stem method agrees with file names
+
+$LOAD_PATH.unshift '/srv/whimsy/lib'
+require 'whimsy/asf'
+
+legal = 0 # matches converted legal name
+public = 0 # matches converted public name
+invalid = 0 # no match
+
+ASF::ICLA.each do |icla|
+    claRef = icla.claRef
+    next unless claRef
+    lstem = ASF::Person.stem_DRAFT icla.legal_name
+    pstem = ASF::Person.stem_DRAFT icla.name
+    if lstem == claRef
+       legal += 1
+    elsif pstem == claRef
+       public += 1
+    else
+       p [claRef, lstem, pstem, icla.legal_name, icla.name]
+       invalid += 1
+    end
+end
+p [legal,public, invalid]


Mime
View raw message