spock

构建知识图谱-初学

孤街醉人 提交于 2020-07-27 01:17:21
本文内容源自 medium文章 A Knowledge Graph understanding and implementation tutorial for beginners[1] 目录 什么是知识图谱? 如何搭建一个简单的知识图谱? 什么是知识图谱? 知识图谱的内容通常以三元组形式存在, Subject-Predicate-Object (spo)。 举个栗子: Leonard Nimoy was an actor who played the character Spock in the science-fiction movie Star Trek 对上面的句子可以抽取到如下三元组: 以知识图谱形式可以表示为: 上述由节点和关系组成的图,就是一个简单的知识图谱。 如何搭建一个简单的知识图谱? 可以分为以下两大步骤: 知识提取 信息抽取,获取三元组 实体识别、实体链接、实体消歧(Disambiguation)、实体统一(Entity Resolution) 图构建 存储 查询 知识提取步骤是构建知识图谱的关键,三元组可以通过依存分析得到。 动手构建一个简单知识图谱 此处只显示代码执行过程与结果,完整代码请见 github . 1. 三元组提取 借助spacy inputText = 'Startup companies create jobs and innovation.

阿里巴巴Java 程序员常用的 10 款开源工具!用好了,事半功倍!

余生颓废 提交于 2020-07-26 23:31:43
本文主要介绍阿里巴巴Java程序员常用的一些基本和高级工具。如果你是一位经验丰富的Java开发人员,你可能对这些工具很熟悉,但如果不是,现在就是是开始学习这些工具的好时机。 Java世界中存在许多工具,从Eclipse,NetBeans和IntelliJ IDEA等著名的IDE开始到Java开发人员应该知道的JVM分析和监视工具,如JConsole,VisualVM,Eclipse Memory Analyzer等。 尽管如此,在本文中,我将重点介绍适用于各种Java开发人员的通用工具,例如核心Java 开发人员和Web开发人员。 1.JIRA Atlassian的JIRA是当前敏捷开发领域最重要的工具之一。它用于错误跟踪,问题跟踪和项目管理。如果你遵循敏捷开发方法,例如Sprint和Scrum,那么你必须了解JIRA。它允许您创建Spring循环并跟踪软件开发的进度。 JIRA 是目前比较流行的基于Java架构的管理系统,由于Atlassian公 司对很多开源项目实行免费提供缺陷跟踪服务,因此在开源领域,其认知度比其他的产品要高得多,而且易用性也好一些。 2.Git Git是Java程序员的另一个必备工具,它是一个免费的开源分布式版本控制系统,旨在快速高效地处理从很小到非常大的项目版本管理。Git易于学习,占用空间小,具有超强的性能。 最初 Git 的开发是为了辅助 Linux

Mongo in testcontainers

∥☆過路亽.° 提交于 2020-07-23 08:05:07
问题 I started playing with testcontainers and at the beginning of my journey I faced some issue (below). I did similar thing for mysql db and it worked fine. Do I miss some mongo specific config? According to [docs][1] there is not much to do. Thanks in advance for any tips / examples. com.mongodb.MongoSocketOpenException: Exception opening socket at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:70) ~[mongodb-driver-core-3.11.2.jar:na] at com.mongodb.internal.connection

Mongo in testcontainers

孤街浪徒 提交于 2020-07-23 08:03:09
问题 I started playing with testcontainers and at the beginning of my journey I faced some issue (below). I did similar thing for mysql db and it worked fine. Do I miss some mongo specific config? According to [docs][1] there is not much to do. Thanks in advance for any tips / examples. com.mongodb.MongoSocketOpenException: Exception opening socket at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:70) ~[mongodb-driver-core-3.11.2.jar:na] at com.mongodb.internal.connection

Mongo in testcontainers

六眼飞鱼酱① 提交于 2020-07-23 08:03:03
问题 I started playing with testcontainers and at the beginning of my journey I faced some issue (below). I did similar thing for mysql db and it worked fine. Do I miss some mongo specific config? According to [docs][1] there is not much to do. Thanks in advance for any tips / examples. com.mongodb.MongoSocketOpenException: Exception opening socket at com.mongodb.internal.connection.SocketStream.open(SocketStream.java:70) ~[mongodb-driver-core-3.11.2.jar:na] at com.mongodb.internal.connection

Programatically call Spock Tests to create a Load Test

我的梦境 提交于 2020-07-23 06:23:17
问题 I have written integration tests in Spock that I would like to reuse for load testing. I haven't had any luck with programmatically executing Spock tests. I need to run an entire spec as a single unit which will be executed concurrently to create load. Previous posts on stack overflow on this topic are obsolete (I tried a bunch of them with no luck). Example Spec: class MySpec extends Specification { def 'test'() { expect: 1+1 == 2 } } I want to be able to run this in something like (executed

Programatically call Spock Tests to create a Load Test

陌路散爱 提交于 2020-07-23 06:22:21
问题 I have written integration tests in Spock that I would like to reuse for load testing. I haven't had any luck with programmatically executing Spock tests. I need to run an entire spec as a single unit which will be executed concurrently to create load. Previous posts on stack overflow on this topic are obsolete (I tried a bunch of them with no luck). Example Spec: class MySpec extends Specification { def 'test'() { expect: 1+1 == 2 } } I want to be able to run this in something like (executed

Programatically call Spock Tests to create a Load Test

半城伤御伤魂 提交于 2020-07-23 06:21:20
问题 I have written integration tests in Spock that I would like to reuse for load testing. I haven't had any luck with programmatically executing Spock tests. I need to run an entire spec as a single unit which will be executed concurrently to create load. Previous posts on stack overflow on this topic are obsolete (I tried a bunch of them with no luck). Example Spec: class MySpec extends Specification { def 'test'() { expect: 1+1 == 2 } } I want to be able to run this in something like (executed

How to mock an ItemReader in a Spring Batch application using Spock and Groovy

孤街浪徒 提交于 2020-07-10 04:50:11
问题 I'm trying to write the tests for a Spring Batch application, specifically on the interaction from the following reader when it gets records from a database implementing a simple RowMapper : @Component @StepScope public class RecordItemReader extends JdbcCursorItemReader<FooDto> { @Autowired public RecordItemReader(DataSource dataSource) { this.setDataSource(dataSource); this.setSql(AN_SQL_QUERY); this.setRowMapper(new RecordItemMapper()); } } Here is the step definition from the Batch

How to mock an ItemReader in a Spring Batch application using Spock and Groovy

安稳与你 提交于 2020-07-10 04:48:44
问题 I'm trying to write the tests for a Spring Batch application, specifically on the interaction from the following reader when it gets records from a database implementing a simple RowMapper : @Component @StepScope public class RecordItemReader extends JdbcCursorItemReader<FooDto> { @Autowired public RecordItemReader(DataSource dataSource) { this.setDataSource(dataSource); this.setSql(AN_SQL_QUERY); this.setRowMapper(new RecordItemMapper()); } } Here is the step definition from the Batch