Hi,

We looked for quite some time now for a general and flexible approach
to deal with aliases in SMW (alias as a subject that is used as
another's substitute while pointing to the same knowledge entity).

## Redirects

The current  approach for SMW to recognize that a subject has
different “aliases” is by creating a redirect to that subject in
question. This way the subject (term, knowledge entity) has to be
created and redirected in order to be automatically recognized as
reference object by the query.

An example might make it a bit easier, a subject (or term, page) like
"Organizational behaviour" (depending on the language preference)
would at least incorporate other subjects like "Organizational
Behavior, Organizational Behaviour, Organizational behavior,
Organisational behavior, and Organisational behaviour". If those
subjects are created as individual page and redirected towards
"Organizational behaviour", any query will recognize their equality to
one another. Unfortunately as soon one of the subjects becomes a
redirect of a redirect (no longer secures a one-to-one relationship of
originate and substitute subject) then this rule will no longer apply
and values are missed from the query result set.

Redirects also only work as long as those subjects in question are
used in combination with a property that "Has type::page" because as
soon as the property is of "Has type::string" those subjects redirects
won't work either.

For example, if we have a property "Author" specified as "Has
type::string", the condition [[Author::subject]] pair would need
manual intervention during the query building process in order to
ensure other spellings of the same author (e.g. Arthur Miller, Arthur
Asher Miller, Arthur A. Miller etc.) are not missed, even though the
author as entity is created as page together with their other
spellings.

## Subobject KnownAs

### Declaration

A rather different but pragmatic approach would be to use subobjects
as knowledge container with a property "Known as" ( or "Also known
as", “Has alias” specified as special property) to declare known
aliases for a subject (page/article/term etc.). Using the example from
above, a page called "Organizational behaviour" could declare "known
as" aliases:

{{#subobject:KnownAs
 | as subject = Organizational behaviour
 | known as = Organizational Behavior
 | known as = Organizational Behaviour
 | known as = Organizational behavior
 | known as = Organisational behavior
 | known as = Organisational behaviour
}}

This declaration is explicitly stored with the originating page
therefore a query that contains the subject in question (above case
"Organizational behaviour") would need to identify "known as" entities
for this subject and extend the query pre-processing with conditions
that satisfy the original intent plus its known aliases specified
through "known as".

### Query process

The explicit declaration of “known as” would be followed by an
implicit enhanced statement of belongingness to a subject.

For example a query like {{#ask: [[Tagged::Organizational behaviour]]
| format= ...}} would silently amend disjunctive conditional
statements for all "known as" entities that are maintained for that
particular subject and enhance the query with [[Tagged::Organizational
behaviour]] OR [[Tagged::Organizational behavior]] OR ... statements.

Whenever a page would include a property::value pair like
[[Tagged::Organisational behavior]] it would be equally "known as"
[[Tagged::Organizational behaviour]] without explicitly redirecting
“Organisational behavior” towards “Organizational behaviour” since
Organisational behavior and Organisational behavior share the same
"known as" declaration.

Related page as subject

(1) Query → find conditions → find subject in condition → check if
subject has page → check if page has “known as” properties →
complement conditional query statements → result printer

(2) Query → run primary query → find conditions → find subject in
condition → check if subject has page → check if page has “known as”
properties → prepare a secondary query → mark secondary results →
merge primary and secondary results → result printer

Related subject within a subobject

(3) Query → find conditions → find subject in condition → check if
subject is a member of a subobject that relates to “known as”
properties → complement conditional query statements → … → result
printer

Since "known as" is specified as a type independent container, any
combination of conditional statements would satisfy an inference
schema based on "known as" and language dependant aliases could be
supported as well by allowing a language property to be present.

This process would allow freely to specify aliases with the means of
SMW without having to create separate pages each time circumstance
change and it would allow all statements to participate equally in the
query process, leaving property type limitations outside the query
process.

### Result printer

The query result should return with an indication whether or not a
result was retrieved by a primary or a substituted condition.

Result printers could decide whether result sets should be displayed
as united or distinguish set of results. Redirected results will
always be ranked as primary and leaving current practice intact but a
substituted set of results could be marked differently depending on
the used result printer.

## Questions

Does the above description demonstrates some fundamental flaws?

Would the proposed use of declarative subobjects (to specify aliases)
seen as an approachable solution within SMW core?

If the proposed approach seems viable would it be something to be
supported by the core or rather be handled by an extension?  (The
“known as” declaration can be done either via a template, through
manual intervention, or by using a form and is already applicable with
SMW 1.7 onwards. The query pre-processing of conditionals would need
some kind of enhancement, registering the special property status of
“Known as” should be considered, and marking results as either primary
or secondary.)

Cheers

mwjames

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Semediawiki-devel mailing list
Semediawiki-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel

Reply via email to