bjorn-hommel commited on
Commit
e113c95
·
1 Parent(s): 89a0138

small refactor, simplifying app

Browse files
Files changed (3) hide show
  1. app.py +140 -149
  2. modeling.py +5 -51
  3. tos.md +27 -26
app.py CHANGED
@@ -27,27 +27,150 @@ def initialize():
27
  logging.basicConfig(level=logging.INFO)
28
  load_dotenv()
29
 
30
- st.session_state.setdefault('model_names', ['SurveyBot3000'])
31
- st.session_state.setdefault('input_model_name', st.session_state['model_names'][0])
32
- st.session_state.setdefault('loaded_model_name', None)
33
- st.session_state.setdefault('search_query', None)
 
34
  st.session_state.setdefault('db', None)
 
 
35
  st.session_state.setdefault('search_results', pd.DataFrame())
36
- st.session_state.setdefault('explore_plot', None)
37
- st.session_state.setdefault('is_authenticated', False)
38
 
39
- with open('config.yaml', 'r') as stream:
40
- st.session_state['config'] = yaml.safe_load(stream)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
- if os.environ.get('encryption_key'):
43
- encryption_key = os.environ.get('encryption_key')
44
- st.session_state.setdefault('encryption_key', encryption_key)
45
- else:
46
- st.session_state.setdefault('encryption_key', None)
47
 
48
  def main():
49
- st.set_page_config(page_title='Synth-Net')
50
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  st.markdown("# The Synthetic Nomological Net")
52
  st.markdown("""
53
  Psychological science is experiencing rapid growth in constructs and measures, partly due to refinement and new research areas,
@@ -58,141 +181,9 @@ def main():
58
  It analyzes textual data from over 21,000 scales (containing more than 330,000 items) in an effort to reduce redundancies in measures used in the behavioral sciences.
59
  """, unsafe_allow_html=True)
60
 
61
- placeholder_authentication = st.empty()
62
- placeholder_demo = st.empty()
63
 
64
  if st.session_state['is_authenticated']:
65
- show_demo(placeholder_demo)
66
  else:
67
- show_authentication(placeholder_authentication)
68
-
69
- def show_authentication(placeholder):
70
- with placeholder:
71
-
72
- with st.container():
73
-
74
- with st.container(height=200, border=None, key=None):
75
-
76
- with open('tos.md', 'r', encoding='utf-8') as f:
77
- tos_content = f.read()
78
- st.write(tos_content)
79
-
80
- checkbox1 = "I agree to use this application **solely for non-commercial research purposes**. Any other usage is **strictly prohibited**!"
81
- checkbox2 = "I have **read**, **understood**, and **agree** to be bound by the Terms of Service and Privacy Policy."
82
-
83
-
84
- if st.checkbox(label=checkbox1) & st.checkbox(label=checkbox2):
85
- with st.form("authentication_form"):
86
-
87
- st.markdown("""
88
- ## Authentication
89
- This app is a research preview and requires authentication.
90
- All data is encrypted. Please use your 32-byte encryption key to proceed!
91
- """)
92
-
93
- st.text_input(
94
- label="🔑 Encryption key",
95
- value="",
96
- max_chars=None,
97
- key='encryption_key',
98
- placeholder="A URL-safe base64-encoded 32-byte key"
99
- )
100
-
101
- submitted = st.form_submit_button(
102
- label="Authenticate",
103
- type="primary",
104
- use_container_width=True
105
- )
106
-
107
- if submitted:
108
- try:
109
- modeling.load_db()
110
- st.rerun()
111
- except InvalidToken:
112
- error = f"Error: The encryption key you have entered is invalid (**{st.session_state['encryption_key']}**)!"
113
- st.error(body=error, icon="🔑")
114
- logging.error(error)
115
- st.session_state['is_authenticated'] = False
116
- return
117
- except ValueError as error:
118
- st.error(body=error, icon="🔑")
119
- logging.error(error)
120
- st.session_state['is_authenticated'] = False
121
- return
122
-
123
- def show_demo(placeholder):
124
-
125
- with placeholder:
126
- with st.container():
127
- st.divider()
128
- st.markdown("""
129
- ## Try it yourself!
130
- Define a scale by entering individual items in YAML format.
131
- After form submission, a vector representation for the scale is calculated using the selected encoder model.
132
- Cosine similarities between this vector and the representations of existing scales are then computed.
133
- The resulting table outputs measures with high semantic overlap.
134
- """)
135
-
136
- if st.session_state['loaded_model_name'] is not None:
137
- input_model_index = st.session_state['model_names'].index(st.session_state['input_model_name'])
138
- else:
139
- input_model_index = 0
140
-
141
- st.selectbox(
142
- label="Select model",
143
- options=st.session_state['model_names'],
144
- index=input_model_index,
145
- placeholder="Choose a model",
146
- key='input_model_name'
147
- )
148
-
149
-
150
- with st.container():
151
- if 'input_items' not in st.session_state:
152
- st.session_state['input_items'] = dict_to_yaml(st.session_state['config']['input_items'])
153
-
154
- with st.form("submission_form"):
155
- st.text_area(
156
- label="Search for similar measures by entering items that constitute the scale (YAML-Formatted):",
157
- height=175,
158
- key='input_items'
159
- )
160
-
161
-
162
- submitted = st.form_submit_button(
163
- label="Search Synth-Net",
164
- type="primary",
165
- use_container_width=True
166
- )
167
-
168
- if submitted:
169
-
170
- try:
171
- st.session_state['search_query'] = yaml_to_dict(st.session_state['input_items'])
172
- except yaml.YAMLError as e:
173
- st.error(f"Yikes, you better get your YAML straight! Check https://yaml.org/ for help! \n {e}")
174
- return
175
-
176
- no_model = st.session_state.get('model') is None
177
- swap_model = st.session_state.get('input_model_name') != st.session_state['loaded_model_name']
178
-
179
- if swap_model or no_model:
180
- modeling.load_db()
181
- modeling.load_model()
182
-
183
- modeling.search()
184
-
185
-
186
- with st.container():
187
- if not st.session_state['search_results'].empty:
188
- with st.spinner('Rendering search results...'):
189
- df = st.session_state['search_results'].style.format({
190
- 'Match': '{:.2f}'.format,
191
- 'Scale': str.capitalize,
192
- 'Instrument': str.capitalize,
193
- })
194
- st.dataframe(df, use_container_width=True, hide_index=True)
195
-
196
- if __name__ == '__main__':
197
- initialize()
198
- main()
 
