Closed nickvosk closed 6 years ago
I faced something similar a while ago. I think the code generates lowercase SFs on the basis of your input file. So if everything is lowercase, the .min() method returns an exception. I'm not sure whether we should add this to the docs, or write more defensive code. I'm in favour for the second, but @dav009 might disagree.
Hello @nickvosk Are you trying to edit a Model for Spotlight 0.6 or Spotlight 0.7 ?
Hey @dav009. I'm trying to edit a Spotlight 0.7 model.
Just want to make sure you were using this branch:
https://github.com/idio/spotlight-model-editor/tree/feature/code-clean-up-0-7
As master works with 0.6 models
fyi, I think this might be present in the 0.6
code too.
can you share a file generating this error?
@nickvosk @tgalery :) It would be great if you could share some of the samples that generated this issue
hey, sorry for the delay @dav009 . two example lines :
1stdibs 1stdibs alibaba|beauti|object|earth|pham|dealer|furnitur|compani|karp|index|ross|angel|offer|fine|stdib|els|spark|bring|found|lead|laurenc|adam|startup|avail|richard|forcion|watch|sv|passion|commerc|york|websit|jewelri|cristina|special|david|amp|carmin|flea|inventori|exclus|rosenblatt|rare|unit|collect|ventur|bruno|benchmark|miller|capit|onlin|michael|pari|desir|paul|art|market|world|share|sourc|marketplac 1|1|1|1|1|1|1|1|1|1|1|1|1|1|2|1|1|2|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|2|1|1|1|2|1|1|1|1|1|1|2|1|1|1
navabi navabi retail|look|boutiqu|edg|media|compani|season|custom|index|www|unpreced|offer|via|dumont|plus|design|access|label|germani|recommend|editori|seventur|video|startup|bauer|product|strive|commerc|savvi|websit|european|style|tv|malin|week|aachen|present|collect|ventur|partner|size|fashion|express|posern|onlin|updat|page|worldwid|cut|navabi|deliveri|premier|featur|uniqu|world 2|1|1|1|1|1|1|1|1|1|1|1|1|1|3|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|3|1|1|2|1|1|1|2|1|3|4|1|1|2|1|1|1|1|3|1|1|1|1|1
@nickvosk thanks! :) This exceptions occurs because I made a quite obscure assumption. Given the way in which the Stores are associated I assume there is at least one Surface form in the provided list that will contain one upper case letter. That surface form is used to attach the lowercase surface forms as candidates.
so if you add at least a upper case surface form, the exception should not take place:
1stdibs 1stdibs|1Stdibs alibaba|beauti|object|earth|pham|dealer|furnitur|compani|karp|index|ross|angel|offer|fine|stdib|els|spark|bring|found|lead|laurenc|adam|startup|avail|richard|forcion|watch|sv|passion|commerc|york|websit|jewelri|cristina|special|david|amp|carmin|flea|inventori|exclus|rosenblatt|rare|unit|collect|ventur|bruno|benchmark|miller|capit|onlin|michael|pari|desir|paul|art|market|world|share|sourc|marketplac 1|1|1|1|1|1|1|1|1|1|1|1|1|1|2|1|1|2|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|2|1|1|1|2|1|1|1|1|1|1|2|1|1|1
navabi navabi|Navabi retail|look|boutiqu|edg|media|compani|season|custom|index|www|unpreced|offer|via|dumont|plus|design|access|label|germani|recommend|editori|seventur|video|startup|bauer|product|strive|commerc|savvi|websit|european|style|tv|malin|week|aachen|present|collect|ventur|partner|size|fashion|express|posern|onlin|updat|page|worldwid|cut|navabi|deliveri|premier|featur|uniqu|world 2|1|1|1|1|1|1|1|1|1|1|1|1|1|3|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|3|1|1|2|1|1|1|2|1|3|4|1|1|2|1|1|1|1|3|1|1|1|1|1
True dat, but should we not be more defensive in handling this ?
On Wed, Apr 15, 2015 at 3:30 PM, David Przybilla notifications@github.com wrote:
so if you add at least a upper case surface form, the exception should not take place:
1stdibs 1stdibs|1Stdibs alibaba|beauti|object|earth|pham|dealer|furnitur|compani|karp|index|ross|angel|offer|fine|stdib|els|spark|bring|found|lead|laurenc|adam|startup|avail|richard|forcion|watch|sv|passion|commerc|york|websit|jewelri|cristina|special|david|amp|carmin|flea|inventori|exclus|rosenblatt|rare|unit|collect|ventur|bruno|benchmark|miller|capit|onlin|michael|pari|desir|paul|art|market|world|share|sourc|marketplac 1|1|1|1|1|1|1|1|1|1|1|1|1|1|2|1|1|2|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|2|1|1|1|2|1|1|1|1|1|1|2|1|1|1 navabi navabi|Navabi retail|look|boutiqu|edg|media|compani|season|custom|index|www|unpreced|offer|via|dumont|plus|design|access|label|germani|recommend|editori|seventur|video|startup|bauer|product|strive|commerc|savvi|websit|european|style|tv|malin|week|aachen|present|collect|ventur|partner|size|fashion|express|posern|onlin|updat|page|worldwid|cut|navabi|deliveri|premier|featur|uniqu|world 2|1|1|1|1|1|1|1|1|1|1|1|1|1|3|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|1|3|1|1|2|1|1|1|2|1|3|4|1|1|2|1|1|1|1|3|1|1|1|1|1
— Reply to this email directly or view it on GitHub https://github.com/idio/spotlight-model-editor/issues/10#issuecomment-93523246 .
yeah, we should. mm so in case none upper case surface form is added, I will create an artificial one with its first letter in uppercase and add it to the main store?
Maybe it should be based on the title of the dbpedia resource as opposed to arbitrarily ? Or else we should generate uppercase variants of all the lowecase ones. Any thoughts ?
On Wed, Apr 15, 2015 at 3:36 PM, David Przybilla notifications@github.com wrote:
yeah, we should. mm so in case none upper case surface form is added, I will create an artificial one with its first letter in uppercase and add it to the main store?
— Reply to this email directly or view it on GitHub https://github.com/idio/spotlight-model-editor/issues/10#issuecomment-93525082 .
I would go for generating an upper case one based on the dbpedia resource Id.
Closing as part of archiving process.
I am trying to add new entities using the command:
sh target/bin/model-editor file-update all path/to/en/model path_to_file/with/model/changes
At some point I get some warnings :
The procedure fails with the following exception :
Any idea why this happens? Does the exception have to do with the warnings about the SFs?
Thanks.