summaryrefslogtreecommitdiffstats
path: root/container-core/src/main/java/com/yahoo/language/provider/SimpleLinguisticsProvider.java
blob: 26c1542bf7d04d9d9759c4b5f10825e2538f5362 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.language.provider;

import com.yahoo.language.simple.SimpleLinguistics;
import com.yahoo.container.di.componentgraph.Provider;
import com.yahoo.language.Linguistics;

/**
 * Provides simple linguistics if no linguistics component has been explicitly configured
 * (dependency injection will fallback to providers if no components of the requested type is found).
 *
 * @author bratseth
 */
public class SimpleLinguisticsProvider implements Provider<Linguistics> {

    private final Linguistics linguistics;

    public SimpleLinguisticsProvider() {
        linguistics = new SimpleLinguistics();
    }

    @Override
    public Linguistics get() { return linguistics; }

    @Override
    public void deconstruct() {}

}