aboutsummaryrefslogtreecommitdiffstats
path: root/opennlp-linguistics/src/test/java/com/yahoo/language/opennlp/UrlCharSequenceNormalizerTest.java
blob: 4c1cd55199861d7c04c51333fad4a928237b962e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.language.opennlp;

import org.junit.Test;

import static org.junit.Assert.assertEquals;

/**
 * @author jonmv
 */
public class UrlCharSequenceNormalizerTest {

    @Test
    public void testNormalization() {
        String text = "xxx+yyy_.dude@mail.com foo bar@baz_bax https://host.tld/path?query=boo a@b §boo@boo";
        assertEquals("  foo  _bax   a@b § ",
                     UrlCharSequenceNormalizer.getInstance().normalize(text));
    }

}