taxon_taxonomy enables Drupal to interact with the Taxon ewb service.

It requires Taxon and Taxon web service to be available.

What is Taxon?
Taxon is an Open Source project to automatically classify a text according to a given taxonomy, see www.taxon.dk.
The resulting metadata can be used as tags on a web page, as metadata in a record management system, as keys in a mail distribution system and many other places.

git clone http://git.drupal.org/sandbox/Taxon/2060257.git taxon_taxonomy
Project: https://drupal.org/sandbox/Taxon/2060257

CommentFileSizeAuthor
#4 help-texts2.png104.05 KBTaxon
#3 taxon.png61.66 KBTaxon
#3 taxon-admin.png47.3 KBTaxon

Comments

PA robot’s picture

We are currently quite busy with all the project applications and we prefer projects with a review bonus. Please help reviewing and put yourself on the high priority list, then we will take a look at your project right away :-)

Also, you should get your friends, colleagues or other community members involved to review this application. Let them go through the review checklist and post a comment that sets this issue to "needs work" (they found some problems with the project) or "reviewed & tested by the community" (they found no major flaws).

I'm a robot and this is an automated message from Project Applications Scraper.

razonklnbd’s picture

Status: Needs review » Needs work

Please tell us how we can enable Taxon and Taxon web service to test your project. Please write as details as possible.

But I installed your module in my test-box and found no problem. But I really don't know what is its work. Need document link of usability.

Thanks.

Taxon’s picture

StatusFileSize
new47.3 KB
new61.66 KB

Hi razonklnbd

Thank you so much for your time and effort.

I have set up a Taxon web service at test.taxon.dk. To use it enter the following values in the admin page:

Lookup taxonomy for Taxon: /mytmp/test_lookup.json
The URL for Taxon: http://test.taxon.dk/taxon-ws.php

The name of the taxonomy field: #THE-NAME-OF-YOUR-DRUPAL-TAXONOMY-FIELD#

The remaining fields should be ok.

As test text try something like this:

Luxembourg (Listeni/ˈlʌksəmbɜrɡ/ LUKS-əm-burg), officially the Grand Duchy of Luxembourg (Luxembourgish: Groussherzogtum Lëtzebuerg, French: Grand-Duché de Luxembourg, German: Großherzogtum Luxemburg), is a landlocked country in western Europe, bordered by Belgium, France, and Germany. It has two principal regions: the Oesling in the north as part of the Ardennes massif, and the Gutland ("good country") in the south.[5] Luxembourg has a population of 524,853 (as of October 2012)[6] in an area of 2,586 square kilometres (998 sq mi).[7]

Copenhagen (IPA /ˈkoʊpənheɪɡən/ or /ˈkoʊpənhɑːɡən/; Danish: København [kʰøb̥m̩ˈhɑʊ̯ˀn] (About this sound listen)) is the capital of Denmark and its most populous city, with an urban population of 1,230,728 and a metropolitan population of 1,956,278 (as of 1 July 2013). Copenhagen is situated on the eastern coast of Zealand and stretches across part of Amager. A number of bridges and tunnels connect the parts of the city together, and the cityscape is characterized by promenades and waterfronts.

Text from wikipedia.org

The test taxonomy is very simple so the result is just:

01 Europe
01.02 Scandinavia

I have attached 2 screendumps, one for the admin page and one for the results when using the module.

Regards,

Brian

Taxon’s picture

Status: Needs work » Needs review
StatusFileSize
new104.05 KB

Updated to 7.x-2.2.

Added help texts for classes, see the attached image.

You can supply your own help texts (in HTML) to be displayed with each class.

kscheirer’s picture

Status: Needs review » Needs work
PAReview: Individual user account
It seems you are using a non-individual account.
All user accounts are for individuals. Accounts created for more than one user or those using anonymous mail services will be blocked when discovered (see Get a Drupal.org account).

Can you confirm that the Taxon account is a single user? Please change your account information and enter your realname.

If you prefer, we can also promote this sandbox to a full project without granting you "git vetted user" status.

License
Please remove the LICENSE.txt file. Drupal will add the appropriate version automatically during packaging so your repository should not include it.
PAReview: 3rd party code
taxon_taxonomy.js appears to be 3rd party code. 3rd party code is not generally allowed on Drupal.org and should be deleted. This policy is described in the getting involved handbook. It also appears in the terms and conditions you agreed to when you signed up for Git access, which you may want to re-read, to be sure you're not violating other terms.

The Libraries API module is a recommended method for adding 3rd party dependencies without directly including the code on Drupal.org.

  • You should only have 1 branch in your drupal repository, named 7.x-2.x. Individual releases can be tagged from that branch. My review is based on the 7.x-2.2 branch. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.
  • Remove the .gitignore file from the repo
  • Use a default value when calling variable_get, like variable_get('taxon_taxonomy_number_results_returned', 5);. This will return 5 even if the variable has not been explicitly set yet.
  • In _taxon_taxonomy_proxy() I think you are trying to remove html tags from the text, can you use strip_tags() instead of all the regexes?
  • When you are generating the string for POST, http_build_query() might be easier than creating it yourself.
  • If your module requires curl to work, implement a hook_requirements() to make sure it's installed, or consider switching to drupal_http_request().
  • For returning json output, use drupal_json_return()
  • Instead of using hook_init(), which is called for every Drupal page request, can you instead only load your js/css where they are actually used?
  • Why do you require ckeditor?