27
  logging.basicConfig(level=logging.INFO)
28
  load_dotenv()
29
 
30
+ st.session_state.setdefault('config', None)
31
+
32
+ st.session_state.setdefault('encryption_key', None)
33
+ st.session_state.setdefault('is_authenticated', False)
34
+
35
  st.session_state.setdefault('db', None)
36
+
37
+ st.session_state.setdefault('search_query', None)
38
  st.session_state.setdefault('search_results', pd.DataFrame())
 
 
39
 
40
+ if st.session_state['config'] is None:
41
+ with open('config.yaml', 'r') as stream:
42
+ st.session_state['config'] = yaml.safe_load(stream)
43
+
44
+ def show_authentication():
45
+
46
+ with st.container(height=400, border=None, key=None):
47
+
48
+ with open('tos.md', 'r', encoding='utf-8') as f:
49
+ tos_content = f.read()
50
+ st.write(tos_content)
51
+
52
+ checkbox1 = "I agree to use this application **solely for non-commercial research purposes**. Any other usage is **strictly prohibited**!"
53
+ checkbox2 = "I have **read**, **understood**, and **agree** to be bound by the Terms of Service and Privacy Policy."
54
+
55
+
56
+ if st.checkbox(label=checkbox1) & st.checkbox(label=checkbox2):
57
+
58
+ with st.form("authentication_form", border=False):
59
+ st.markdown("""
60
+ ## Authentication
61
+ This app is a research preview and requires authentication.
62
+ All data is encrypted. Please use your 32-byte encryption key to proceed!
63
+ """)
64
+
65
+ st.text_input(
66
+ label="🔑 Encryption key",
67
+ value="",
68
+ max_chars=None,
69
+ key='encryption_key',
70
+ placeholder="A URL-safe base64-encoded 32-byte key"
71
+ )
72
+
73
+ submitted = st.form_submit_button(
74
+ label="Authenticate",
75
+ type="primary",
76
+ use_container_width=True
77
+ )
78
+
79
+ if submitted:
80
+ try:
81
+ modeling.load_db()
82
+ st.rerun()
83
+ except InvalidToken:
84
+ error = f"Error: The encryption key you have entered is invalid!"
85
+ st.error(body=error, icon="🔑")
86
+ logging.error(error)
87
+ st.session_state['is_authenticated'] = False
88
+ return
89
+ except ValueError as error:
90
+ st.error(body=error, icon="🔑")
91
+ logging.error(error)
92
+ st.session_state['is_authenticated'] = False
93
+ return
94
+ # with placeholder:
95
+
96
+ # with st.container():
97
+
98
+ # with st.container(height=200, border=None, key=None):
99
+
100
+ # with open('tos.md', 'r', encoding='utf-8') as f:
101
+ # tos_content = f.read()
102
+ # st.write(tos_content)
103
+
104
+ # checkbox1 = "I agree to use this application **solely for non-commercial research purposes**. Any other usage is **strictly prohibited**!"
105
+ # checkbox2 = "I have **read**, **understood**, and **agree** to be bound by the Terms of Service and Privacy Policy."
106
+
107
+
108
+ # if st.checkbox(label=checkbox1) & st.checkbox(label=checkbox2):
109
+ # with st.form("authentication_form"):
110
+
111
+ # st.markdown("""
112
+ # ## Authentication
113
+ # This app is a research preview and requires authentication.
114
+ # All data is encrypted. Please use your 32-byte encryption key to proceed!
115
+ # """)
116
+
117
 
 
 
 
 
 
118
 
