You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stanbol.apache.org by florent andré <fl...@4sengines.com> on 2011/07/18 23:09:32 UTC

How to "encode" email, ISBN, tel number,... in Stanbol ?

Hi !

I worked on the UIMA engine to make it more generic.
It's now easy to add uima annotator, and I try the RegexAnnotator [1].

Depending on the configured regex, this annotator can output email, isbn,...

AFAIK there is for now just TextAnnotation and EntityAnnotation type, 
and I don't know if they are suitable for things like email, telephone 
number,...

Thanks
++


[1] http://uima.apache.org/sandbox.html#regex.annotator

Re: How to "encode" email, ISBN, tel number,... in Stanbol ?

Posted by Reto Bachmann-Gmür <me...@farewellutopia.com>.
I prefer the second variant too, but we might want to use mailto, tel
and urn:isbn uris instead of Literals.

Cheers,
Reto

On Mon, Jul 18, 2011 at 11:30 PM, Rupert Westenthaler
<ru...@gmail.com> wrote:
> Hi Florent
>
> On Mon, Jul 18, 2011 at 11:09 PM, florent andré
> <fl...@4sengines.com> wrote:
>> Hi !
>>
>> I worked on the UIMA engine to make it more generic.
>> It's now easy to add uima annotator, and I try the RegexAnnotator [1].
>>
>> Depending on the configured regex, this annotator can output email, isbn,...
>>
>> AFAIK there is for now just TextAnnotation and EntityAnnotation type, and I
>> don't know if they are suitable for things like email, telephone number,...
>>
> I see several possibilities:
>
> 1) use a TextAnnotation with a custom value for dc:type
>
> urn:123 rdf:type TextAnnotation
> urn:123 dc:type <http://www.w3.org/2006/vcard/ns#Cell>
> urn:123 selected-text "+43 655 290989"
> urn:123 start "123"^^xsd:int
> urn:123 end "137"^^xsd:int
>
> I used here the concepts defined for CellPhones by the vCard ontology
>
> 2) use a TextAnnotation with an additional type
>
> urn:123 rdf:type TextAnnotation
> urn:123 rdf:type http://schema.org/ContactPoint
> urn:123 selected-text "+43 655 290989"
> urn:123 start "123"^^xsd:int
> urn:123 end "137"^^xsd:int
> urn:123 http://schema.org/telephone "+43655290989"
>
> Here I used the ContactPoint as defined by schema.org
>
> As I am writing this I have a preference for variant (2). Any other
> opinions, suggestions?
>
> In any case based on such Annotations an other Engine could lookup
> persons/organizations based on recognized telephone numbers and create
> according EntityAnnotations.
>
> The same principle would also work for ISBN numbers.
>
> best
> Rupert Westenthaler
>
>>
>> [1] http://uima.apache.org/sandbox.html#regex.annotator
>>
>
>
>
> --
> | Rupert Westenthaler             rupert.westenthaler@gmail.com
> | Bodenlehenstraße 11                             ++43-699-11108907
> | A-5500 Bischofshofen
>

Re: How to "encode" email, ISBN, tel number,... in Stanbol ?

Posted by Enrico Daga <en...@gmail.com>.
On 19 July 2011 11:14, Olivier Grisel <ol...@ensta.org> wrote:
> 2011/7/18 Rupert Westenthaler <ru...@gmail.com>:
>> Hi Florent
>>
>> On Mon, Jul 18, 2011 at 11:09 PM, florent andré
>> <fl...@4sengines.com> wrote:
>>> Hi !
>>>
>>> I worked on the UIMA engine to make it more generic.
>>> It's now easy to add uima annotator, and I try the RegexAnnotator [1].
>>>
>>> Depending on the configured regex, this annotator can output email, isbn,...
>>>
>>> AFAIK there is for now just TextAnnotation and EntityAnnotation type, and I
>>> don't know if they are suitable for things like email, telephone number,...
>>>
>> I see several possibilities:
>>
>> 1) use a TextAnnotation with a custom value for dc:type
>>
>> urn:123 rdf:type TextAnnotation
>> urn:123 dc:type <http://www.w3.org/2006/vcard/ns#Cell>
>> urn:123 selected-text "+43 655 290989"
>> urn:123 start "123"^^xsd:int
>> urn:123 end "137"^^xsd:int
>>
>> I used here the concepts defined for CellPhones by the vCard ontology
>>
>> 2) use a TextAnnotation with an additional type
>>
>> urn:123 rdf:type TextAnnotation
>> urn:123 rdf:type http://schema.org/ContactPoint
>> urn:123 selected-text "+43 655 290989"
>> urn:123 start "123"^^xsd:int
>> urn:123 end "137"^^xsd:int
>> urn:123 http://schema.org/telephone "+43655290989"
>>
>> Here I used the ContactPoint as defined by schema.org
>>
>> As I am writing this I have a preference for variant (2). Any other
>> opinions, suggestions?
>
> urn:123 should not have both types at the same time: it's not true
> that the annotation is the ContactPoint.
+1
>
> I would rather use:
>
> urn:123 rdf:type TextAnnotation
> urn:123 selected-text "+43 655 290989"
> urn:123 start "123"^^xsd:int
> urn:123 end "137"^^xsd:int
> urn:123 dc:related urn:456
>
> urn:456 rdf:type http://schema.org/ContactPoint
> urn:456 http://schema.org/telephone "+43655290989"
>
>
> In the future, we should define a dedicated property to replace
> dc:related so as to express:
>
> urn:456 "is a suggested semantic interpretation of the 'stuff'
> referenced by the text annotation" urn:123.
>
> There might be several possible interpretation with confidence various
> confidence score in case of ambiguity.
+1
>
> --
> Olivier
> http://twitter.com/ogrisel - http://github.com/ogrisel
>



