You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the data preprocessing code, there is a function that write a triple to a file
def write_triple(f, ent, rel, t, S, P, O):
"""Write a triple to a file. """
f.write(str(ent[t[S]]) + "\t" + str(rel[t[P]]) + "\t" + str(ent[t[O]]) + "\n")
I think writing this way would take a lot of time when you deal with 100s of millions of relations. An ideal method would be to maintain a buffer (e.g. a string) and then dump whenever it reaches certain threshold.
The text was updated successfully, but these errors were encountered:
In the data preprocessing code, there is a function that write a triple to a file
I think writing this way would take a lot of time when you deal with 100s of millions of relations. An ideal method would be to maintain a buffer (e.g. a string) and then dump whenever it reaches certain threshold.
The text was updated successfully, but these errors were encountered: