Semantic and sentimental analysis plays an important role in natural language processing, especially in textual analysis, and has a wide range of applications in web information processing and management. This paper intends to present a sentimental analysis framework based on the directed weighted graph method, which is used for semantic classification of the textual comments, i.e. user reviews, collected from the e-commerce websites. The directed weighted graph defines a formal semantics lexical as a semantic body, denoted to be a node in the graph. The directed links in the graph, representing the relationships between the nodes, are used to connect nodes to each other with their weights. Then a directed weighted graph is constructed with semantic nodes and their interrelationships relations. The experimental results show that the method proposed in the paper can classify the semantics into different classification based on the computation of the path lengths with a threshold. © Springer International Publishing AG 2016.