-- 
Enrico Daga

--
http://www.enridaga.net
skype: enri-pan

Re: How to "encode" email, ISBN, tel number,... in Stanbol ?

Posted by Olivier Grisel <ol...@ensta.org>.
2011/7/19 Florent André <fl...@apache.org>:
>
> Couldn't be better to have this ?
>> urn:123 rdf:type TextAnnotation
>> urn:123 selected-text "+43 655 290989"
>> urn:123 start "123"^^xsd:int
>> urn:123 end "137"^^xsd:int
>>
>> urn:456 rdf:type http://schema.org/ContactPoint
>> urn:456 http://schema.org/telephone "+43655290989"
>> urn:456 dc:related urn:123

Yes better be consistent with the existing model.

> AFAIK this is the "direction" used in EntityAnnotation.
>
> Another point, just to be sure, you mean dc:relation and not dc:related
> right ?

Yes.

-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

Re: How to "encode" email, ISBN, tel number,... in Stanbol ?

Posted by Florent André <fl...@apache.org>.
Thanks for your inputs !

So I will use this kind of schema :

 > urn:123 rdf:type TextAnnotation
 > urn:123 selected-text "+43 655 290989"
 > urn:123 start "123"^^xsd:int
 > urn:123 end "137"^^xsd:int
 > urn:123 dc:related urn:456
 >
 > urn:456 rdf:type http://schema.org/ContactPoint
 > urn:456 http://schema.org/telephone "+43655290989"

I have a question about the "direction" of the dc:related and the 
expression of
"> urn:456 "is a suggested semantic interpretation of the 'stuff'
 > referenced by the text annotation" urn:123."

Couldn't be better to have this ?
 > urn:123 rdf:type TextAnnotation
 > urn:123 selected-text "+43 655 290989"
 > urn:123 start "123"^^xsd:int
 > urn:123 end "137"^^xsd:int
 >
 > urn:456 rdf:type http://schema.org/ContactPoint
 > urn:456 http://schema.org/telephone "+43655290989"
 > urn:456 dc:related urn:123

AFAIK this is the "direction" used in EntityAnnotation.

Another point, just to be sure, you mean dc:relation and not dc:related 
right ?

Will go to play a little bit to get that ! :)
Thanks.





On 07/19/2011 11:14 AM, Olivier Grisel wrote:
> 2011/7/18 Rupert Westenthaler<ru...@gmail.com>:
>> Hi Florent
>>
>> On Mon, Jul 18, 2011 at 11:09 PM, florent andré
>> <fl...@4sengines.com>  wrote:
>>> Hi !
>>>
>>> I worked on the UIMA engine to make it more generic.
>>> It's now easy to add uima annotator, and I try the RegexAnnotator [1].
>>>
>>> Depending on the configured regex, this annotator can output email, isbn,...
>>>
>>> AFAIK there is for now just TextAnnotation and EntityAnnotation type, and I
>>> don't know if they are suitable for things like email, telephone number,...
>>>
>> I see several possibilities:
>>
>> 1) use a TextAnnotation with a custom value for dc:type
>>
>> urn:123 rdf:type TextAnnotation
>> urn:123 dc:type<http://www.w3.org/2006/vcard/ns#Cell>
>> urn:123 selected-text "+43 655 290989"
>> urn:123 start "123"^^xsd:int
>> urn:123 end "137"^^xsd:int
>>
>> I used here the concepts defined for CellPhones by the vCard ontology
>>
>> 2) use a TextAnnotation with an additional type
>>
>> urn:123 rdf:type TextAnnotation
>> urn:123 rdf:type http://schema.org/ContactPoint
>> urn:123 selected-text "+43 655 290989"
>> urn:123 start "123"^^xsd:int
>> urn:123 end "137"^^xsd:int
>> urn:123 http://schema.org/telephone "+43655290989"
>>
>> Here I used the ContactPoint as defined by schema.org
>>
>> As I am writing this I have a preference for variant (2). Any other
>> opinions, suggestions?
>
> urn:123 should not have both types at the same time: it's not true
> that the annotation is the ContactPoint.
>
> I would rather use:
>
> urn:123 rdf:type TextAnnotation
> urn:123 selected-text "+43 655 290989"
> urn:123 start "123"^^xsd:int
> urn:123 end "137"^^xsd:int
> urn:123 dc:related urn:456
>
> urn:456 rdf:type http://schema.org/ContactPoint
> urn:456 http://schema.org/telephone "+43655290989"
>
>
> In the future, we should define a dedicated property to replace
> dc:related so as to express:
>
> urn:456 "is a suggested semantic interpretation of the 'stuff'
> referenced by the text annotation" urn:123.
>
> There might be several possible interpretation with confidence various
> confidence score in case of ambiguity.
>

