aac-metrics 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cdca6a6f1a0e5d01566d0e756115a550cbe48ec89ae0bacafb50c33070dbfd00
4
- data.tar.gz: a86ccc6326629f57a9be59410d5768c8003141b7157b98e66337e73c98e3ae80
3
+ metadata.gz: 6eb16ba6004490123feaa056a8f47b22e9f0bb2680d4d3d512666084062fb683
4
+ data.tar.gz: 38e012659e66d1117839f7b29c82dbc1dac797c6af2e67411eff93bacf069836
5
5
  SHA512:
6
- metadata.gz: 874df2c0b4f3aeedacd81d278911c3d999a6b305e7c7754b865df3a32ae2546e0b0f7aa8c33517178ea767f12fc3383777e59a7a57d56f2571b18ce0af65034c
7
- data.tar.gz: 297b9e01205d0154b98f898fabf5804e541a6617f0177d80e24bd31c1b8e2c81e70d8cf068f44306bc431ff43f6f1b327c267d058a82778065ec48cad652179e
6
+ metadata.gz: b2d23f02943d8011727dc3979405111137b119cc254021f77916fa4a62df524ec9d84d078b29f8fa360d1b46a267d65e2ae10291c87c97b2457671e591665c7e
7
+ data.tar.gz: '087f78505783f40b5c6f5bfaedc421833881bee629e2db39292cf8b6b23a115c6b3e332ae325d8de4d1fcce9e76b83cc4b5a44fa35787bc1b17eeb3b2acc99b3'
@@ -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
@@ -1,6 +1,10 @@
1
1
  # TODO:
2
- # Scores for average effort level for word sets (spelling if that's th only way)
3
- # Effort scores for sentence corpus
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.5
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-05 00:00:00.000000000 Z
11
+ date: 2024-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json