Recommender for Relation Labels

99 views
Skip to first unread message

Ira Teh

unread,
Mar 4, 2022, 1:24:29 AM3/4/22
to inception-users
Hi Inception Team,

The recommenders in place really helps my project a ton in terms of speed as it can be trained to recognise several words that are often repeatedly annotated. I was wondering if there was a similar recommender function in the case of relation labels? 

Regards,
Ira

Richard Eckart de Castilho

unread,
Mar 4, 2022, 2:27:05 AM3/4/22
to inception-users
Hi,

> On 4. Mar 2022, at 07:24, Ira Teh <irat...@gmail.com> wrote:
>
> The recommenders in place really helps my project a ton in terms of speed as it can be trained to recognise several words that are often repeatedly annotated. I was wondering if there was a similar recommender function in the case of relation labels?

There is a simple relation recommender, yes. It is not enabled by default at the moment, but
if you add this to your settings.properties in recent versions, you should be able to configure
a relation recommender on simple string features:

recommender.string-matching.relation.enabled=true

Best,

-- Richard

Ira Teh

unread,
Mar 4, 2022, 2:39:07 AM3/4/22
to incepti...@googlegroups.com
Hi Richard,

Sorry, I am very new to this and I do not think I know how to get to the "settings.properties" page. Could you assist me with this?

Cheers,
Ira

--
You received this message because you are subscribed to the Google Groups "inception-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inception-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/inception-users/E7636D29-EE75-4C96-B9C7-06E0813783D6%40gmail.com.

Richard Eckart de Castilho

unread,
Mar 4, 2022, 2:42:31 AM3/4/22
to incepti...@googlegroups.com
Hi Ira,

On 4. Mar 2022, at 08:38, Ira Teh <irat...@gmail.com> wrote:
>
> Sorry, I am very new to this and I do not think I know how to get to the "settings.properties" page. Could you assist me with this?

Please have a look here:

https://zoidberg.ukp.informatik.tu-darmstadt.de/jenkins/view/INCEpTION/job/INCEpTION%20main/de.tudarmstadt.ukp.inception.app$inception-app-webapp/doclinks/1/admin-guide.html#sect_home_folder

I hope you find this documentation useful. If not, it would be great if you could give feedback on what is unclear so we can improve it.

Best,

-- Richard

Ira Teh

unread,
Mar 7, 2022, 1:50:37 AM3/7/22
to incepti...@googlegroups.com
Hi RIchard,

Managed to follow the link you had sent me till the creation of a settings.properties file. However, I am unable to input the "recommender.string-matching.relation.enabled=true" in my command prompt as it returns with 'recommender.string-matching.relation.enabled' is not recognized as an internal or external command,
operable program or batch file. . Pardon me for my lack of knowledge in this aspect, but is this due to the difference in OS? I am currently on Windows command prompt. Looking forward to your reply and thanks for the help!

Cheers,
Ira

--
You received this message because you are subscribed to the Google Groups "inception-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inception-use...@googlegroups.com.

Richard Eckart de Castilho

unread,
Mar 7, 2022, 2:30:26 AM3/7/22
to inception-users
Hi,

> On 7. Mar 2022, at 07:50, Ira Teh <irat...@gmail.com> wrote:
>
> Managed to follow the link you had sent me till the creation of a settings.properties file. However, I am unable to input the "recommender.string-matching.relation.enabled=true" in my command prompt as it returns with 'recommender.string-matching.relation.enabled' is not recognized as an internal or external command,
> operable program or batch file. . Pardon me for my lack of knowledge in this aspect, but is this due to the difference in OS? I am currently on Windows command prompt. Looking forward to your reply and thanks for the help!

You would have to use a text editor to create the `settings.properties` file in the documented location and
then add the line into that file and save it - make sure the editor does not add a (hidden) ".txt" extension
to the file. After that, you would start INCEpTION again.

Alternatively, you can try starting INCEpTION from the command prompt using a line like:

java -Drecommender.string-matching.relation.enabled=true -jar inceptionXXX.jar

replacing "inceptionXXX.jar" with the actual name of the JAR file you are using.

-- Richard

Ira Teh

unread,
Mar 7, 2022, 2:42:55 AM3/7/22
to incepti...@googlegroups.com
Hi Richard,

Managed to add the .txt file into the "settings.properties" folder. Must I do anything in INCEpTION or will it be automatically put in place?

Thanks,
Ira

--
You received this message because you are subscribed to the Google Groups "inception-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inception-use...@googlegroups.com.

Ira Teh

unread,
Mar 7, 2022, 2:47:29 AM3/7/22
to incepti...@googlegroups.com
Hi Richard,

Just wanted to check if I had got all the steps correct. I had created a "srv" folder which can be found in Desktop. In the "srv" folder, there is a subfolder labelled "inception" and in the "inception" subfolder, there is another subfolder called "settings.properties". I then input a .txt file with the above "recommender.string-matching.relation.enabled=true", and had started INCEpTION. Are these the correct steps so far? Thank you so much for your time and patience!

Cheers,
Ira

Jan-Christoph Klie

unread,
Mar 7, 2022, 5:01:31 AM3/7/22
to inception-users
Hi,
the settings.properties is not a directory, but a text file in itself. You are correct in that it should be in your .inception folder. In the settings.properties file, you need to put the 

    recommender.string-matching.relation.enabled=true

and then restart INCEpTION. For me, the folder is .inception (with a dot) by default. If you have issues creating the proper settings file, then it might be easier to start INCEpTION with 

    java -Drecommender.string-matching.relation.enabled=true -jar inceptionXXX.jar