Re: How to "encode" email, ISBN, tel number,... in Stanbol ?

Posted by Olivier Grisel <ol...@ensta.org>.
2011/7/18 Rupert Westenthaler <ru...@gmail.com>:
> Hi Florent
>
> On Mon, Jul 18, 2011 at 11:09 PM, florent andré
> <fl...@4sengines.com> wrote:
>> Hi !
>>
>> I worked on the UIMA engine to make it more generic.
>> It's now easy to add uima annotator, and I try the RegexAnnotator [1].
>>
>> Depending on the configured regex, this annotator can output email, isbn,...
>>
>> AFAIK there is for now just TextAnnotation and EntityAnnotation type, and I
>> don't know if they are suitable for things like email, telephone number,...
>>
> I see several possibilities:
>
> 1) use a TextAnnotation with a custom value for dc:type
>
> urn:123 rdf:type TextAnnotation
> urn:123 dc:type <http://www.w3.org/2006/vcard/ns#Cell>
> urn:123 selected-text "+43 655 290989"
> urn:123 start "123"^^xsd:int
> urn:123 end "137"^^xsd:int
>
> I used here the concepts defined for CellPhones by the vCard ontology
>
> 2) use a TextAnnotation with an additional type
>
> urn:123 rdf:type TextAnnotation
> urn:123 rdf:type http://schema.org/ContactPoint
> urn:123 selected-text "+43 655 290989"
> urn:123 start "123"^^xsd:int
> urn:123 end "137"^^xsd:int
> urn:123 http://schema.org/telephone "+43655290989"
>
> Here I used the ContactPoint as defined by schema.org
>
> As I am writing this I have a preference for variant (2). Any other
> opinions, suggestions?

urn:123 should not have both types at the same time: it's not true
that the annotation is the ContactPoint.

I would rather use:

urn:123 rdf:type TextAnnotation
urn:123 selected-text "+43 655 290989"
urn:123 start "123"^^xsd:int
urn:123 end "137"^^xsd:int
urn:123 dc:related urn:456

urn:456 rdf:type http://schema.org/ContactPoint
urn:456 http://schema.org/telephone "+43655290989"


In the future, we should define a dedicated property to replace
dc:related so as to express:

urn:456 "is a suggested semantic interpretation of the 'stuff'
referenced by the text annotation" urn:123.

There might be several possible interpretation with confidence various
confidence score in case of ambiguity.

-- 
Olivier
http://twitter.com/ogrisel - http://github.com/ogrisel

Re: How to "encode" email, ISBN, tel number,... in Stanbol ?

Posted by Rupert Westenthaler <ru...@gmail.com>.
Hi Florent

On Mon, Jul 18, 2011 at 11:09 PM, florent andré
<fl...@4sengines.com> wrote:
> Hi !
>
> I worked on the UIMA engine to make it more generic.
> It's now easy to add uima annotator, and I try the RegexAnnotator [1].
>
> Depending on the configured regex, this annotator can output email, isbn,...
>
> AFAIK there is for now just TextAnnotation and EntityAnnotation type, and I
> don't know if they are suitable for things like email, telephone number,...
>
I see several possibilities:

1) use a TextAnnotation with a custom value for dc:type

urn:123 rdf:type TextAnnotation
urn:123 dc:type <http://www.w3.org/2006/vcard/ns#Cell>
urn:123 selected-text "+43 655 290989"
urn:123 start "123"^^xsd:int
urn:123 end "137"^^xsd:int

I used here the concepts defined for CellPhones by the vCard ontology

2) use a TextAnnotation with an additional type

urn:123 rdf:type TextAnnotation
urn:123 rdf:type http://schema.org/ContactPoint
urn:123 selected-text "+43 655 290989"
urn:123 start "123"^^xsd:int
urn:123 end "137"^^xsd:int
urn:123 http://schema.org/telephone "+43655290989"

Here I used the ContactPoint as defined by schema.org

As I am writing this I have a preference for variant (2). Any other
opinions, suggestions?

In any case based on such Annotations an other Engine could lookup
persons/organizations based on recognized telephone numbers and create
according EntityAnnotations.

The same principle would also work for ISBN numbers.

best
Rupert Westenthaler

>
> [1] http://uima.apache.org/sandbox.html#regex.annotator
>



-- 
| Rupert Westenthaler             rupert.westenthaler@gmail.com
| Bodenlehenstraße 11                             ++43-699-11108907
| A-5500 Bischofshofen