Package com.tagtraum.audiokern
Class AudioMetaDataNormalizer
- java.lang.Object
-
- com.tagtraum.audiokern.AudioMetaDataNormalizer
-
public class AudioMetaDataNormalizer extends Object
Helps normalizing audio meta data strings like titles and albums.- Author:
- Hendrik Schreiber
-
-
Constructor Summary
Constructors Constructor Description AudioMetaDataNormalizer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
clean(String name)
Remove extra qualifiers like "[explicit]".static List<TermFrequency>
getLyricsTermFrequencies(AudioSong song)
Get list of term frequencies.static String
normalizeAlbum(String rawAlbum, Locale locale)
static String
normalizeArtist(String rawArtist, Locale locale)
static String
normalizeGenre(String genre)
static String
normalizeGenre(String genre, boolean spaceIsSlash)
static String
normalizeName(String rawName, Locale locale)
static String
removeNonSpacingMarks(String s)
-
-
-
Method Detail
-
getLyricsTermFrequencies
public static List<TermFrequency> getLyricsTermFrequencies(AudioSong song)
Get list of term frequencies. If the song name is not already in the lyrics, it's added.- Parameters:
song
- song- Returns:
- sorted list of lowercase terms and their frequencies
-
clean
public static String clean(String name)
Remove extra qualifiers like "[explicit]".- Parameters:
name
- dirty name- Returns:
- clean name
-
-