-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplayground.rb
50 lines (40 loc) · 1.6 KB
/
playground.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
registration = DalphiProfiler::Registration.new(email: 'darrel.marvin@example.com', password: 'Pb9bWr42Lw01Vm')
authentification = DalphiProfiler::Authentification.new(email: 'darrel.marvin@example.com', password: 'Pb9bWr42Lw01Vm')
project_title = 'bluetooth port indexing'
project = DalphiProfiler::Project.new(title: project_title)
annotator = DalphiProfiler::Annotator.new(name: 'Kailey Ledner DVM', email: 'foo@example.com')
annotation_document = DalphiProfiler::AnnotationDocument.new(project_title: project_title)
annotation = DalphiProfiler::Annotation.new(project_title: project_title)
label_words = { 'PER': [
'Donald', 'Trump', 'Tsai', 'Ing-wen', 'Mike', 'Pence'
],
'COM': [
'ABC'
]
}
registration.register_admin
# authentification.login_admin
# project.create
# annotator.create
# annotator.assign_to_project(project_title: project_title)
# annotator.unassign_from_project(project_title: project_title)
# annotator.destroy
# project.destroy
# files = []
# 10.times do |i|
# files << File.open("/tmp/new-washington-post-#{(i + 1)}.json")
# end
# raw_datum = DalphiProfiler::RawDatum.new(project_title: project_title, files: files)
#
# raw_datum.create
# raw_datum.destroy_all
# annotation_document.create
# annotation_document.destroy_all
# 20.times do
# annotation.annotate(label_words: label_words)
# end
# annotation.merge
# annotator.assign_to_project(project_title: project_title)
# annotator.unassign_from_project(project_title: project_title)
# authentification.logout_admin
registration.unregister_admin