119
  def main():
 
120
 
121
+ with st.container():
122
+ st.divider()
123
+ st.markdown("""
124
+ ## Try it yourself!
125
+ Define a scale by entering individual items in YAML format.
126
+ After form submission, a vector representation for the scale is calculated using the selected encoder model.
127
+ Cosine similarities between this vector and the representations of existing scales are then computed.
128
+ The resulting table outputs measures with high semantic overlap.
129
+ """)
130
+
131
+ with st.container():
132
+ if 'input_items' not in st.session_state:
133
+ st.session_state['input_items'] = dict_to_yaml(st.session_state['config']['input_items'])
134
+
135
+ with st.form("submission_form"):
136
+ st.text_area(
137
+ label="Search for similar measures by entering items that constitute the scale (YAML-Formatted):",
138
+ height=175,
139
+ key='input_items'
140
+ )
141
+
142
+
143
+ submitted = st.form_submit_button(
144
+ label="Search Synth-Net",
145
+ type="primary",
146
+ use_container_width=True
147
+ )
148
+
149
+ if submitted:
150
+
151
+ try:
152
+ st.session_state['search_query'] = yaml_to_dict(st.session_state['input_items'])
153
+ except yaml.YAMLError as e:
154
+ st.error(f"Yikes, you better get your YAML straight! Check https://yaml.org/ for help! \n {e}")
155
+ return
156
+
157
+ if not st.session_state.get('model'):
158
+ modeling.load_model()
159
+
160
+ modeling.search()
161
+
162
+ with st.container():
163
+ if not st.session_state['search_results'].empty:
164
+ with st.spinner('Rendering search results...'):
165
+ df = st.session_state['search_results'].style.format({
166
+ 'Match': '{:.2f}'.format,
167
+ 'Scale': str.capitalize,
168
+ 'Instrument': str.capitalize,
169
+ })
170
+ st.dataframe(df, use_container_width=True, hide_index=True)
171
+
172
+ if __name__ == '__main__':
173
+ st.set_page_config(page_title='Synth-Net')
174
  st.markdown("# The Synthetic Nomological Net")
175
  st.markdown("""
176
  Psychological science is experiencing rapid growth in constructs and measures, partly due to refinement and new research areas,
 
181
  It analyzes textual data from over 21,000 scales (containing more than 330,000 items) in an effort to reduce redundancies in measures used in the behavioral sciences.
182
  """, unsafe_allow_html=True)
183
 
184
+ initialize()
 
185
 
186
  if st.session_state['is_authenticated']:
187
+ main()
188
  else:
189
+ show_authentication()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
modeling.py CHANGED
@@ -15,17 +15,15 @@ from pdb import set_trace as trace
15
  def load_db():
16
 
17
  with st.spinner('Loading pre-computed embeddings...'):
