Hi, I use swi-prolog and want to convert list of list of list to atom or string . I am new Prolog.
my code as:
Parses = `[[[wordtype=NOUN, head=nectec, sem=[pred=NECTEC, ntype=NPRP, ontology=enterprise]]]]'
atom_codes(Pa,Parses), Parses = list of lists of lists
ERROR: (c :/gfulab/load.pl:4):
atom_chars/2: Type error: `text' expected, found `[[[wordtype=NOUN, head=nectec, sem=[pred=NECTEC, ntype=NPRP, ontology=enterprise]]]]'
atom_codes(Pa,Parses), Parses = list of lists of lists
ERROR: (c:/ gfulab/load.pl:4):
atom_codes/2: Type error: `text' expected, found `[[wordtype=NOUN, head= nectec, sem=[pred=NECTEC, ntype=NPRP, ontology=enterprise]]]'
string_to_list(Pa,P), P = list of lists of lists
string_to_atom(Pa,Parse),
ERROR: (c: /gfulab/load.pl:4):
string_to_list/2: Arguments are not sufficiently instantiated
Sir, I have a question about Prolog.
I am new Prolog that I want to convert list of list of list to atom as follow:
Parses = `[[[wordtype=NOUN, head=nectec, sem=[pred=NECTEC, ntype=NPRP, ontology=enterprise]]]]'
atom_codes(Pa,Parses), Parses = list of lists of lists
ERROR: (c :/gfulab/load.pl:4):
atom_chars/2: Type error: `text' expected, found `[[[wordtype=NOUN, head=nectec, sem=[pred=NECTEC, ntype=NPRP, ontology=enterprise]]]]'
atom_codes(Pa,Parses), Parses = list of lists of lists
ERROR: (c:/ gfulab/load.pl:4):
atom_codes/2: Type error: `text' expected, found `[[wordtype=NOUN, head= nectec, sem=[pred=NECTEC, ntype=NPRP, ontology=enterprise]]]'
string_to_list(Pa,P), P = list of lists of lists
string_to_atom(Pa,Parse),
ERROR: (c: /gfulab/load.pl:4):
string_to_list/2: Arguments are not sufficiently instantiated
Please advise me.
Thank you very much
Tawee
my code as:
Parses = `[[[wordtype=NOUN, head=nectec, sem=[pred=NECTEC, ntype=NPRP, ontology=enterprise]]]]'
atom_codes(Pa,Parses), Parses = list of lists of lists
ERROR: (c :/gfulab/load.pl:4):
atom_chars/2: Type error: `text' expected, found `[[[wordtype=NOUN, head=nectec, sem=[pred=NECTEC, ntype=NPRP, ontology=enterprise]]]]'
atom_codes(Pa,Parses), Parses = list of lists of lists
ERROR: (c:/ gfulab/load.pl:4):
atom_codes/2: Type error: `text' expected, found `[[wordtype=NOUN, head= nectec, sem=[pred=NECTEC, ntype=NPRP, ontology=enterprise]]]'
string_to_list(Pa,P), P = list of lists of lists
string_to_atom(Pa,Parse),
ERROR: (c: /gfulab/load.pl:4):
string_to_list/2: Arguments are not sufficiently instantiated
Sir, I have a question about Prolog.
I am new Prolog that I want to convert list of list of list to atom as follow:
Parses = `[[[wordtype=NOUN, head=nectec, sem=[pred=NECTEC, ntype=NPRP, ontology=enterprise]]]]'
atom_codes(Pa,Parses), Parses = list of lists of lists
ERROR: (c :/gfulab/load.pl:4):
atom_chars/2: Type error: `text' expected, found `[[[wordtype=NOUN, head=nectec, sem=[pred=NECTEC, ntype=NPRP, ontology=enterprise]]]]'
atom_codes(Pa,Parses), Parses = list of lists of lists
ERROR: (c:/ gfulab/load.pl:4):
atom_codes/2: Type error: `text' expected, found `[[wordtype=NOUN, head= nectec, sem=[pred=NECTEC, ntype=NPRP, ontology=enterprise]]]'
string_to_list(Pa,P), P = list of lists of lists
string_to_atom(Pa,Parse),
ERROR: (c: /gfulab/load.pl:4):
string_to_list/2: Arguments are not sufficiently instantiated
Please advise me.
Thank you very much
Tawee