ts-82-author-overview-and-description #137
@@ -418,16 +418,16 @@ def build_authors_search_rescored(
|
||||
functions = []
|
||||
if not sort_by:
|
||||
|
||||
if (name_quality_boost): # Name quality boost, boost names which are not "Value Value"
|
||||
name_boost_query={
|
||||
"script_score": {
|
||||
"script": {
|
||||
"lang": "painless",
|
||||
"source": "String name = doc['display_name.keyword'].value.toLowerCase(); String[] parts = name.splitOnToken(' ');Set unique = new HashSet();for (String p : parts) { unique.add(p); }return unique.size() > 1 ? 1.0 : 0.3;"
|
||||
}
|
||||
}
|
||||
}
|
||||
functions.append(name_boost_query)
|
||||
# if (name_quality_boost): # Name quality boost, boost names which are not "Value Value"
|
||||
# name_boost_query={
|
||||
# "script_score": {
|
||||
# "script": {
|
||||
# "lang": "painless",
|
||||
# "source": "String name = doc['display_name.keyword'].value.toLowerCase(); String[] parts = name.splitOnToken(' ');Set unique = new HashSet();for (String p : parts) { unique.add(p); }return unique.size() > 1 ? 1.0 : 0.3;"
|
||||
# }
|
||||
# }
|
||||
# }
|
||||
# functions.append(name_boost_query)
|
||||
if (h_index_boost): # h_index boost
|
||||
h_index_boost_query={
|
||||
"script_score": {
|
||||
@@ -449,17 +449,6 @@ def build_authors_search_rescored(
|
||||
}
|
||||
functions.append(cited_by_count_boost_query)
|
||||
|
||||
if (_2yr_mean_citedness_boost): # 2yr mean citedness boost
|
||||
mean_citedness_boost_query = {
|
||||
"script_score": {
|
||||
"script": {
|
||||
"lang": "painless",
|
||||
"source": "if (!doc.containsKey('summary_stats.2yr_mean_citedness') || doc['summary_stats.2yr_mean_citedness'].empty) return 1.0;double recent = doc['summary_stats.2yr_mean_citedness'].value;return 1.0 + Math.log1p(recent) / 8.0;"
|
||||
}
|
||||
}
|
||||
}
|
||||
functions.append(mean_citedness_boost_query)
|
||||
|
||||
if (works_boost): # works_count boost
|
||||
works_count_boost_query = {
|
||||
"script_score": {
|
||||
|
||||
@@ -34,6 +34,9 @@
|
||||
Publikationen: {{ person.works_count }} · Zitationen:
|
||||
{{ person.cited_by_count }}
|
||||
</p>
|
||||
<p [skText]="loading" class="stats">
|
||||
h_index: {{person.summary_stats?.h_index }}
|
||||
</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
<option [ngValue]="null">Beste Treffer (Relevanz)</option>
|
||||
<option value="works_count">Publikationen</option>
|
||||
<option value="cited_by_count">Zitierungen</option>
|
||||
<option value="summary_stats.h_index">h_index</option>
|
||||
</select>
|
||||
|
||||
<select [formControl]="sortOrderControl">
|
||||
|
||||
@@ -70,9 +70,6 @@ export class PersonListComponent {
|
||||
public readonly state = inject(SharedStateService);
|
||||
public readonly paginationService = inject(PaginationService);
|
||||
public readonly resolverStateService = inject(ResolverStateService);
|
||||
private readonly defaultIncludes =
|
||||
'display_name,works_count,cited_by_count,topics,orcid,relevance_rating,last_known_institutions,affiliations';
|
||||
|
||||
readonly loadingState = computed(() =>
|
||||
this.resolverStateService.isResolvingInside('/persons'),
|
||||
);
|
||||
|
||||
@@ -21,6 +21,11 @@
|
||||
}
|
||||
@if (citedByCount() !== null) {
|
||||
{{ citedByCount() }} Zitationen
|
||||
}
|
||||
</span>
|
||||
<span>
|
||||
@if (h_index() !== null) {
|
||||
h_index: {{ h_index() }}
|
||||
}
|
||||
</span>
|
||||
}
|
||||
|
||||
@@ -23,10 +23,6 @@ import { PersonsService, WorksService } from '../../api';
|
||||
import { LoadingComponent } from '../../shared/ui/loading/loading.component';
|
||||
import { PersonBioResolved } from '../../resolvers/person-bio.resolver';
|
||||
|
||||
const PERSON_INCLUDE_TAGS =
|
||||
'topics_full,topic_share,summary_stats,ids,last_known_institutions,' +
|
||||
'sources,counts_by_year,works_api_url,dates,cited_by_count_boost';
|
||||
|
||||
@Component({
|
||||
selector: 'app-person',
|
||||
imports: [
|
||||
@@ -143,6 +139,7 @@ export class PersonComponent {
|
||||
);
|
||||
readonly worksCount = computed(() => this.person()?.works_count ?? null);
|
||||
readonly citedByCount = computed(() => this.person()?.cited_by_count ?? null);
|
||||
readonly h_index = computed(() => this.person()?.summary_stats?.h_index ?? null);
|
||||
readonly orcid = computed(() => {
|
||||
const rawOrcid = this.getId('orcid');
|
||||
if (!rawOrcid) {
|
||||
|
||||
@@ -12,7 +12,7 @@ export const personListResolver: ResolveFn<CustomAuthorsListResponse> = (
|
||||
return [val];
|
||||
};
|
||||
const defaultIncludes =
|
||||
'display_name,works_count,cited_by_count,topics,orcid,relevance_rating,last_known_institutions,affiliations';
|
||||
'display_name,works_count,cited_by_count,summary_stats,topics,orcid,relevance_rating,last_known_institutions,affiliations';
|
||||
const params = route.queryParamMap;
|
||||
|
||||
const query = params.get('query') || undefined;
|
||||
|
||||
@@ -43,7 +43,6 @@ export class ResolverStateService {
|
||||
isResolvingInside(path: string) {
|
||||
const from = this.previousUrl();
|
||||
const to = this.resolvingUrl();
|
||||
console.log(from, to, to?.startsWith(path) && from?.startsWith(path));
|
||||
if (to?.startsWith(path) && from?.startsWith(path)) return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user