aac-metrics 0.1.5 → 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/aac-metrics/loader.rb +1 -1
- data/lib/aac-metrics/metrics.rb +16 -6
- 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: 6eb16ba6004490123feaa056a8f47b22e9f0bb2680d4d3d512666084062fb683
|
4
|
+
data.tar.gz: 38e012659e66d1117839f7b29c82dbc1dac797c6af2e67411eff93bacf069836
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b2d23f02943d8011727dc3979405111137b119cc254021f77916fa4a62df524ec9d84d078b29f8fa360d1b46a267d65e2ae10291c87c97b2457671e591665c7e
|
7
|
+
data.tar.gz: '087f78505783f40b5c6f5bfaedc421833881bee629e2db39292cf8b6b23a115c6b3e332ae325d8de4d1fcce9e76b83cc4b5a44fa35787bc1b17eeb3b2acc99b3'
|
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,6 +220,10 @@ 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)
|
@@ -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.6
|
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-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|