Skip to content

Commit

Permalink
Add sample code
Browse files Browse the repository at this point in the history
  • Loading branch information
abhidg committed Oct 29, 2024
1 parent 5ceb986 commit 908b0c2
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions sample.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import arcmapper

arc = arcmapper.read_arc_schema("1.0.0")
dd = arcmapper.read_data_dictionary(
"ccpuk.csv",
description_field="Field Label",
response_field="Choices, Calculations, OR Slider Labels",
response_func="redcap",
)
print("Mapping using TF-IDF... ", end="")
arcmapper.map("tf-idf", dd, arc).to_csv("mapping_tfidf.csv", index=False)
print("done.")
print(" Mapping using SBERT... ", end="")
arcmapper.map("sbert", dd, arc).to_csv("mapping_sbert.csv", index=False)
print("done.")

0 comments on commit 908b0c2

Please sign in to comment.