vacancy / SceneGraphParser

A python toolkit for parsing captions (in natural language) into scene graphs (as symbolic representations).
MIT License
555 stars 56 forks source link

ModuleNotFoundError: No module named 'sng_parser' #10

Closed skasai5296 closed 5 years ago

skasai5296 commented 5 years ago

Hi @vacancy,

I tried to use this parser to duplicate results from your CVPR 2019 paper, but couldn't import from out of this repo's directory. Is there a way I can?

error details are as follows:

from SceneGraphParser import sng_parser graph = sng_parser.parse("some random sentence")

File "ScenegraphParser/sng_parser/backends/spacy_parser.py", line 12, in import sng_parser.database as database ModuleNotFoundError: No module named 'sng_parser'

it works perfectly good inside the repo.

skasai5296 commented 5 years ago

I made a workaround by editing sng_parser/backends/spacy_parser.py before:

import sng_parser.database as database
from sng_parser.parser import Parser

after:

from .. import database
from ..parser import Parser