Class AudioMetaDataNormalizer


  • public class AudioMetaDataNormalizer
    extends Object
    Helps normalizing audio meta data strings like titles and albums.
    Author:
    Hendrik Schreiber
    • Constructor Detail

      • AudioMetaDataNormalizer

        public AudioMetaDataNormalizer()
    • 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
      • normalizeArtist

        public static String normalizeArtist​(String rawArtist,
                                             Locale locale)
      • normalizeAlbum

        public static String normalizeAlbum​(String rawAlbum,
                                            Locale locale)
      • removeNonSpacingMarks

        public static String removeNonSpacingMarks​(String s)
      • clean

        public static String clean​(String name)
        Remove extra qualifiers like "[explicit]".
        Parameters:
        name - dirty name
        Returns:
        clean name
      • normalizeGenre

        public static String normalizeGenre​(String genre)
      • normalizeGenre

        public static String normalizeGenre​(String genre,
                                            boolean spaceIsSlash)