Query results include "#001" and "#002" appended to titles; how to remove?

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Query results include "#001" and "#002" appended to titles; how to remove?

Rachel M. Garrett
Greetings,

 

In my SMW-based glossary, I allow pages to contain more than one Definition.

 

The problem is that when I run #ask queries whose results include a
definition, the terms come back with #001, #002, etc. appended to them. Even
when there is a single definition included on a page, it comes back as
Word#001.

 

In this example, I want to show all definitions that came from a particular
ASABE standard.

 

{{#ask:

    [[Source::ANSI/ASABE S588 July 2012]]

    |mainlabel=Term

    |?Definition

}}

 

Gives me back:

 


Term

 <http://agglossary-demo.referata.com/wiki/Property:Definition> Definition


 <http://agglossary-demo.referata.com/wiki/Abatement#001> Abatement#001

Controlling emissions.


 <http://agglossary-demo.referata.com/wiki/Abatement#002> Abatement#002

Controlling emissions.


 <http://agglossary-demo.referata.com/wiki/Adverse_health_effect#001>
Adverse health effect#001

A health effect from exposure to air contaminants that may range from
relatively mild temporary conditions (such as eye or throat irritation,
shortness of breath, or headaches) to permanent and serious conditions (such
as birth defects, cancer or damage to lungs, nerves, liver, heart, or other
organs).


 <http://agglossary-demo.referata.com/wiki/Aerobic#001> Aerobic#001

In the presence of oxygen.


 
<http://agglossary-demo.referata.com/wiki/Aerodynamic_equivalent_diameter_(A
ED)#001> Aerodynamic equivalent diameter (AED)#001

The diameter of a unit density sphere (i.e. 1.00 g/cm3) that would have the
same settling velocity as the particle or aerosol in question.


 <http://agglossary-demo.referata.com/wiki/Agricultural_burning#001>
Agricultural burning#001

The intentional use of fire for vegetation management in areas such as
agricultural fields, orchards, rangelands, and forestlands.

 

The #002 is going to go away once I get all duplicate definitions removed
(per an earlier post). But how do I suppress the #001?

 

Best regards,

 

Rachel Garrett

 

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Query results include "#001" and "#002" appended to titles; how to remove?

Rachel M. Garrett
Greetings,

 

Forgive me for asking this again, but I still haven't been able to figure it
out. The first time I sent this in, I neglected to strip out the formatting
and make it readable in plain text.

 

In my SMW-based glossary, I allow pages to contain more than one Definition.

 

The problem is that when I run #ask queries whose results include a
definition, the terms come back with #001, #002, etc. appended to the page
titles. Even when there is a single definition included on a page, it comes
back as Word#001.

 

In this example, I want to show all definitions that came from a particular
ASABE standard.

 

{{#ask:

    [[Source::ANSI/ASABE S588 July 2012]]

    |mainlabel=Term

    |?Definition

}}

 

Gives me back:

Term
Definition

Abatement#001                                               Controlling
emissions.

Abatement#002                                               Controlling
emissions.

Adverse health effect#001                           A health effect from
exposure to air contaminants.

 

.. And so on.

 

The "#002" is going to go away once I get all duplicate definitions removed
(per an earlier post). But how do I suppress the "#001"?

 

I tried adding "|?Title" to the query, in the hopes that this would force it
to return just the page title as a result. But it just created a third
column, "Title," with no results in it.

 

Is there something else I should be asking the query for, to make it return
just the page title without appending a number? If not, is there a way to
format the terms in a way that trims off the last four characters?

 

Best regards,

 

Rachel Garrett

 

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Query results include "#001" and "#002" appended to titles; how to remove?

Yaron Koren-2
Hi Rachel,

Sorry for the delay on this - I should probably be answering this, since
those values are presumably coming from the Semantic Internal Objects
extension, and its #set_internal function. If you want to just display the
page name, you should add to the #set_internal call something like "|Has
page={{PAGENAME}}", and then add to the #ask query something like
"|mainlabel=-|?Has page=Title".