18
- if st.session_state['input_model_name']:
19
- file_path = f"./{st.session_state['input_model_name'].lower()}.enc"
20
- else:
21
- file_path = f"./{st.session_state['model_names'][0].lower()}.enc"
22
 
 
23
  logging.info(f"Loading data from {file_path}!")
24
 
25
  with open(file_path, 'rb') as f:
26
  encrypted_data = f.read()
27
 
28
  encryption_key = st.session_state['encryption_key']
 
29
  if isinstance(encryption_key, str):
30
  encryption_key = encryption_key.encode('utf-8')
31
 
@@ -40,15 +38,9 @@ def load_db():
40
  def load_model():
41
 
42
  with st.spinner('Loading the model...'):
43
- env_local = st.session_state['input_model_name'].lower() + '_path'
44
- env_remote = st.session_state['input_model_name'].lower(
45
- ) + '_remote_path'
46
 
47
- if os.environ.get(env_remote):
48
- model_path = os.environ.get(env_remote)
49
- else:
50
- model_path = os.getenv(env_local)
51
 
 
52
  logging.info(f"Loading model from {model_path}!")
53
 
54
  auth_token = os.environ.get('read_models') or True
@@ -58,9 +50,7 @@ def load_model():
58
  token=auth_token
59
  )
60
 
61
- st.session_state['loaded_model_name'] = st.session_state['input_model_name']
62
-
63
- logging.info(f"Loaded {st.session_state['input_model_name']}!")
64
 
65
 
66
  def search():
@@ -81,40 +71,4 @@ def search():
81
  'Scale': st.session_state['db']['ScaleName'],
82
  'Instrument': st.session_state['db']['InstrumentName'],
83
  'Reference': st.session_state['db']['psyctest_doi'],
84
- }).sort_values(by='Match', ascending=False)
85
-
86
-
87
- def explore():
88
-
89
- df = st.session_state['db']
90
- message = f'Modeling synthetic construct space for {df.shape[0]} scales...'
91
- logging.info(message)
92
-
93
- with st.spinner(message):
94
-
95
- documents = [f'{x}\n{y}' for x, y in zip(
96
- df.ScaleName.tolist(), df.InstrumentName.tolist())]
97
- embeddings = np.stack(df.ItemStemEmbeddings.to_numpy())
98
-
99
- topic_model = BERTopic().fit(
100
- documents=documents,
101
- embeddings=embeddings
102
- )
103
-
104
- reduced_embeddings = UMAP(
105
- n_neighbors=10,
106
- n_components=2,
107
- min_dist=0.0,
108
- metric='cosine'
109
- ).fit_transform(embeddings)
110
-
111
- st.session_state['explore_plot'] = topic_model.visualize_documents(
112
- docs=documents,
113
- reduced_embeddings=reduced_embeddings,
114
- hide_annotations=True,
115
- hide_document_hover=False,
116
- custom_labels=False,
117
- title="The Synthetic Nomological Net",
118
- width=1500,
119
- height=1500
120
- )
 
15
  def load_db():
16
 
17
  with st.spinner('Loading pre-computed embeddings...'):
 
 
 
 
18
 
19
+ file_path = "./surveybot3000.enc"
20
  logging.info(f"Loading data from {file_path}!")
21
 
22
  with open(file_path, 'rb') as f:
23
  encrypted_data = f.read()
24
 
25
  encryption_key = st.session_state['encryption_key']
26
+
27
  if isinstance(encryption_key, str):
28
  encryption_key = encryption_key.encode('utf-8')
29
 
 
38
  def load_model():
39
 
40
  with st.spinner('Loading the model...'):
 
 
 
41
 
 
 
 
 
42
 
43
+ model_path = os.environ.get('surveybot3000_path') or os.getenv('surveybot3000_path')
44
  logging.info(f"Loading model from {model_path}!")
45
 
46
  auth_token = os.environ.get('read_models') or True
 
50
  token=auth_token
51
  )
52
 
53
+ logging.info(f"Loaded model!")
 
 
54
 
55
 
56
  def search():
 
71
  'Scale': st.session_state['db']['ScaleName'],
72
  'Instrument': st.session_state['db']['InstrumentName'],
73
  'Reference': st.session_state['db']['psyctest_doi'],
74
+ }).sort_values(by='Match', ascending=False)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
tos.md CHANGED
@@ -1,18 +1,17 @@
1
- # Terms of Service
2
- ## The Synthetic Nomological Net
3
 
