I'm having trouble understanding the actual output of this module in the sense of what will I see if I install it. (I installed it and placed the block but I can't see anything.)

What I am trying to achieve is to show titles or fields of nodes that are related through taxonomy terms.

Comments

russellb’s picture

The block should show related terms when placed on node or taxonomy pages.

Have you installed taxonomy_nco_analysis and done an analysis run?

By default the block shows taxonomy terms as links to core taxonomy pages, not titles or fields of nodes. To do things like that I would have thought it would be best to use views relationships. I have been working on some views integration which you should find up on the latest dev snapshot.

BrianLP’s picture

Thanks, that clarifies my thoughts.

I didn't install any analysis module separately but I enabled the "Taxonomy NCO Analysis" which was part of the 1.1 download. I hope that is what you mean. I ran the initial analysis but I don't know if that was successful. Or maybe my taxonomy tag pool is too small. I have about 15 tags (in 4 categories with up to 3 levels). There are about 200 pages (products) tagged with hirarchies like this example [ device | smartphone | samsung ].

Views relationship can show fields of other nodes but it's static: If I have a page tagged with [ device | smartphone | samsung ], I'd like to show previews of other pages tagged with smartphone or samsung. Same for tablets or notebooks etc.. Views relationship will only show the same stuff on every page, based on the terms I pre-define, afaik. So it will show Samsung smartphones eveywhere, also on an HP notebook page.

russellb’s picture

OK - it sounds like you don't have any co-occurrence. This module works off the co-occurrence, inferring possible similarity where it finds it. If each of your nodes is only tagged with one term, then there is no co-occurrence of taxonomy.

If you switch to verbose reporting in the analysis module, and run it again, then look on the Drupal recent log messages you should be able to see whether the analysis module has found any co-occurrence that it finds statistically significant. (it will say it has found seeds if it finds something)

I still have a feeling that you should do this with views relationships, but maybe you would need a custom written hierarchy views taxonomy relationship.

My new views code does provide Taxonmy NCO relationships, which would allow you go beyond the restrictions of views relationships you described, but as I say, if you have no co-occurrence then this module can't help you at the moment.

BrianLP’s picture

Thanks, I checked the report and it says "15 seed terms found". I guess that means no co-occurance. :(

50% of the nodes have 2 tags and 50% have 3 tags. Some are identical, some are completely different and some share 2 of three tags.

I have no Idea how co-occurances are calculated (reading the documentation it seems to be some complex stuff), but I'll try to expand the taxonomy to include the product description keywords (colour, pattern, material etc.). I want to give it another try because I think that this kind of relationship building would be a great benefit for the commerce module. (And, sadly, I don't have any skills to code relationships in views.)

russellb’s picture

Actually it does sound like you have co-occurrence there. If you have nodes with 2 & 3 tags that is co-occurrence. Are you still seeing nothing when you place the taxonomy_nco block on node & taxonomy pages? By taxonomy pages I mean like /taxonomy/term/ - so make sure the block is visible on those pages eg. taxonomy/term/* - and go to the term that you think might have the most co-occurrence with another common term.

Other things you could do to see what is happening are to look at the DB tables (eg. using phpmyadmin) - look at the table taxonomy_nco and see if there is any data in there.

If you like you can also try adjusting the co-occurence levels in the analysis module (and run the anaylsis again). You can do this through the module's Drupal admin interface. (Seed term occurrence threshold & Minimum analysis intersection count ) .. and for the NCO cut-off itself you would need to edit the variable DEFAULT_MINIMUM_MATCH_NCO.

BrianLP’s picture

Thank you for the explanation and for sticking with me. Meanwhile there is news. I didn't turn off the module the other day, and the next day the block was there. Maybe a chache or cron thing. However, what I see is great. Actually it shows pretty much, that is everything from the same product family tree. The table taxonomy_nco shows values from 0.04 to 0.67. I'll go and try out what I can do with views.

russellb’s picture

OK good!

I've made some improvements to the modules following on from your experience there.

The Taxonomy NCO admin page now tells you how many relationships it is seeing all in all, and I've fixed the help text on the confirm page for start analysis.

These are on git now, and will appear on the dev. download when the next nightly build goes round.

BrianLP’s picture

I've installed the dev version and it counts 49 relationships. Regarding views I haven't found out exactly what to do (how to set filters and relationships propperly). The configuration is, that I have a views block which is showing fields of other nodes. Ideally these "other nodes" should only be the related ones. After adding the relationship "Taxonomy terms on node" I get one nco relationship and 4 nco filter criteria available. What are they for and what can I do with them?

Relationship:
Taxonomy NCO tib_b to taxonomy_term_data

Filter:
Taxonomy term: Taxonomy NCO - NCO
The Normalised Co-Occurrence of the two given terms

Taxonomy term: Taxonomy NCO - tid a
The term ID of term A

Taxonomy term: Taxonomy NCO - tid b
The term ID of term B

Taxonomy term: Taxonomy NCO - Union
The union of occurence of this term and tid_b

russellb’s picture

The Taxonomy NCO views relationship there allows you to widen out from a given taxonomy term to the related terms found by Taxonomy NCO. This new views 3 work is in development, so I can't promise that it can do what you want without further coding. I've had it working on a taxonomy view, I presume you are on a node view here? It's worth a try, this is exactly where I'd like us to get to with this code, but I haven't had time to pursue it fully myself yet.

BrianLP’s picture

With "a given taxonomy term" do you mean a manually set term or can this be collected from the current page?

Actually this is on a basic node. I have tried out a lot but the only effect I could achieve was to control the co-occurence threshold as filter for items being shown in the block or not.

The thing missing is to filter the items in the block for just those terms, which are in the nco block on the page. (And then sort/filter according to the co-occurence.) But I guess the difficult part is to "pull in" those terms and provide them to the filter, if not impossible.

russellb’s picture

Views 3 provides facilities to "pull in" terms as standard. In your view, in advanced you should find 'contextual filters" - these pull things in to views. They can be used on taxonomy pages to pull in the term ID from the URL, but they also have a feature to provide default value when the filter value is not in the url, including bringing in terms from nodes.

russellb’s picture

Views 3 integration is now out on main version release 7.x-1.2 - on dev. we are going into some more experimental work on supporting entities other than nodes.

BrianLP’s picture

I wasn't aware of the last part you mentioned, bringing in terms from the node. It's under the menu item "term ID from URL", which was never relevant to me. I've tried that but I'm not able to get any results although I found a good description (scito.ch/de/node/13). For the moment I don't think I'll try out any more since I can't achieve any progress at all.

russellb’s picture

OK yes, I think that makes sense. What you're trying to do there with views may well require more code writing - if you don't have code skills or commissioning budget for that you may find it frustrating. The views integration is tested so far only with taxonomy views, and right now we are fairly focused on support for new entities (especially file entities with the media module) in our own development of the module.

I'd be keen to achieve what you're trying to do there though: to have a display on node pages that links to other nodes related by NCO, so let's see if anyone has time / inclination to pursue that soon.

russellb’s picture

Status: Active » Closed (fixed)