-Yaron

On Fri, Jul 15, 2016 at 11:46 PM, Rachel M. Garrett <[hidden email]>
wrote:

> Greetings,
>
>
>
> Forgive me for asking this again, but I still haven't been able to figure
> it
> out. The first time I sent this in, I neglected to strip out the formatting
> and make it readable in plain text.
>
>
>
> In my SMW-based glossary, I allow pages to contain more than one
> Definition.
>
>
>
> The problem is that when I run #ask queries whose results include a
> definition, the terms come back with #001, #002, etc. appended to the page
> titles. Even when there is a single definition included on a page, it comes
> back as Word#001.
>
>
>
> In this example, I want to show all definitions that came from a particular
> ASABE standard.
>
>
>
> {{#ask:
>
>     [[Source::ANSI/ASABE S588 July 2012]]
>
>     |mainlabel=Term
>
>     |?Definition
>
> }}
>
>
>
> Gives me back:
>
> Term
> Definition
>
> Abatement#001                                               Controlling
> emissions.
>
> Abatement#002                                               Controlling
> emissions.
>
> Adverse health effect#001                           A health effect from
> exposure to air contaminants.
>
>
>
> .. And so on.
>
>
>
> The "#002" is going to go away once I get all duplicate definitions removed
> (per an earlier post). But how do I suppress the "#001"?
>
>
>
> I tried adding "|?Title" to the query, in the hopes that this would force
> it
> to return just the page title as a result. But it just created a third
> column, "Title," with no results in it.
>
>
>
> Is there something else I should be asking the query for, to make it return
> just the page title without appending a number? If not, is there a way to
> format the terms in a way that trims off the last four characters?
>
>
>
> Best regards,
>
>
>
> Rachel Garrett
>
>
>
>
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and
> traffic
> patterns at an interface-level. Reveals which users, apps, and protocols
> are
> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
> J-Flow, sFlow and other flows. Make informed decisions using capacity
> planning
> reports.http://sdm.link/zohodev2dev
> _______________________________________________
> Semediawiki-user mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>



--
WikiWorks · MediaWiki Consulting · http://wikiworks.com
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Query results include "#001" and "#002" appended to titles; how to remove?

Rachel M. Garrett
Yaron and James,

Thanks for trying to help with this. I'm still trying to understand what's
going on. James suggested that I create an additional example at the
Sandbox site, but my account request wasn't successful (perhaps I didn't
enter enough of a bio). An example of what's going on can be viewed here:
http://agglossary-demo.referata.com/wiki/International_Plant_Nutrition_Institute_(IPNI).
The query works, but "#001" is appended to all of the terms.

Since I haven't created any subobjects or used the Semantic Internal
Objects extension, I am not sure how to troubleshoot.

Thanks,
Rachel

On Sun, Jul 17, 2016 at 1:10 PM, Yaron Koren <[hidden email]> wrote:

