Add metadata, link to code

#1
by nielsr HF Staff - opened
Files changed (1) hide show
  1. README.md +14 -5
README.md CHANGED
@@ -1,7 +1,14 @@
 
 
 
 
 
 
1
  ### ✨ [ACL 2025] Incorporating Domain Knowledge into Materials Tokenization
2
 
3
  You can find this paper in [here](https://arxiv.org/abs/2506.11115)
4
 
 
5
 
6
  If you only want to extract material concepts (material term or material formula) using **MatDetector**, please follow the steps below.
7
 
@@ -81,15 +88,17 @@ with open(os.path.join(output_directory, "mf.txt"), "w") as mf_file, \
81
  final_label = determine_label(tokenized, probabilities, label_map)
82
 
83
  if final_label == "O":
84
- o_file.write(f"{original_word}\n")
 
85
  elif final_label in ["B-mf", "I-mf"]:
86
- mf_file.write(f"{original_word}\n")
 
87
  elif final_label in ["B-matname", "I-matname"]:
88
- matname_file.write(f"{original_word}\n")
 
89
 
90
  progress_bar.update(1)
91
 
92
  print("Processing completed. Files saved as mf.txt, matname.txt, and o_tags.txt.")
93
 
94
- ```
95
-
 
1
+ ---
2
+ license: apache-2.0
3
+ library_name: transformers
4
+ pipeline_tag: token-classification
5
+ ---
6
+
7
  ### ✨ [ACL 2025] Incorporating Domain Knowledge into Materials Tokenization
8
 
9
  You can find this paper in [here](https://arxiv.org/abs/2506.11115)
10
 
11
+ Code: this https URL
12
 
13
  If you only want to extract material concepts (material term or material formula) using **MatDetector**, please follow the steps below.
14
 
 
88
  final_label = determine_label(tokenized, probabilities, label_map)
89
 
90
  if final_label == "O":
91
+ o_file.write(f"{original_word}
92
+ ")
93
  elif final_label in ["B-mf", "I-mf"]:
94
+ mf_file.write(f"{original_word}
95
+ ")
96
  elif final_label in ["B-matname", "I-matname"]:
97
+ matname_file.write(f"{original_word}
98
+ ")
99
 
100
  progress_bar.update(1)
101
 
102
  print("Processing completed. Files saved as mf.txt, matname.txt, and o_tags.txt.")
103
 
104
+ ```