4
  **Effective Date:** June, 13h, 2025
5
  **Last Updated:** June, 13h, 2025
6
 
7
- ## 1. Acceptance of Terms
8
 
9
  By accessing or using The Synthetic Nomological Net web application ("Service"), you agree to be bound by these Terms of Service ("Terms"). If you do not agree to these Terms, please do not use the Service.
10
 
11
- ## 2. Description of Service
12
 
13
  The Synthetic Nomological Net is a research tool that uses natural language processing to analyze semantic overlap in psychological measures. The Service provides access to analyzed data from over 21,000 scales containing more than 330,000 items for academic and research purposes.
14
 
15
- ## 3. Noncommercial Use Only
16
 
17
  **IMPORTANT RESTRICTION:** This Service and all data contained within it may only be used for noncommercial purposes. The underlying dataset has been provided by the American Psychological Association (APA) as a research preview with strict noncommercial use limitations.
18
 
@@ -21,7 +20,7 @@ You are expressly prohibited from:
21
  - Downloading, saving or storing any data associated with this application
22
  - Using any data or code to develop commercial applications or tools
23
 
24
- ## 4. Permitted Uses
25
 
26
  The Service may be used for:
27
  - Academic research and scholarly inquiry
@@ -30,11 +29,11 @@ The Service may be used for:
30
  - Peer-reviewed publication and scientific communication
31
  - Conference presentations and academic discussions
32
 
33
- ## 5. Data Attribution and Source
34
 
35
  The underlying psychological measurement data is provided by the American Psychological Association (APA) as a research preview. Users must acknowledge this data source in any research, publications, or presentations that utilize findings from this Service.
36
 
37
- ## 6. User Responsibilities
38
 
39
  You agree to:
40
  - Use the Service only for its intended research and academic purposes
@@ -44,7 +43,7 @@ You agree to:
44
  - Comply with all applicable laws and regulations
45
  - Use the Service in a manner that does not interfere with its normal operation
46
 
47
- ## 7. Prohibited Activities
48
 
49
  You may not:
50
  - Violate the noncommercial use restriction
@@ -56,59 +55,60 @@ You may not:
56
 
57
  **Data Security Notice**: The underlying APA dataset is encrypted to protect the data integrity and comply with usage restrictions. Any attempts to decrypt, break, or circumvent this encryption constitute a clear and serious violation of these Terms and may result in immediate termination of access and potential legal action.
58
 
59
- ## 8. Intellectual Property Rights
60
 
61
  The Service, its design, functionality, and presentation are owned by the Service provider. The underlying psychological measurement data remains the property of the American Psychological Association and/or that of the authors of the respective publication from which they were obtained. Users do not acquire any ownership rights in the Service or underlying data through use.
62
 
63
- ## 9. Privacy and Data Collection
64
 
65
  Your use of the Service is also governed by our Privacy Policy, which is incorporated into these Terms by reference.
66
 
67
- ## 10. Disclaimers
68
 
69
  THE SERVICE IS PROVIDED "AS IS" WITHOUT WARRANTIES OF ANY KIND. We disclaim all warranties, express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, and non-infringement.
70
 
71
  The Service is provided for research purposes. We make no representations about the accuracy, completeness, or reliability of any research findings or data analysis provided by the Service.
72
 
73
- ## 11. Limitation of Liability
74
 
75
  To the maximum extent permitted by law, we shall not be liable for any indirect, incidental, special, consequential, or punitive damages, including but not limited to loss of profits, data, or other intangible losses resulting from your use of the Service.
76
 
77
- ## 12. Termination
78
 
79
  We reserve the right to terminate or suspend your access to the Service at any time, with or without notice, for any reason, including violation of these Terms or the noncommercial use restriction.
80
 
81
- ## 13. Changes to Terms
82
 
83
  We reserve the right to modify these Terms at any time. Changes will be effective immediately upon posting. Your continued use of the Service after changes constitutes acceptance of the new Terms.
84
 
85
- ## 14. Governing Law
86
 
87
- These Terms shall be governed by and construed in accordance with the laws of [Insert Jurisdiction], without regard to conflict of law principles.
88
 
89
- ## 15. Research Ethics
90
 
91
  Users are encouraged to follow appropriate research ethics guidelines when using the Service, including obtaining necessary institutional approvals for research involving human subjects data analysis.
92
 
