package com.tzld.piaoquan.recommend.server.framework.userattention;


import com.tzld.piaoquan.recommend.server.framework.common.User;
import com.tzld.piaoquan.recommend.server.gen.recommend.RecommendRequest;

public abstract class AbstractUserAttentionExtractor {
    protected UserAttentionExtractorConfig extractorConfig;

    public AbstractUserAttentionExtractor(UserAttentionExtractorConfig extractorConfig) {
        this.extractorConfig = extractorConfig;
    }

    public String getExtractorName() {
        String[] arr = this.extractorConfig.getName().split(".");
        return arr.length > 0 ? arr[arr.length - 1] : "UnKnownExtractor";
    }

    public UserAttentionExtractorConfig getExtractorConfig() {
        return extractorConfig;
    }


    public abstract void extractAttention(final RecommendRequest requestData, final User user);

    public void loadModel() {
    }
}