feat(backend): add knowledge base, innovation library and trends modules
Add knowledge item and innovation CRUD with search/filtering, published-only visibility for non-staff, admin publish/update, challenge dictionary, problem aggregation with trends (admin only) and canonical embedding text preparation for matchmaking.
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
namespace TarninaHub.Application.Text;
|
||||
|
||||
/// <summary>
|
||||
/// Builds the canonical text used to compute an innovation embedding
|
||||
/// (matchmaking, steps 14-15).
|
||||
/// </summary>
|
||||
public static class EmbeddingTextBuilder
|
||||
{
|
||||
public static string Build(string title, string? summary, string? description, string? challengeName = null)
|
||||
{
|
||||
var parts = new List<string>();
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(title))
|
||||
{
|
||||
parts.Add(title.Trim());
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(summary))
|
||||
{
|
||||
parts.Add(summary.Trim());
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(description))
|
||||
{
|
||||
parts.Add(description.Trim());
|
||||
}
|
||||
|
||||
if (!string.IsNullOrWhiteSpace(challengeName))
|
||||
{
|
||||
parts.Add(challengeName.Trim());
|
||||
}
|
||||
|
||||
return string.Join("\n", parts);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user