Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug while running tilde on other data #1

Open
SaraAlthubaiti opened this issue Oct 8, 2019 · 1 comment
Open

bug while running tilde on other data #1

SaraAlthubaiti opened this issue Oct 8, 2019 · 1 comment

Comments

@SaraAlthubaiti
Copy link

SaraAlthubaiti commented Oct 8, 2019

Hi Jonas,

Thanks for sharing your nice work.

I'm running tilde on my own data, I got a weird bug in which I cannot specify what's exactly the problem; here we are:

Traceback (most recent call last):
  File "devmain.py", line 10, in <module>
    main()
  File "devmain.py", line 6, in main
    real_main.main(argv)
  File "/Users/sarawasl/Documents/tilde/mai_version/main.py", line 157, in main
    run_program(program_settings)
  File "/Users/sarawasl/Documents/tilde/mai_version/main.py", line 133, in run_program
    fname_background_knowledge, filter_out_unlabeled_examples=False)
  File "/Users/sarawasl/Documents/tilde/mai_version/run/program_phase.py", line 37, in preprocessing_examples_keys
    prediction_goal)  # type: BackgroundKnowledgeWrapper
  File "/Users/sarawasl/Documents/tilde/mai_version/IO/parsing_background_knowledge.py", line 66, in parse_background_knowledge_keys
    for prolog_statement in logic_program:
  File "/anaconda3/lib/python3.7/site-packages/problog/program.py", line 249, in __iter__
    return iter(self._program())
  File "/anaconda3/lib/python3.7/site-packages/problog/program.py", line 234, in _program
    self.__program = self.parser.parseString(self.__string)
  File "/anaconda3/lib/python3.7/site-packages/problog/parser.py", line 765, in parseString
    self._tokenize(string))))
  File "/anaconda3/lib/python3.7/site-packages/problog/parser.py", line 829, in mapl
    return list(map(f, l))
  File "/anaconda3/lib/python3.7/site-packages/problog/parser.py", line 763, in <lambda>
    return self.factory.build_program(mapl(lambda x: self._parse_statement(string, x),
  File "/anaconda3/lib/python3.7/site-packages/problog/parser.py", line 760, in _parse_statement
    return self.collapse(string, tokens)
  File "/anaconda3/lib/python3.7/site-packages/problog/parser.py", line 795, in collapse
    current_expr.parse(self)
  File "/anaconda3/lib/python3.7/site-packages/problog/parser.py", line 866, in parse
    self.label_tokens(parser)
  File "/anaconda3/lib/python3.7/site-packages/problog/parser.py", line 883, in label_tokens
    parser.label_tokens(self.string, self.tokens)
  File "/anaconda3/lib/python3.7/site-packages/problog/parser.py", line 735, in label_tokens
    raise ParseError(string, 'Expected binary operator', t.location)
problog.parser.ParseError: Expected binary operator at 5439:20.

As I understand, it seems that something wrong in my .bg file and prolog not able to parse it (I think so)

My .bg file contains something like:

subClassOf(HP:0010131, HP:0010126).
hasEntity(FYPO:0000004,CL:0000521).
hasQuality(FYPO:0000921,PATO:0000912).

Could you please help me with that?

@IliasTzagkarakis
Copy link

Hello all!

I have the same issue here..
Did you manage to solve this somehow?

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants