<commit_before><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:context="http://www.springframework.org/schema/context" xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
	http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.3.xsd">

	<!-- 
		Have a look at this test file for details on how to define Neo4j-related params:
		https://github.com/Rothamsted/knetminer-backend/blob/master/cypher-client/src/test/resources/test-config/config.xml
		
		This is wheat dataset-specific and overrides the default config.xml
	-->

  <context:component-scan base-package = "uk.ac.rothamsted.knetminer.backend" />
  
  
  <bean name = "configDirPath" class = "java.lang.String">
  	<constructor-arg value = "${knetminer.configDir}/neo4j" />
  </bean> 
   
	<bean name = "semanticMotifsQueries" 
				class = "uk.ac.rothamsted.knetminer.backend.cypher.genesearch.CyQueriesReader" factory-method = "readQueries" >
		<constructor-arg value = "${knetminer.configDir}/neo4j/new-queries.txt" />
	</bean>


 	<!-- The Neo4j driver -->
	<bean id = "neoDriver" class = "org.neo4j.driver.v1.GraphDatabase" 
			factory-method="driver">
		<constructor-arg value = "${neo4j.server.boltUrl}" />
		<constructor-arg>
			<bean class = "org.neo4j.driver.v1.AuthTokens" factory-method = "basic">
				<constructor-arg value = "${neo4j.server.user}" />
				<constructor-arg value = "${neo4j.server.password}" />
			</bean>
		</constructor-arg>
		<!-- This does some tuning on the kind of needs we have with Knetminer -->
		<constructor-arg type="org.neo4j.driver.v1.Config" 
			value = "#{T(org.neo4j.driver.v1.Config).build ()
				.withConnectionAcquisitionTimeout ( 10, T(java.util.concurrent.TimeUnit).SECONDS )
				.withConnectionTimeout ( 20, T(java.util.concurrent.TimeUnit).SECONDS )
				.toConfig ()
			}"
		/>
	</bean>
	
	<bean name = "queryTimeoutMs" class = "java.lang.Long"><constructor-arg value = "40000"/></bean>
	
</beans><commit_msg>Introducing Thread Pool Size params in the Cypher traverser.<commit_after><?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:context="http://www.springframework.org/schema/context" xmlns:util="http://www.springframework.org/schema/util"
	xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
	http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
	http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.3.xsd">

	<!-- 
		Have a look at this test file for details on how to define Neo4j-related params:
		https://github.com/Rothamsted/knetminer-backend/blob/master/cypher-client/src/test/resources/test-config/config.xml
		
		This is wheat dataset-specific and overrides the default config.xml
	-->

  <context:component-scan base-package = "uk.ac.rothamsted.knetminer.backend" />
  
  
  <bean name = "configDirPath" class = "java.lang.String">
  	<constructor-arg value = "${knetminer.configDir}/neo4j" />
  </bean> 
   
	<bean name = "semanticMotifsQueries" 
				class = "uk.ac.rothamsted.knetminer.backend.cypher.genesearch.CyQueriesReader" factory-method = "readQueries" >
		<constructor-arg value = "${knetminer.configDir}/neo4j/new-queries.txt" />
	</bean>


 	<!-- The Neo4j driver -->
	<bean id = "neoDriver" class = "org.neo4j.driver.v1.GraphDatabase" 
			factory-method="driver">
		<constructor-arg value = "${neo4j.server.boltUrl}" />
		<constructor-arg>
			<bean class = "org.neo4j.driver.v1.AuthTokens" factory-method = "basic">
				<constructor-arg value = "${neo4j.server.user}" />
				<constructor-arg value = "${neo4j.server.password}" />
			</bean>
		</constructor-arg>
		<!-- This does some tuning on the kind of needs we have with Knetminer -->
		<constructor-arg type="org.neo4j.driver.v1.Config" 
			value = "#{T(org.neo4j.driver.v1.Config).build ()
				.withConnectionAcquisitionTimeout ( 10, T(java.util.concurrent.TimeUnit).SECONDS )
				.withConnectionTimeout ( 20, T(java.util.concurrent.TimeUnit).SECONDS )
				.toConfig ()
			}"
		/>
	</bean>
	
	<bean name = "queryTimeoutMs" class = "java.lang.Long"><constructor-arg value = "40000"/></bean>
	<bean name = "queryThreadPoolSize" class = "java.lang.Integer"><constructor-arg value = "4"/></bean>
</beans>
{'fraction_non_alphanumeric': 0.1659342958777987, 'fraction_numerical': 0.014438166980539862, 'mean_word_length': 4.085106382978723, 'pattern_counts': {'":': 0, '<': 58, '<?xml version=': 2, '>': 58, 'https://': 2, 'lorem ipsum': 0, 'www.': 20, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5541249', 'n_tokens_mistral': 1744, 'n_tokens_neox': 1590, 'n_words': 256}