\t
for
.tsv
files and ,
otherwise.
Suppose we want to create a predicate table/6
from a CSV file that we know contains 6 fields per record. This can be
done using the code below. Without the option arity(6)
,
this would generate a predicate table/N, where N is the number of fields
per record in the data.
?- csv_read_file(File, Rows, [functor(table), arity(6)]), maplist(assert, Rows).