Re: Facts versus terms (was: Asserting a fact when triggering a rule)

"Abdallah, Samer" <[email protected]>
Newsgroups gmane.comp.ai.prolog.swi
Message-ID <[email protected]>
On 20 Dec 2013, at 17:08, Nicos Angelopoulos <[email protected]>
 wrote:

> 
>         I agree with your arguments with regard to usefulness of representing data via facts..
> 	Most of your points also hold for working with very large biological networks, such as string [1],
> 	the human part of which contains 4445596 edges.
> 
> 	I don't know how often you need to load big and different/variant datasets but I have been thinking
> 	it it might be useful to have "data" modules that only contain facts and which (maybe?) load faster and wipe clean more easily/thoroughly (because of the restriction).
> 

This is what I do with symbolic music data -- Humdrum/Kern is a rich format
allowing several parallel representations of polyphonic scores including
metre, dynamics, pitch, annotations, phrasing, ornaments etc. I've written
a Prolog library that reads Humdrum files into a big term, but because the
base representation is so complex and multidimensional, and needs to be
read sequentially to make sense of it, I've found it useful 
to assert lots of facts into a  temporary module (one per Humdrum file), and 
then to have a library of predicates which perform useful inferences on the raw data
without having to walk through a giant term, 
including following one musical 'voice' through the score, collecting several tied
notes into a single note event, deriving different pitch representations
and so on. Doing it this way makes it easier to focus on whatever aspect of the
score is interesting for a particular application.

The module mechanism seems to work fine for this, even with thousands of
files.

- Samer.

>       In general, Prolog's indexing is quite an asset in the world of programming languages.
> 
> Regards,
> 
> Nicos Angelopoulos.
> http://stoics.org.uk/~nicos/
> 
> [1] http://string-db.org/
> _______________________________________________
> SWI-Prolog mailing list
> [email protected]
> https://lists.iai.uni-bonn.de/mailman/listinfo.cgi/swi-prolog

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 495 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <https://lists.iai.uni-bonn.de/pipermail/swi-prolog/attachments/20131220/b2d45cfc/attachment.bin>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.