Skip to main content

SemanticParserPlugin

Trait SemanticParserPlugin 

Source
pub trait SemanticParserPlugin: Send + Sync {
    // Required methods
    fn id(&self) -> &str;
    fn extensions(&self) -> &[&str];
    fn extract_entities(
        &self,
        content: &str,
        file_path: &str,
    ) -> Vec<SemanticEntity>;

    // Provided method
    fn compute_similarity(&self, a: &SemanticEntity, b: &SemanticEntity) -> f64 { ... }
}

Required Methods§

Source

fn id(&self) -> &str

Source

fn extensions(&self) -> &[&str]

Source

fn extract_entities( &self, content: &str, file_path: &str, ) -> Vec<SemanticEntity>

Provided Methods§

Implementors§