> Hi Rachel,
>
> Sorry for the delay on this - I should probably be answering this, since
> those values are presumably coming from the Semantic Internal Objects
> extension, and its #set_internal function. If you want to just display the
> page name, you should add to the #set_internal call something like "|Has
> page={{PAGENAME}}", and then add to the #ask query something like
> "|mainlabel=-|?Has page=Title".
>
> -Yaron
>
> On Fri, Jul 15, 2016 at 11:46 PM, Rachel M. Garrett <[hidden email]>
> wrote:
>
>> Greetings,
>>
>>
>>
>> Forgive me for asking this again, but I still haven't been able to figure
>> it
>> out. The first time I sent this in, I neglected to strip out the
>> formatting
>> and make it readable in plain text.
>>
>>
>>
>> In my SMW-based glossary, I allow pages to contain more than one
>> Definition.
>>
>>
>>
>> The problem is that when I run #ask queries whose results include a
>> definition, the terms come back with #001, #002, etc. appended to the page
>> titles. Even when there is a single definition included on a page, it
>> comes
>> back as Word#001.
>>
>>
>>
>> In this example, I want to show all definitions that came from a
>> particular
>> ASABE standard.
>>
>>
>>
>> {{#ask:
>>
>>     [[Source::ANSI/ASABE S588 July 2012]]
>>
>>     |mainlabel=Term
>>
>>     |?Definition
>>
>> }}
>>
>>
>>
>> Gives me back:
>>
>> Term
>> Definition
>>
>> Abatement#001                                               Controlling
>> emissions.
>>
>> Abatement#002                                               Controlling
>> emissions.
>>
>> Adverse health effect#001                           A health effect from
>> exposure to air contaminants.
>>
>>
>>
>> .. And so on.
>>
>>
>>
>> The "#002" is going to go away once I get all duplicate definitions
>> removed
>> (per an earlier post). But how do I suppress the "#001"?
>>
>>
>>
>> I tried adding "|?Title" to the query, in the hopes that this would force
>> it
>> to return just the page title as a result. But it just created a third
>> column, "Title," with no results in it.
>>
>>
>>
>> Is there something else I should be asking the query for, to make it
>> return
>> just the page title without appending a number? If not, is there a way to
>> format the terms in a way that trims off the last four characters?
>>
>>
>>
>> Best regards,
>>
>>
>>
>> Rachel Garrett
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> What NetFlow Analyzer can do for you? Monitors network bandwidth and
>> traffic
>> patterns at an interface-level. Reveals which users, apps, and protocols
>> are
>> consuming the most bandwidth. Provides multi-vendor support for NetFlow,
>> J-Flow, sFlow and other flows. Make informed decisions using capacity
>> planning
>> reports.http://sdm.link/zohodev2dev
>> _______________________________________________
>> Semediawiki-user mailing list
>> [hidden email]
>> https://lists.sourceforge.net/lists/listinfo/semediawiki-user
>>
>
>
>
> --
> WikiWorks · MediaWiki Consulting · http://wikiworks.com
>
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Query results include "#001" and "#002" appended to titles; how to remove?

Hermann Schwärzler
Hi Rachel

On 07/20/2016 12:37 PM, Rachel Garrett wrote:
[...]
> Since I haven't created any subobjects or used the Semantic Internal
> Objects extension, I am not sure how to troubleshoot.

You *are* using Semantic Internal Objects! At least in the example you
provided.

Template:Definition
(http://agglossary-demo.referata.com/w/index.php?title=Template:Definition&action=edit)
contains this:

{{#set_internal:HasDefinition|Definition={{{Definition|}}}|Acronym={{{Acronym|}}}|Synonym#list={{{Synonym(s)|}}}|Key_Word#list={{{Key
Word(s)|}}}|Source={{{Source|}}}|Source_URL={{{Source
URL|}}}|Authority={{{Source Type|}}}}}

Greetings
Hermann
[...]

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Query results include "#001" and "#002" appended to titles; how to remove?

Rachel M. Garrett
In reply to this post by Rachel M. Garrett
On Wed, Jul 20, 2016 at 6:00 AM, James HK <[hidden email]>
wrote:

> Hi,
>
> > going on. James suggested that I create an additional example at the
> > Sandbox site, but my account request wasn't successful (perhaps I didn't
>
> See,
> http://sandbox.semantic-mediawiki.org/wiki/Discussion_utilisateur:RachelGarrett_sandbox


Thanks! I'd gotten an e-mail saying my account request was denied.
Immediately following that, I got another e-mail giving me a password. But
I didn't immediately recognize that since it was in French.

> As explained in [1], you can hide those
> internal ID's in case of #subobject.


> [1]
> https://www.semantic-mediawiki.org/wiki/Examples/Subobject_identifiers_%28named_vs._anonymous%29


