Commit 18e0e913 authored by Enjalbert Quentin's avatar Enjalbert Quentin
Browse files

Creation package + interface

parent 04e2fa54
__all__ = ["interface"]
\ No newline at end of file
from typing import List, Tuple
from arbre_binaire import ArbreBinaire
from reseau import Reseau
from .arbre_binaire import ArbreBinaire
from .reseau import Reseau
def cha(reseau: Reseau, type_distance: str = "min"):
from make_clusters import creer_reseau
import cha
from .make_clusters import creer_reseau
from . import cha
reseauEn = creer_reseau("out/scoreAllEn.csv")
......@@ -55,7 +55,8 @@ def calculate_scoreNormalise(src: str, out: str):
if __name__ == "__main__":
calculate_score("./data/listeMotsHaptiques.csv", "./data/scoreAllEn.csv", "En")
calculate_score("./data/listeMotsHaptiques.csv", "./out/scoreAllEn.csv", "En")
calculate_score("./data/listeMotsHaptiques.csv", "out/scoreAllFr.csv", "Fr")
# calculate_scoreNormalise("./data/scoreAllEn.csv","./data/scoreAllEnNormalise.csv")
calculate_score("./data/listeMotsHaptiques.csv", "./out/scoreAllFr.csv", "Fr")
from . import make_clusters
from .import cha
from .reseau import Reseau
from .arbre_binaire import ArbreBinaire
def creer_reseau(src: str) -> Reseau:
return make_clusters.creer_reseau(src)
def cha(reseau: Reseau, type_distance: str = "min"):
return cha.cha(reseau, type_distance)
def decouper_clusters(cluster_racine: ArbreBinaire, nb_clusters: int):
return cha.decouper_clusters(cluster_racine, nb_clusters)
def clusters_to_string(liste_clusters):
return cha.clusters_to_string(liste_clusters)
\ No newline at end of file
......@@ -4,8 +4,8 @@ import numpy as np
from scipy.cluster.hierarchy import dendrogram, linkage
from scipy.spatial.distance import squareform
from matplotlib import pyplot as plt
from reseau import Reseau
from cha import cha, decouper_clusters
from .reseau import Reseau
from .cha import cha, decouper_clusters
def creer_reseau(src: str) -> Reseau:
from noeud import Noeud
from .noeud import Noeud
from typing import List, Tuple, Dict
from lesk import Lesk
from ..lesk import Lesk
from nltk.corpus import wordnet
import pytest
......@@ -4,8 +4,7 @@ from flask import Flask, jsonify
from flask_restful import Api, Resource, reqparse
from flask_cors import CORS
from make_clusters import creer_reseau
from cha import cha, decouper_clusters, clusters_to_string
from clustering.interface import creer_reseau,cha, decouper_clusters, clusters_to_string
reseauEn = creer_reseau("../out/scoreAllEn.csv")
reseauFr = creer_reseau("../out/scoreAllFr.csv")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment