File

src/app/services/tag-cloud-processor/tag-cloud-processor.service.ts

Description

Tag cloud processor service

Index

Methods

Constructor

constructor(excelDateFormatterService: ExcelDateFormatterService)

Construct the tag cloud processor service

Parameters :
Name Type Optional Description
excelDateFormatterService ExcelDateFormatterService No

An Excel date formatter dependency service.

Methods

Public addMaximality
addMaximality(label: string, maximality: number, min: number, max: number)

Add maximality percentage to the label.

Parameters :
Name Type Optional Description
label string No

The label to process.

maximality number No

The maximality percentage value.

min number No

The minimum value.

max number No

The maximum value.

Returns : string

A formatted label.

Public addSignificance
addSignificance(label: string, significance: number, length: number)

Add significance percentage to the label.

Parameters :
Name Type Optional Description
label string No

The label to process.

significance number No

The significance percentage value.

length number No

The length of the array processed.

Returns : string

A formatted label.

Public calcFrequencies
calcFrequencies(collection: any, propertyName: string, splitter: string, ai: boolean)

Preprocesses and then calculates the frequency of occurrence of any value parts in a collection objects' property based on a splitter character/string.

For a given object property name in the collection of objects, extracts the values, concatenates them and then calculates the frequency of occurrence of any value parts based on the splitter character/string.

and lightness value when rendered.

Parameters :
Name Type Optional Default value Description
collection any No

The collection of objects to process.

propertyName string No

The name of the property to process.

splitter string No ', '

The splitter character/string. Optional.

ai boolean No false

Whether to apply lexical analysis euristics when parsing each value encountered. Optional.

Returns : []

An array of key/value pairs of value part and an object containing its statistics including count, percentage and lightness value when rendered.

Public getLabel
getLabel(i: string, count: string)

Label callback.

Parameters :
Name Type Optional Description
i string No

The current word count key.

count string No

The current word count value.

Returns : string

A formatted label.

Public getShortLabel
getShortLabel(i: string, count: string, significance: number)

Short label callback (for display in charts).

Parameters :
Name Type Optional Description
i string No

The current word count key.

count string No

The current word count value.

significance number No

The significance percentage value.

Returns : string

A formatted short label.

Public replaceAll
replaceAll(str: string, search: string | RegExp, replacement: any)

Replace all delegate.

Parameters :
Name Type Optional
str string No
search string | RegExp No
replacement any No
Returns : string

results matching ""

    No results matching ""