replacing "inceptionXXX.jar" with the actual name of the JAR file you are using.

Best,

Jan

Screenshot 2022-03-07 105725.png

Ira Teh

unread,
Mar 7, 2022, 8:47:34 AM3/7/22
to inception-users
Hi,

Thanks for the help! Just wanted to check, once I am done with adding the "settings.properties" text file with the above code, do I need to do anything in INCEpTION to get this recommender up and running? 

Cheers,
Ira

Ira Teh

unread,
Mar 7, 2022, 8:58:21 AM3/7/22
to inception-users
Is this correct?
Screenshot (14).png

Ira Teh

unread,
Mar 8, 2022, 3:11:39 AM3/8/22
to inception-users
Hi Richard,

Looking forward to your response. Once again sorry for all the inconvenience caused.

Cheers, 
Ira

Richard Eckart de Castilho

unread,
Mar 8, 2022, 3:21:34 AM3/8/22
to inception-users
Looks reasonable. If you start INCEpTION now and select a string feature
of a relation layer, do you see the option to choose a "String Matcher for relations"?

Mind that the relation layer must be set to not allow any type of stacking.

Best,

-- Richard

> On 8. Mar 2022, at 09:11, Ira Teh <irat...@gmail.com> wrote:
>
> Hi Richard,
>
Message has been deleted

Ira Teh

unread,
Mar 8, 2022, 4:20:44 AM3/8/22
to incepti...@googlegroups.com
Hi Richard

I finally managed to get it. Thank you so much for your patience and help! Have a good day ahead

Cheers,
Ira

--
You received this message because you are subscribed to the Google Groups "inception-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to inception-use...@googlegroups.com.

Ira Teh

unread,
Mar 21, 2022, 10:17:22 PM3/21/22
to inception-users
Hi Richard,

I wanted to check if the basic relation recommender was only available for projects that are created through the "Basic Annotation (span/relation)" settings? Or could it be done to projects created under the usual "Create New project" button? Thanks!

Ira Teh

unread,
Mar 24, 2022, 12:09:02 AM3/24/22
to inception-users
Hi Richard/INCEpTION team, 

Sorry to trouble, but are the basic relation recommenders available for projects that are created under "Create new project" or only projects that are created under "Basic Annotation (span/relation)"?

Richard Eckart de Castilho

unread,
Mar 24, 2022, 1:51:13 AM3/24/22
to inception-users
Hi,

> On 22. Mar 2022, at 03:17, Ira Teh <irat...@gmail.com> wrote:
>
> I wanted to check if the basic relation recommender was only available for projects that are created through the "Basic Annotation (span/relation)" settings? Or could it be done to projects created under the usual "Create New project" button? Thanks!

Yes, it works in other projects as long as the relation layers/features meet the requirements for the recommender:

* relation layer must not allow stacking
* predicted feature must be a string or a concept feature

-- Richard

Ira Teh

unread,
Mar 27, 2022, 9:36:20 AM3/27/22
to inception-users
Hi Richard and INCEpTION team,

Thanks for the advice! Managed to get it to run on other projects. However, I was wondering if there was a way to control the number of recommendations that were generated? We tried to limit it by putting "1" for max recommendations but it still seemed to recommend tons of relations, making the original document very hard to read. I have attached a screenshot for your reference. Please advice and I am looking forward to your favourable reply.

Cheers,
Ira
WhatsApp Image 2022-03-27 at 9.21.26 PM.jpeg

Richard Eckart de Castilho

unread,
Mar 27, 2022, 4:08:56 PM3/27/22
to inception-users
Hi Ira,

> On 27. Mar 2022, at 15:36, Ira Teh <irat...@gmail.com> wrote:
>
> Thanks for the advice! Managed to get it to run on other projects. However, I was wondering if there was a way to control the number of recommendations that were generated? We tried to limit it by putting "1" for max recommendations but it still seemed to recommend tons of relations, making the original document very hard to read. I have attached a screenshot for your reference. Please advice and I am looking forward to your favourable reply.

the string matching relation recommender should generate a suggestion between two spans X and Y that occur within a sentence if it has seen such a relation already before. I am somewhat surprised that this generates so many relation suggestions for you.

It seems like you are using only a single span and a single relation layer. Maybe for your case it would make more sense to use multiple span/relation layers? Mind though that there can only be one relation layer per span layer and that relation layers not go between different span layers either. It's hard to see much in the screenshot, so I cannot really provide any immediate ideas for an efficient layer design.

Cheers,

-- Richard

Richard Eckart de Castilho

unread,
Mar 27, 2022, 4:17:40 PM3/27/22
to inception-users
On 27. Mar 2022, at 22:08, Richard Eckart de Castilho <richard...@gmail.com> wrote:
>
> It seems like you are using only a single span and a single relation layer. Maybe for your case it would make more sense to use multiple span/relation layers? Mind though that there can only be one relation layer per span layer and that relation layers not go between different span layers either. It's hard to see much in the screenshot, so I cannot really provide any immediate ideas for an efficient layer design.

I also think there are some things which the string matching relation recommender simply won't go well with. For example, you if you have "10" and "cm" you annotate "10" as a value an "cm" as unit and then link them to each other using a relation. That means if you have multiple "cm" in a sentence, you would easily get one relation suggestion for each. If you then also have multiple numbers in the sentence, you'd get even more...

Cheers,

-- Richard
Reply all
Reply to author
Forward
0 new messages