Modify

Opened 5 years ago

Closed 5 years ago

#13605 closed enhancement (fixed)

Add configuration parameter for count of words

Reported by: Massimo Owned by:
Priority: normal Component: LoomingCloudsPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.2

Description

Please add 2 configuration parameters for limiting the count of words for the "less" and the "more" view.

Keywords with LoomingCloudsPlugin

Attachments (1)

Screenshot_2019-09-05_08-06-06.png (11.3 KB) - added by Massimo 5 years ago.
Keywords with LoomingCloudsPlugin

Download all attachments as: .zip

Change History (6)

Changed 5 years ago by Massimo

Keywords with LoomingCloudsPlugin

comment:1 Changed 5 years ago by Ryan J Ollos

In 17488:

Click on tag in keywords field removes the tag

Refs #13605.

comment:2 Changed 5 years ago by Ryan J Ollos

In 17489:

Format CSS file

Refs #13605.

comment:3 Changed 5 years ago by Ryan J Ollos

In 17490:

Limit cloud to min_count and/or max_keywords

Refs #13605.

comment:4 Changed 5 years ago by Ryan J Ollos

You can limit using two values:

[loomingclouds]
min_count = 2
max_keywords = 10

The example will display only keywords with a count of 2+, up to a maximum of 10 keywords.

Counter.most_common(n) seems to return arbitrary values in the case that there are a number of equal values > n. Example:

>>> from collections import Counter
>>> c = Counter(dict([('a', 2), ('b', 2), ('c', 2), ('d', 1)]))
>>> c
Counter({'a': 2, 'c': 2, 'b': 2, 'd': 1})
>>> c.most_common(2)
[('a', 2), ('c', 2)]
>>> c.most_common(3)
[('a', 2), ('c', 2), ('b', 2)]

The min_count option will give more predicable results.

comment:5 Changed 5 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.