----
Top Shelf Modules - Crafted, Curated, Contributed.

kscheirer’s picture

Issue summary: View changes

added link to project page

Taxon’s picture

Issue summary: View changes
Status: Needs work » Needs review

Issues from #5:

> License
> Please remove the LICENSE.txt file. Drupal will add the appropriate version automatically during packaging so your repository should not include it.

Done

> You should only have 1 branch in your drupal repository, named 7.x-2.x. Individual releases can be tagged from that branch. My review is based on the 7.x-2.2 branch. You should really be working in a version specific branch. The most direct documentation on this is Moving from a master branch to a version branch. For additional resources please see the documentation about release naming conventions and creating a branch in git.

Done

> Remove the .gitignore file from the repo

Done

> Use a default value when calling variable_get, like variable_get('taxon_taxonomy_number_results_returned', 5);. This will return 5 even if the variable has not been explicitly set yet.

Done

> In _taxon_taxonomy_proxy() I think you are trying to remove html tags from the text, can you use strip_tags() instead of all the regexes?

Not done. strip_tags() is pretty dangerous as it removes everything after a < until either a > or the end of the string, so "foo < bar" becomes "foo ". On top of that strip_tags() does not understand HTML so "foo

bar

becomes "foo bar" and I want it to be "foo ".

> When you are generating the string for POST, http_build_query() might be easier than creating it yourself.

Done. Thanks for pointing out this funtion.

> If your module requires curl to work, implement a hook_requirements() to make sure it's installed, or consider switching to drupal_http_request().

Done

> For returning json output, use drupal_json_return()

The function _taxon_taxonomy_proxy() actually returns a text string.

> Instead of using hook_init(), which is called for every Drupal page request, can you instead only load your js/css where they are actually used?

Done

> Why do you require ckeditor?

Legacy code. Removed requirement.

Thanks for all your time.

Regards

Brian

kscheirer’s picture

Status: Needs review » Reviewed & tested by the community
Project page
Please take a moment to make your project page follow tips for a great project page.

I think you still need to remove the license/copyright text from taxon_taxonomy.js, or get an exception to Drupal's standard rule against hosting licensed code.

Otherwise looks ready to go!

----
Top Shelf Modules - Crafted, Curated, Contributed.

Taxon’s picture

Status: Reviewed & tested by the community » Needs review

>Project page
>Please take a moment to make your project page follow tips for a great project page.

Done. Updated the text and added an image.

>I think you still need to remove the license/copyright text from taxon_taxonomy.js, or get an exception to Drupal's standard rule against hosting licensed code.

Done.

boyan.borisov’s picture

Hi Brian,

Congratulation for the module! I already use it for some of projects that I work on.

I just want to suggest you 2 small improvements:
- it is not needed to use a custom submit callback function(taxon_taxonomy_admin_form_submit) for the admin form. Use system_settings_form instead of it.

- in your ajax call you've hardcoded the basepath in ajax url ""/taxon-taxonomy". Also this will make your ajax call to use only the default language.
You could use Drupal.settings.basePath and Drupal.settings.pathPrefix to handle them.

boyan.borisov’s picture

Status: Needs review » Needs work
kscheirer’s picture

Status: Needs work » Reviewed & tested by the community

@Taxon - you don't need to set this back to "needs review" - once it's in RTBC, it's only 1 review away from being published!

@boyan.borisov - those are great suggestions, but "needs work" is only for major blocking issues.

Taxon’s picture

Hi boyan.borisov

If you are already using the module here is a 'heads up'. Yesterday I discovered the reason why the CKEditor needs special attention. Getting the text with .text() works, but with CKEditor it gets the text which is present when the CKEditor opens. Changes to the text are not caught by .text().

I have made some changes to the module to get the text one way with CKEditor and another without CKEditor.

I am uncertain whether to upload the new version now or wait for the module to be published. Is there something I need to do for the module to be published?

boyan.borisov’s picture

Hi Taxon,

I guess that if you want to speed up the publishing of your module you should become part from the review bonus program.

kscheirer’s picture

Status: Reviewed & tested by the community » Fixed

It's been a month without any problems reported, so I'm promoting this myself as per https://drupal.org/node/1125818.

Thanks for your contribution, Taxon!

I updated your account to let you promote this to a full project and also create new projects as either a sandbox or a "full" project.

Here are some recommended readings to help with excellent maintainership:

You can find lots more contributors chatting on IRC in #drupal-contribute. So, come hang out and get involved!

Thanks, also, for your patience with the review process. Anyone is welcome to participate in the review process. Please consider reviewing other projects that are pending review. I encourage you to learn more about that process and join the group of reviewers.

Thanks to the dedicated reviewer(s) as well.

----
Top Shelf Modules - Crafted, Curated, Contributed.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.