I'm afraid that I'm still not seeing how the "hiding" would work. When I
work through this example and look at the templates, the table template is
using three variables: {{{1}}} is the subobject identifier, {{{2}}} is the
value for the property "Term", and {{{3}}} is the value for the property
"Abstract." "Hiding" works because the template can display {{{2}}} but
actually link to {{{1}}}. In my glossary, I don't have a property
corresponding to {{{2}}} that I can reference. What I was hoping for was
for {{{2}}} to be the name of the page. Like {{{Aquifer#001|Aquifer}}}.

Yaron had written (separately from James's explanation), "[T]hose values
are presumably coming from the Semantic Internal Objects extension, and its
#set_internal function. If you want to just display the page name, you
should add to the #set_internal call something like "|Has
page={{PAGENAME}}", and then add to the #ask query something like
"|mainlabel=-|?Has page=Title".

So, being new to this and not having intentionally created subobjects or
internal objects, I don't know if that's the answer, or if so, where I
would modify the #set_internal call. That seems like a complicated way to
get page names into query results, so I am wondering if I set something up
wrong to start with.

Thanks,
Rachel
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Query results include "#001" and "#002" appended to titles; how to remove?

Rachel M. Garrett
In reply to this post by Hermann Schwärzler
On Wed, Jul 20, 2016 at 7:11 AM, Hermann Schwärzler <
[hidden email]> wrote:
>
>
> You *are* using Semantic Internal Objects! At least in the example you
> provided.


 True; thanks. This is my first SMW, and that template was generated
automatically with Special:CreateClass.

--Rachel
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Query results include "#001" and "#002" appended to titles; how to remove?

Hermann Schwärzler
In reply to this post by Rachel M. Garrett
Hi Rachel,

you may have noticed that I have just edited your example page
"International Plant Nutrition Institute (IPNI)" at
http://agglossary-demo.referata.com to show what Yaron meant with "Has
page".


Regarding your use of internal objects: I am pretty sure you do *not*
have to use those (but maybe I am missing something and you really have to).

You could try this by changing your Template:Definition page: remove the
"{{#set_internal...}} part entirely and change the table to this:
{| class="wikitable"
! Definition
| [[Definition::{{{Definition|}}}]]
|-
! Acronym
| [[Acronym::{{{Acronym|}}}]]
...
asf. I think you see what I mean: set the properties (and display them)
*in the page* (not in/as a sub-object).

After that
{{#ask:
    [[Source::International Plant Nutrition Institute (IPNI)]]
    |?Definition
}}
should give you what you expect.

Greetings
Hermann

On 07/20/2016 02:37 PM, Rachel Garrett wrote:
[...]

> Yaron had written (separately from James's explanation), "[T]hose values
> are presumably coming from the Semantic Internal Objects extension, and its
> #set_internal function. If you want to just display the page name, you
> should add to the #set_internal call something like "|Has
> page={{PAGENAME}}", and then add to the #ask query something like
> "|mainlabel=-|?Has page=Title".
>
> So, being new to this and not having intentionally created subobjects or
> internal objects, I don't know if that's the answer, or if so, where I
> would modify the #set_internal call. That seems like a complicated way to
> get page names into query results, so I am wondering if I set something up
> wrong to start with.
[...]

------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user
Reply | Threaded
Open this post in threaded view
|

Re: Query results include "#001" and "#002" appended to titles; how to remove?

Rachel M. Garrett
On Thu, Jul 21, 2016 at 1:57 AM, Hermann Schwärzler <
[hidden email]> wrote:

> Hi Rachel,
>
> you may have noticed that I have just edited your example page
> "International Plant Nutrition Institute (IPNI)" at
> http://agglossary-demo.referata.com to show what Yaron meant with "Has
> page".
>

Awesome! I am modifying my other queries to follow this example. I may
fiddle with internal objects later, but right now, I just wanted the query
results to look right. This was very helpful.

Thanks, everyone.

--Rachel
------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are
consuming the most bandwidth. Provides multi-vendor support for NetFlow,
J-Flow, sFlow and other flows. Make informed decisions using capacity planning
reports.http://sdm.link/zohodev2dev
_______________________________________________
Semediawiki-user mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/semediawiki-user