# Named entities from RDF

**URL:** <https://community.stardog.com/t/named-entities-from-rdf/1394>\
**Category:** Support\
**Created:** [November 19, 2018, 8:22am UTC](https://community.stardog.com/t/named-entities-from-rdf/1394 "2018-11-19T08:22:40Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![qimby](https://avatars.discourse-cdn.com/v4/letter/q/74df32/32.png) [@qimby](https://community.stardog.com/u/qimby)\
**Post date:** [November 19, 2018, 8:22am UTC](https://community.stardog.com/t/named-entities-from-rdf/1394/1 "2018-11-19T08:22:40Z")

</div>

Hi there.

I want to send RDF file to custom extractor, extract the necessary values from it and send to model to search for the named entities. But problem is that text of file in extractor comes only text without XML tags.  
How to get full text of the RDF file in my custom extractor?  
Thank. sorry for my language.

---

<div class="post-metadata">

**Author:** ![qimby](https://avatars.discourse-cdn.com/v4/letter/q/74df32/32.png) [@qimby](https://community.stardog.com/u/qimby)\
**Post date:** [November 19, 2018, 8:59am UTC](https://community.stardog.com/t/named-entities-from-rdf/1394/2 "2018-11-19T08:59:35Z")

</div>

Maybe need to use some parameter in the command to send the file?  
I use this command  
stardog doc put --rdf-extractors MyExtractor myDB\_NLP File.xml

---

<div class="post-metadata">

**Author:** ![qimby](https://avatars.discourse-cdn.com/v4/letter/q/74df32/32.png) [@qimby](https://community.stardog.com/u/qimby)\
**Post date:** [November 19, 2018, 9:20am UTC](https://community.stardog.com/t/named-entities-from-rdf/1394/3 "2018-11-19T09:20:42Z")

</div>

Custom extractor extends the class AbstractEntityRDFExtractor.  
May need to extends another class?

---

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [November 19, 2018, 11:38am UTC](https://community.stardog.com/t/named-entities-from-rdf/1394/4 "2018-11-19T11:38:20Z")

</div>

Try extending TextProvidingRDFExtractor

---

<div class="post-metadata">

**Author:** ![qimby](https://avatars.discourse-cdn.com/v4/letter/q/74df32/32.png) [@qimby](https://community.stardog.com/u/qimby)\
**Post date:** [November 19, 2018, 1:30pm UTC](https://community.stardog.com/t/named-entities-from-rdf/1394/5 "2018-11-19T13:30:32Z")

</div>

Did not help. Result is the same.

---

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [November 19, 2018, 2:03pm UTC](https://community.stardog.com/t/named-entities-from-rdf/1394/6 "2018-11-19T14:03:49Z")

</div>

Sorry I missed that you wanted the raw document contents and not the extracted text. I'm not sure if or how that could be done but it's a good question. Someone else will have to jump in here.

---

<div class="post-metadata">

**Author:** ![zachary.whitley](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.stardog.com/zachary.whitley/32/94_2.png) [@zachary.whitley](https://community.stardog.com/u/zachary.whitley)\
**Post date:** [November 19, 2018, 2:22pm UTC](https://community.stardog.com/t/named-entities-from-rdf/1394/7 "2018-11-19T14:22:58Z")

</div>

I _think_ you just need to write a custom extractor implementing RDFExtractor and you can access the document from the Path argument to the extract method.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/stardog/original/2X/e/ed66b48a616f505106a4acde3c9cee7e6da9bc67.svg) [@system](https://community.stardog.com/u/system)\
**Post date:** [December 3, 2018, 2:23pm UTC](https://community.stardog.com/t/named-entities-from-rdf/1394/8 "2018-12-03T14:23:01Z")

</div>

Closed on December 3, 2018, 2:23pm UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
