Sha256: acad2f06ae9f1115e2910efe2eb7b22afa69e69be4ef9cdc096ec450d8ba3b65

Contents?: true

Size: 822 Bytes

Versions: 4

Compression:

Stored size: 822 Bytes

Contents

#pragma once
#include <vector>
#include <string>
#include "../TopicModel/TopicModel.hpp"

namespace tomoto
{
	namespace label
	{
		struct Candidate
		{
			float score = 0;
			std::vector<Vid> w;
			std::string name;

			Candidate()
			{
			}

			Candidate(float _score, Vid w1)
				: w{ w1 }, score{ _score }
			{
			}

			Candidate(float _score, Vid w1, Vid w2)
				: w{ w1, w2 }, score{ _score }
			{
			}

			Candidate(float _score, const std::vector<Vid>& _w)
				: w{ _w }, score{ _score }
			{
			}
		};

		class IExtractor
		{
		public:
			virtual std::vector<Candidate> extract(const ITopicModel* tm) const = 0;
			virtual ~IExtractor() {}
		};

		class ILabeler
		{
		public:
			virtual std::vector<std::pair<std::string, float>> getLabels(Tid tid, size_t topK = 10) const = 0;
			virtual ~ILabeler() {}
		};
	}
}

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
tomoto-0.1.3 vendor/tomotopy/src/Labeling/Labeler.h
tomoto-0.1.2 vendor/tomotopy/src/Labeling/Labeler.h
tomoto-0.1.1 vendor/tomotopy/src/Labeling/Labeler.h
tomoto-0.1.0 vendor/tomotopy/src/Labeling/Labeler.h