93
- ## 16. Contact Information
94
 
95
  For questions about these Terms of Service, please contact:
96
  - Björn E. Hommel, PhD; [email protected]
 
97
  - Malte Elson, PhD; [email protected]
98
 
99
  ---
100
 
101
- # Privacy Policy
102
- ## The Synthetic Nomological Net
103
 
104
  **Effective Date:** June, 13h, 2025
105
  **Last Updated:** June, 13h, 2025
106
 
107
- ## Data Collection by This Application
108
 
109
  **We do not collect, store, or process any personal data or user information through this application.** The Synthetic Nomological Net operates as a research tool that provides access to pre-analyzed psychological measurement data without requiring user registration, tracking, or data collection.
110
 
111
- ## Third-Party Platform Data Collection
112
 
113
  **Important Notice:** This application is hosted on Hugging Face Spaces, a third-party platform operated by Hugging Face, Inc. **We are not responsible for any data collection, processing, or privacy practices of Hugging Face Spaces.**
114
 
@@ -118,20 +118,21 @@ Hugging Face may collect certain information about your use of their platform, i
118
  - Cookies and similar tracking technologies
119
  - Any other data as described in Hugging Face's own privacy policy
120
 
121
- ## Your Rights and Responsibilities
122
 
123
  Since we do not collect your data, we cannot provide access, correction, or deletion of personal information. For any privacy concerns related to the hosting platform, you must contact Hugging Face directly and review their privacy policy at https://huggingface.co/privacy.
124
 
125
  Users are advised to review Hugging Face's privacy policy and terms of service to understand what data may be collected during your use of this application.
126
 
127
- ## Data Processing Disclaimer
128
 
129
  Any research queries or interactions you perform within this application are processed locally and are not stored or transmitted by us. However, such interactions may be subject to Hugging Face's data processing practices over which we have no control.
130
 
131
- ## Contact for Privacy Questions
132
 
133
  For questions specifically about this Privacy Policy, please contact:
134
  - Björn E. Hommel, PhD; [email protected]
 
135
  - Malte Elson, PhD; [email protected]
136
 
137
  For questions about data collection by the hosting platform, please contact Hugging Face directly through their official channels.
 
1
+ ## Terms of Service
 
2
 
3
  **Effective Date:** June, 13h, 2025
4
  **Last Updated:** June, 13h, 2025
5
 
6
+ ### 1. Acceptance of Terms
7
 
8
  By accessing or using The Synthetic Nomological Net web application ("Service"), you agree to be bound by these Terms of Service ("Terms"). If you do not agree to these Terms, please do not use the Service.
9
 
10
+ ### 2. Description of Service
11
 
12
  The Synthetic Nomological Net is a research tool that uses natural language processing to analyze semantic overlap in psychological measures. The Service provides access to analyzed data from over 21,000 scales containing more than 330,000 items for academic and research purposes.
13
 
14
+ ### 3. Noncommercial Use Only
15
 
16
  **IMPORTANT RESTRICTION:** This Service and all data contained within it may only be used for noncommercial purposes. The underlying dataset has been provided by the American Psychological Association (APA) as a research preview with strict noncommercial use limitations.
17
 
 
20
  - Downloading, saving or storing any data associated with this application
21
  - Using any data or code to develop commercial applications or tools
22
 
23
+ ### 4. Permitted Uses
24
 
25
  The Service may be used for:
26
  - Academic research and scholarly inquiry
 
29
  - Peer-reviewed publication and scientific communication
30
  - Conference presentations and academic discussions
31
 
32
+ ### 5. Data Attribution and Source
33
 
34
  The underlying psychological measurement data is provided by the American Psychological Association (APA) as a research preview. Users must acknowledge this data source in any research, publications, or presentations that utilize findings from this Service.
35
 
36
+ ### 6. User Responsibilities
37
 
38
  You agree to:
39
  - Use the Service only for its intended research and academic purposes
 
43
  - Comply with all applicable laws and regulations
44
  - Use the Service in a manner that does not interfere with its normal operation
45
 
46
+ ### 7. Prohibited Activities
47
 
48
  You may not:
49
  - Violate the noncommercial use restriction
 
55
 
56
  **Data Security Notice**: The underlying APA dataset is encrypted to protect the data integrity and comply with usage restrictions. Any attempts to decrypt, break, or circumvent this encryption constitute a clear and serious violation of these Terms and may result in immediate termination of access and potential legal action.
