Text mining and content categorization

xpath in SAS Content Categorizer

Reply
New Contributor
Posts: 4

xpath in SAS Content Categorizer

Hi.

In categorizer rules, we can query by XML elements (_Title:"sample") and attributes within specified elements (_Occurrence\Id="sample":1), but not by xpath.  Since our XML schema reuses certain common element names and attributes in multiple locations, specifying the full xpath is essential for many of our queries.  Does anyone know whether xpath search is available in newer versions?  We are using a very old version of Content Categorizer (actually tk240). 

Thanks.

Heather.

SAS Employee
Posts: 5

Re: xpath in SAS Content Categorizer

Hi Heather,

Yes, Enterprise Content Categorization now supports XPath functionality.  So if you have, say, an xml document that looks like:

...

<article>

<body>         Here is where we talk about Bill Nye.   </body>

<body>         Here is another part of the body where we talk about Bill Cosby.   </body>

<title>Title</title>

</article>

Then there are multiple body elements.  Let's say you want to match the name 'Bill' - but only in the second body element.  Then we can use a rule of the form:

(OR, _/article/body[2]:"_c{Bill}")

which will not match Bill Nye but will match Bill Cosby.

Hope this helps.

Ask a Question
Discussion stats
  • 1 reply
  • 378 views
  • 3 likes
  • 2 in conversation