aac-metrics 0.1.5 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/aac-metrics/loader.rb +1 -1
- data/lib/aac-metrics/metrics.rb +19 -9
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 29c12bbac8e7d433302f16f6f7061aa66992875774c9de39374ae62d1e935c02
|
4
|
+
data.tar.gz: 508c9d5ce1db72a6274f3709cadd4ebcd3e703e79e6888647dbcaadbcc672e60
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 184f934c0be547f2e8ae6ed09060911398827eaefd32bbf3684ab6f9a1486f3961701017b7fb4271b46798efaf89a4431f43a59676401c0a1d7d5de302fda613
|
7
|
+
data.tar.gz: 77b725d14521a3bb1659960b51b108326a56b44427956b0a03082312e070be8e7908f731df6dfb45f99456c09e572cbc25a16d172a672e5262d979f5fa20ec18
|
data/lib/aac-metrics/loader.rb
CHANGED
@@ -269,7 +269,7 @@ module AACMetrics::Loader
|
|
269
269
|
end
|
270
270
|
if boards
|
271
271
|
analysis = File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'sets', fn.sub(/\.obfset$/, '.analysis')))
|
272
|
-
res = AACMetrics::Metrics.analyze(boards)
|
272
|
+
res = AACMetrics::Metrics.analyze(boards, false)
|
273
273
|
f = File.open(analysis, 'w')
|
274
274
|
f.write(JSON.pretty_generate(res))
|
275
275
|
f.close
|
data/lib/aac-metrics/metrics.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
# TODO:
|
2
|
-
#
|
3
|
-
#
|
2
|
+
# Qualitative evaluation criteria:
|
3
|
+
# - this set is easy to learn for communicators
|
4
|
+
# - this set is easy to learn for supporters
|
5
|
+
# - the vocabulary organization of this set makes sense
|
6
|
+
# - this set provides clear opportunities for user-specific words to be added
|
7
|
+
# - grammatical forms, growth over time
|
4
8
|
# Effort algorithms for scanning/eyes
|
5
9
|
# TODO: manual way to flag button as conceptually
|
6
10
|
# related to the same-locaed button on the
|
@@ -20,7 +24,7 @@ module AACMetrics::Metrics
|
|
20
24
|
# 3.5 When selecting a button with a semantic_id or clone_id,
|
21
25
|
# if the same id was present on the previous board,
|
22
26
|
# an additional discount to search and selection should be applied
|
23
|
-
def self.analyze(obfset, output=true)
|
27
|
+
def self.analyze(obfset, output=true, include_obfset=false)
|
24
28
|
locale = nil
|
25
29
|
buttons = []
|
26
30
|
refs = {}
|
@@ -50,6 +54,7 @@ module AACMetrics::Metrics
|
|
50
54
|
cols_tally = 0.0
|
51
55
|
root_rows = nil
|
52
56
|
root_cols = nil
|
57
|
+
# Gather repeated words/concepts
|
53
58
|
obfset.each do |board|
|
54
59
|
root_rows ||= board['grid']['rows']
|
55
60
|
root_cols ||= board['grid']['columns']
|
@@ -179,6 +184,7 @@ module AACMetrics::Metrics
|
|
179
184
|
else
|
180
185
|
word = button['label']
|
181
186
|
existing = known_buttons[word]
|
187
|
+
button['effort'] = effort
|
182
188
|
if !existing || existing[:effort] < effort #board[:level] < existing[:level]
|
183
189
|
puts "LIKE #{effort}" if button['label'] == 'like'
|
184
190
|
known_buttons[word] = {
|
@@ -201,7 +207,7 @@ module AACMetrics::Metrics
|
|
201
207
|
clusters[btn[:level]] ||= []
|
202
208
|
clusters[btn[:level]] << btn
|
203
209
|
end
|
204
|
-
{
|
210
|
+
res = {
|
205
211
|
analysis_version: AACMetrics::VERSION,
|
206
212
|
locale: locale,
|
207
213
|
total_boards: total_boards,
|
@@ -214,14 +220,18 @@ module AACMetrics::Metrics
|
|
214
220
|
buttons: buttons,
|
215
221
|
levels: clusters
|
216
222
|
}
|
223
|
+
if include_obfset
|
224
|
+
res[:obfset] = obfset
|
225
|
+
end
|
226
|
+
res
|
217
227
|
end
|
218
228
|
|
219
229
|
SQRT2 = Math.sqrt(2)
|
220
230
|
BUTTON_SIZE_MULTIPLIER = 0.09
|
221
|
-
FIELD_SIZE_MULTIPLIER = 0.
|
222
|
-
VISUAL_SCAN_MULTIPLIER = 0.
|
231
|
+
FIELD_SIZE_MULTIPLIER = 0.005
|
232
|
+
VISUAL_SCAN_MULTIPLIER = 0.015
|
223
233
|
BOARD_CHANGE_PROCESSING_EFFORT = 1.0
|
224
|
-
DISTANCE_MULTIPLIER = 0.
|
234
|
+
DISTANCE_MULTIPLIER = 0.4
|
225
235
|
DISTANCE_THRESHOLD_TO_SKIP_VISUAL_SCAN = 0.1
|
226
236
|
SKIPPED_VISUAL_SCAN_DISTANCE_MULTIPLIER = 0.5
|
227
237
|
|
@@ -245,8 +255,8 @@ module AACMetrics::Metrics
|
|
245
255
|
10 + (word.length * 2.5)
|
246
256
|
end
|
247
257
|
|
248
|
-
def self.analyze_and_compare(obfset, compset)
|
249
|
-
target = AACMetrics::Metrics.analyze(obfset, false)
|
258
|
+
def self.analyze_and_compare(obfset, compset, include_obfset=false)
|
259
|
+
target = AACMetrics::Metrics.analyze(obfset, false, include_obfset)
|
250
260
|
res = {}.merge(target)
|
251
261
|
|
252
262
|
compare = AACMetrics::Metrics.analyze(compset, false)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aac-metrics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Whitmer
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|