57
 
58
+ ### 8. Intellectual Property Rights
59
 
60
  The Service, its design, functionality, and presentation are owned by the Service provider. The underlying psychological measurement data remains the property of the American Psychological Association and/or that of the authors of the respective publication from which they were obtained. Users do not acquire any ownership rights in the Service or underlying data through use.
61
 
62
+ ### 9. Privacy and Data Collection
63
 
64
  Your use of the Service is also governed by our Privacy Policy, which is incorporated into these Terms by reference.
65
 
66
+ ### 10. Disclaimers
67
 
68
  THE SERVICE IS PROVIDED "AS IS" WITHOUT WARRANTIES OF ANY KIND. We disclaim all warranties, express or implied, including but not limited to warranties of merchantability, fitness for a particular purpose, and non-infringement.
69
 
70
  The Service is provided for research purposes. We make no representations about the accuracy, completeness, or reliability of any research findings or data analysis provided by the Service.
71
 
72
+ ### 11. Limitation of Liability
73
 
74
  To the maximum extent permitted by law, we shall not be liable for any indirect, incidental, special, consequential, or punitive damages, including but not limited to loss of profits, data, or other intangible losses resulting from your use of the Service.
75
 
76
+ ### 12. Termination
77
 
78
  We reserve the right to terminate or suspend your access to the Service at any time, with or without notice, for any reason, including violation of these Terms or the noncommercial use restriction.
79
 
80
+ ### 13. Changes to Terms
81
 
82
  We reserve the right to modify these Terms at any time. Changes will be effective immediately upon posting. Your continued use of the Service after changes constitutes acceptance of the new Terms.
83
 
84
+ ### 14. Governing Law
85
 
86
+ These Terms shall be governed by and construed in accordance with the laws of the European Union, without regard to conflict of law principles.
87
 
88
+ ### 15. Research Ethics
89
 
90
  Users are encouraged to follow appropriate research ethics guidelines when using the Service, including obtaining necessary institutional approvals for research involving human subjects data analysis.
91
 
92
+ ### 16. Contact Information
93
 
94
  For questions about these Terms of Service, please contact:
95
  - Björn E. Hommel, PhD; [email protected]
96
+ - Ruben C. Lennartz (Arslan), PhD; [email protected]
97
  - Malte Elson, PhD; [email protected]
98
 
99
  ---
100
 
101
+ ## Privacy Policy
102
+ ### The Synthetic Nomological Net
103
 
104
  **Effective Date:** June, 13h, 2025
105
  **Last Updated:** June, 13h, 2025
106
 
107
+ ### Data Collection by This Application
108
 
109
  **We do not collect, store, or process any personal data or user information through this application.** The Synthetic Nomological Net operates as a research tool that provides access to pre-analyzed psychological measurement data without requiring user registration, tracking, or data collection.
110
 
111
+ ### Third-Party Platform Data Collection
112
 
113
  **Important Notice:** This application is hosted on Hugging Face Spaces, a third-party platform operated by Hugging Face, Inc. **We are not responsible for any data collection, processing, or privacy practices of Hugging Face Spaces.**
114
 
 
118
  - Cookies and similar tracking technologies
119
  - Any other data as described in Hugging Face's own privacy policy
120
 
121
+ ### Your Rights and Responsibilities
122
 
123
  Since we do not collect your data, we cannot provide access, correction, or deletion of personal information. For any privacy concerns related to the hosting platform, you must contact Hugging Face directly and review their privacy policy at https://huggingface.co/privacy.
124
 
125
  Users are advised to review Hugging Face's privacy policy and terms of service to understand what data may be collected during your use of this application.
126
 
127
+ ### Data Processing Disclaimer
128
 
129
  Any research queries or interactions you perform within this application are processed locally and are not stored or transmitted by us. However, such interactions may be subject to Hugging Face's data processing practices over which we have no control.
130
 
131
+ ### Contact for Privacy Questions
132
 
133
  For questions specifically about this Privacy Policy, please contact:
134
  - Björn E. Hommel, PhD; [email protected]
135
+ - Ruben C. Lennartz (Arslan), PhD; [email protected]
136
  - Malte Elson, PhD; [email protected]
137
 
138
  For questions about data collection by the hosting platform, please contact Hugging Face directly through their official channels.